OpenLayers 2 is outdated. Go to the latest 3.x version: http://openlayers.org/
Flash presentation of these steps: Mapping Your Data
- Install MapServer. Once installed on a local machine, mapserver is visible from http://localhost/cgi-bin/mapserv. (This presentation assumes mapserver is already installed.)
- Datasets -- Download data
- Create project in QGIS
- Open Dataset
- Style data layer:
- Choose 'graduated color'
- Choose a field (POPULATION)
- Create 5 classes
- Create range for each class
- apply style
- Tweak colors as neccesary to achieve desired look
- Save project
- Export Map File from project
- Choose qgis project location
- Choose mapfile location
- Enter a name and default size
- Browse to MapServer, and add 'mode=map&map=/Location/Of/File/On/Disk.map' to the URL
- If you get an image:
- Download mapserver-lite.html from this wiki page.
- Change the URL to point to http://localhost/cgi-bin/mapserv
- Change the parameters to include your map file location.
- Open mapserver-lite.html in your browser