Great advice from everyone, not sure I have much to add. Except that personally I much prefer same sex, if one is planning on being out and about with them. The male can get very protective of "his bitch" (whether he's neutered or not), which can cause angst with other dogs. But if they will only be on your holding and you don't get many or any canine visitors, then that wouldn't be an issue.
Other advice is to reinforce that the incumbent is top dog by your behaviour - so feed current dog first, insist on new dog waiting to be invited for fuss and don't let him push the current dog out of the way, don't evict current dog from his bed, or make him share his toys or anything. They will sort themselves out in due course, but it will help the incumbent accept the newcomer in his space if you treat him like Top Dog, and reduce the amount of posturing they feel the need to do for the first wee while.
If you are getting a pup, chances are it will all evolve just fine. If you are getting a young adult (eg a rescue), it should be possible to introduce them away from your home site first, and see how they seem to get on. If there is instant antipathy, that maybe isn't the dog for you. Mostly it won't be instant love (though it might), but you can often see if there is likely to be a problem. Two bitches who won't get on can be a huge problem, it's not usually quite so bad with boys - but it can still be something that erodes your ability to relax in your own home! Much depends on the character of the existing dog - does he like to be Top Dog in all his encounters, or is he very laid back?