Stick with a healthy diet, rest, and get regular exercise. While there are vaccines that can protect against typical pneumonia, there isn’t a vaccine that can prevent walking pneumonia.