Selecting the right mate is the best place to start.
In order to that one must know his or herself very well.
You have to know what you want and what you don't want.
The goal is to find someone who wants the same things out of life as you do and is in agreement with how to go about having the kind the life you both want.
It's best to allow the relationship developed (over time) to insure the following 6 traits are in place before saying "I do". It's also a good idea to have things fall into place in the right syntax or order. For example starting at #5 and trying to work your way backwards rarely works!
4. Love & Devotion
6. Emotional Security
If any of these traits are not in place before the marriage it's going to be an up hill battle.
Naturally you'll want to mutually be physically attracted to one another as well. You can't manufacture chemistry it's either there or it's not.
Whenever a person marries the wrong person they end up trying to find ways to put square pegs into round holes.
Therapists end up serving as arbitrators teaching couples how to compromise, fight fair, and basically co-exist.
With a lot of work most people can survive a marriage to anyone. However if you select the right person to begin with "work" actually becomes a "labor of love".
The main key to having a happy marriage is both people have to be on the same page and that requires honest communication right from the start.