There's often confusion about Yellow Fever vaccination requirements when you travel to Africa. An outbreak of Yellow Fever in 2011 in Uganda led to speculation that the vaccination would be a requirement to enter Kenya, Uganda and Tanzania. Both the Ugandan and Tanzanian embassies confirmed that everyone does need to be vaccinated in order to enter, regardless of where their travel originated. The Kenyan embassy in Washington DC however said it was not mandatory, if you are traveling from a country where the disease is not endemic. It's a good idea to double check with your tour operator to make sure you will not be crossing borders at any time during your trip. Many safari itineraries will combine a visit to two or three countries in both East and Southern Africa.
When I flew in to Tanzania's Kilimanjaro International Airport a couple years ago from Rwanda, a doctor was on hand to vaccinate passengers who could not prove they had had the shot. It cost them $50 on the spot. Since it takes 10 days to build up immunity to the disease, this is not a great position to be in on so many levels. And there's always the chance that you could be sent back home on the next flight if a doctor is not available. Ghana makes it mandatory to have a yellow fever vaccination, but there is rarely anyone at the airport to check it.
My advice is get the yellow fever shot if there is any question of it being an entry requirement. Call the embassy of the country you plan to visit, or transit through. Don't rely on web site information, it could be outdated. You also never know if that stop over in Dakar or Nairobi en route to another destination, counts as originating in a country where yellow fever is endemic. And almost every African country requires you to get the vaccine if you are traveling from a country where yellow fever is present. The authorities may not always check to see if you have your little yellow book, but it's worth having it on hand in case they do.
The vaccination gives you 10 years of immunity, hopefully you'll be able to travel to Africa several times in that time frame. If you are pregnant, allergic to eggs, or under 9 months of age, the vaccine is not recommended and you can possibly get a medical waiver. Check the CDC web site for more information from a medical perspective.
Image - Yellow Fever endemic area - CDC