Practical GIS
上QQ阅读APP看书,第一时间看更新

Installing on Windows

Installing the required software on Windows only requires a few installers as most of the packages are bundled into the OSGeo4W installer.

  1. First of all, we have to download the 32-bit installer from https://trac.osgeo.org/osgeo4w/ as this is the only architecture where an OSGeo version of Apache is bundled.
  2. Opening the installer, we can choose between different setups. For our cause, we should choose Advanced Install. When we reach the Select Packages section, we must choose the following packages as a minimum:
  • Desktop--grass, qgis
  • Web--apache, qgis-server
  1. The next page tells us we don't have to bother with dependencies as the installer selected them for us automatically.
  2. The last step can be quite troublesome as there isn't a general solution; we have to configure Apache and QGIS Server if they don't want to collaborate (opening http://localhost/qgis/qgis_mapserv.fcgi.exe returns an Internal Server Error or it simply cannot be reached). For a good start, take a look at the official tutorial at http://hub.qgis.org/projects/quantum-gis/wiki/QGIS_Server_Tutorial.

Don't worry if you end up with no solutions, we will concentrate on GeoServer, which runs perfectly on Windows. Just make sure Apache is installed and working (i.e. http://localhost returns a blank page or the OSGeo4W default page), as we will need it later.

If you would like to install the 64-bit version of Apache separately, you can find suggestions on compiled 64-bit binaries at  https://httpd.apache.org/docs/current/platform/windows.html.
  1. The next thing to consider is the PostgreSQL stack. We can download the installer from https://www.postgresql.org/download/windows/, where the EnterpriseDB edition comes with a very handy Stack Builder. After the installation of PostgreSQL, we can use it to install PostGIS. We can find PostGIS in the Spatial Extensions menu. The default installer comes with pgAdmin 4, while we will use pgAdmin 3 in this book. The two look and feel similar enough; however, if you would like to install the latter, you can download it from https://www.pgadmin.org/download/pgadmin-3-windows/.
The last thing to install is GeoServer, which is such an easy task that we won't discuss it. You can download the installer from  http://geoserver.org/release/stable/. Make sure you have Java 8 ( https://java.com/en/download/) before starting it!