These are among the tips included in the UC Davis Police Department's "active shooter survival" program.
Have a "warrior" mindset. Take control of the situation to the best of your ability. If you are close enough, try to push the gunman's weapon toward him and away from victims.
Look for escape routes. Hide behind a wall or pillar that might deflect bullets.
Crouch low and crawl to the nearest exit. If you are far enough away, run from the gunman in a zigzag pattern.
In a crowded room, do not clump together with others. Fan out.
If the gunman is in a hallway or an adjacent room, lock doors and grab items that might be used to disable him if he storms through, such as fire extinguishers or chairs.
Call 911 as soon as you can, but disable your phone's ring tones so you won't alert the shooter to your location.
Try to remember as much as you can about the shooter, including his size, hair color and clothing.