In business, "in the long term" is commonly used to express a period of time greater than a year. When it comes to personal matters like relationships, it would mean a much longer period of time; possibly forever. "Over the long term" isn't strictly improper, but it sounds a bit clumsy and is not typically used in American English. There are certainly some situation where it could fit, however.
"in the long term" and "for the long term" have generally the similar meaning, but couldn't simply be interchanged in the same sentence. For example, one might say: "How is that going to work in the long term?" to question the suitability of a particular course of action over a longer period of time. While most English speakers would understand if you said "How is that going to work for the long term", it sounds clumsy and improper. On the other hand, one could say "We plan to stick with it for the long term" and that would sound fine.
In short, the terms are definitely similar in meaning, but would be used in different contexts.