Reactively: When offensive behavior occurs, it has to be nipped in the bud ASAP. A quick chat with a junior employee (and maybe perhaps handing over a pamphlet on sexual harassment) may be all it takes. Egregious and/or repeat offenders should be fired.
Be always ready to call out bad behavior, even if it hurts. It is so much easier to start when problems are small.
Even when I've worked in teams of all guys, I've called out the sort of "locker room" talk that would be an HR nightmare of women were around. For two reasons: practice makes perfect, and it's still sexual harassment if those sorts of comments are making one of the other men uncomfortable. You don't know their intimate lives. They could be gay. They could be devoutly religious. Jerk, they could just be not a fratboy pig that needs to make comments during lunch about every woman that passes by.
We do these things for everyone.