Search This Blog

Tuesday, February 17, 2015

Installing GeoServer 1.6.2 on Tomcat on Ubuntu

In this post, we will deploy GeoServer latest release on Tomcat on Ubuntu. The first thing to do is to download the installer by accessing the GeoServer website at http://www.geoserver.org/download/


Here we can choose to download the version we want. To deploy on Tomcat on my machine, I need to download the Web Archive (.war) version. Click on the link that says Web Archive. In case you also need to install Tomcat on your machine follow the steps in my earlier post on Installing Tomcat 7 on Ubuntu.



This downloads a zip file containing the .war file. Having downloaded it, we need to copy it to a place where we can extract it to unzip the contents.


On my machine the default Tomcat instance is deployed at /usr/share/tomcat7 and accessible at http://localhost:8080. We can launch a browser to verify its working.


Next I need to go to the Tomcat bin directory to check the Tomcat version. For that enter the following command

cd /usr/share/tomcat7/bin/

Then execute the following command

./version.sh

to check the version.



Next we need to copy the .war file from the place you extracted the zip file into the Tomcat 7 webapp folder. If you installed Tomcat using Ubuntu apt-get command, the webapps folder would be under /var/lib/tomvat7/webapps.

If you extracted the files at /tmp the command would be as follows

sudo cp /tmp/geoserver-2.6.1-war/geoserver.war /var/lib/tomcat7/webapps



You may be prompted for your password.



This deploys GeoServer on your local Tomcat instance that can be accessed by entering the following url on your machine

http://localhost:8080/geoserver



That's it. Thanks!

No comments: