Reader small image

You're reading from  Mastering Geoserver

Product typeBook
Published inNov 2014
Publisher
ISBN-139781783287697
Edition1st Edition
Right arrow
Author (1)
Colin Henderson
Colin Henderson
author image
Colin Henderson

Colin Henderson is a spatial solutions architect with 14 years of experience working on solutions to complex spatial problems. He is currently the Geospatial Systems Capability Lead for Atkins, one of the world's leading design, engineering, and project management consultancies. Although experienced in a wide range of proprietary GIS software, his current focus is on specializing in the integration of open source software in complex enterprise environments. His most recent projects involve the integration of GeoServer with FME Server from Safe Software and the delivery of spatial web-mapping applications through Esri's ArcGIS for the Server platform and Latitude Geographics' Geocortex framework. Colin is the Technical Architect and Lead Developer of Atkins' open source-based spatial integration platform, CIRRUSmaps, a solution built on the best breed of open source spatial software, including PostGIS and OpenLayers, with GeoServer at its heart, and designed from the ground-up for deployment in cloud environments. A self-confessed techie, Colin enjoys digging deeper to understand technology and software, and then applying this learning to create innovative solutions to problems. When possible, he likes to "pay it forward" by helping others with their problems, through contributions on GIS Stack Exchange, in particular.
Read more about Colin Henderson

Right arrow

Deploying GeoServer to Apache Tomcat


We are getting there for a basic configuration of GeoServer, which we can use as a basis to architect our production environment for high-availability, failover, and scalability. Now we need to deploy GeoServer into Apache Tomcat, which is happily a straightforward process.

We will utilize Apache Tomcat's auto-deploy feature that allows us to copy the GeoServer WAR (Web Archive) file directly to appBase of a running Tomcat instance. Tomcat will detect the presence of the WAR file, and then deploy it ready for use.

First, we need to download the WAR file from the GeoServer download page at http://geoserver.org/release/Stable. At the time of writing, the current stable version of GeoServer is 2.5.2:

Click on the Web Archive link and save the downloaded ZIP file somewhere it is accessible.

Deploying on CentOS 6.3

Deployment of GeoServer on CentOS is a very straightforward process, thanks to the way Tomcat is architected. WAR files can automatically be deployed by copying them to a specific location in the Tomcat home directory.

Download the WAR file to a location on your system, for example, your home directory:

$ cd ~
$ wget http://sourceforge.net/projects/geoserver/files/GeoServer/2.5.2/geoserver-2.5.2-war.zip

The WAR file that we want to deploy to GeoServer is contained within the downloaded ZIP file, so we need to extract this from the Tomcat appBase directory:

$ sudo unzip geoserver-2.5.2-war.zip *.war –d $CATALINA_HOME/webapps/

This command will only extract the geoserver.war file from the ZIP file and place it in the Tomcat appBase directory. Tomcat will then autodeploy the WAR file, and you should see a geoserver directory appear.

Deploying on Windows Server 2008 R2 SP1

Deploying the GeoServer WAR file on Windows follows the same process as that of Linux. The WAR file is copied in the Tomcat home directory, where it is unpacked and the GeoServer context started.

The following steps are required to deploy the GeoServer WAR file in Tomcat:

  1. Download the WAR file to a location on your system, for example, the Downloads folder within your home directory.

  2. Double-click on the geoserver-2.5.2-war.zip file to open it in Windows Explorer (assuming you do not have another ZIP application installed).

  3. Drag and drop the geoserver.war file from the ZIP folder to the webapps folder in your Tomcat service home directory. If you followed the steps to install Tomcat on Windows, then this directory will be C:\Tomcat7-1\webapps:

  4. After dropping the file into the folder, Tomcat will autodeploy it and a directory called geoserver will appear.

Checking GeoServer deployment

We should now have a basic configuration of GeoServer deployed inside an Apache Tomcat instance. Test that GeoServer was successfully deployed by opening a web browser and navigating to the GeoServer administration interface:

http://[your server address]:8080/geoserver

If everything worked as expected, then we should be presented with the GeoServer administration interface's front page:

Previous PageNext Page
You have been reading a chapter from
Mastering Geoserver
Published in: Nov 2014Publisher: ISBN-13: 9781783287697
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Colin Henderson

Colin Henderson is a spatial solutions architect with 14 years of experience working on solutions to complex spatial problems. He is currently the Geospatial Systems Capability Lead for Atkins, one of the world's leading design, engineering, and project management consultancies. Although experienced in a wide range of proprietary GIS software, his current focus is on specializing in the integration of open source software in complex enterprise environments. His most recent projects involve the integration of GeoServer with FME Server from Safe Software and the delivery of spatial web-mapping applications through Esri's ArcGIS for the Server platform and Latitude Geographics' Geocortex framework. Colin is the Technical Architect and Lead Developer of Atkins' open source-based spatial integration platform, CIRRUSmaps, a solution built on the best breed of open source spatial software, including PostGIS and OpenLayers, with GeoServer at its heart, and designed from the ground-up for deployment in cloud environments. A self-confessed techie, Colin enjoys digging deeper to understand technology and software, and then applying this learning to create innovative solutions to problems. When possible, he likes to "pay it forward" by helping others with their problems, through contributions on GIS Stack Exchange, in particular.
Read more about Colin Henderson