Short answer: get the vaccine.
Best way, and easiest, to avoid the measles
. Obviously if you hear of exposure, make sure you're being careful and following recommendations, but being vaccinated is first and foremost the best and only sure fire way to avoid measles. The vaccine is proven safe, with low risk, and highly effective.