In this recipe, you will see how to create a Web Map Service (WMS) and Web Feature Service (WFS) from a PostGIS layer, using the popular MapServer open-source web-mapping engine.
You will then use the services, testing their exposed requests, using first a browser and then a desktop tool such as QGIS (you could do this using other software, such as uDig, gvSIG, and OpenJUMP GIS).
Follow these steps before getting ready:
postgis_cookbookdatabase using the following command:
postgis_cookbook=# create schema chp09;