Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Mastering Geoserver

You're reading from  Mastering Geoserver

Product type Book
Published in Nov 2014
Publisher
ISBN-13 9781783287697
Pages 420 pages
Edition 1st Edition
Languages
Author (1):
Colin Henderson Colin Henderson
Profile icon Colin Henderson

Table of Contents (19) Chapters

Mastering GeoServer
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Installing GeoServer for Production 2. Working with Raster Data 3. Working with Vector Data in Spatial Databases 4. Using GeoServer to Serve Complex Features 5. Using GeoServer as a Proxy 6. Controlling the Output of GeoServer 7. Using GeoServer to Print Maps 8. Integrating GeoServer in a Spatial Data Infrastructure 9. GeoServer as a Spatial Analysis Platform 10. Enterprise Security and GeoServer 11. Monitoring the Performance and Health of GeoServer 12. Optimizing GeoServer for Production Index

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:

You have been reading a chapter from
Mastering Geoserver
Published in: Nov 2014 Publisher: 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.
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 €14.99/month. Cancel anytime}