Search This Blog

Wednesday, October 24, 2012

Download and Install GeoServer on Linux


In this post, we walk through the steps of installing GeoServer 2.2 on Tomcat 7 on Ubuntu 12.04.

First thing is to setup Tomcat 7 on Ubuntu as indicated in my previous blog (http://opendesignarch.blogspot.com/2012/10/how-to-install-tomcat-7-on-ubuntu-1204.html)

As part of the default install on Ubuntu, two Tomcat 7 locations are created. The first is /var/lib/tomcat7 and the second is /usr/share/tomcat7. While the first folder contains all the configuration folders, the second contains the runtime components.

Listing the contents of /var/lib/tomcat7, we see the folder contents that includes the webapp directory. This is the directory where we will install GeoServer.

> ls /var/lib/tomcat7



Now, lets download the Geoserver binaries. If we navigate to the GeoServer site, we shall see the following page by clicking the Download link.



We are interested in the Stable build. Also, get the Web Archive (.war) file.



Go ahead and download the web archive. I copied the installation zip to my local file.


Go ahead and extract the zip file. This will give you the .war file. You can delete the zip now.



Now open a terminal window and copy the extracted .war file from within the extracted folder to the tomcat7/webapps folder

For example, for me its the following

> sudo cp /home/arthgallo/Work/Servers/GeoServer/geoserver-2.2-war/geoserver.war /var/lib/tomcat7/webapps



Once the file is copied, Tomcat will automatically load it as a web application. We can test by entering the following url in a browser.

http://localhost:8080/geoserver



Enter the username password as “admin” and “geoserver” and click the login button to login.



Voila, we can access the administration console for Geoserver 2.2.



Take care...

2 comments:

Matteo said...

Hi, great post!!
I follow exacty your guide, but when I tipp http://localhost:8080/geoserver I get a message (error):

type Status report
message /geoserver
description The requested resource (/geoserver) is not available

Am I doing something wrong?!?

awachs said...

Sorry,

Just saw your comment. Hope your problem is resolved. If not, check Tomcat logs to see where exactly did the loading of the .war fail in the process.

Hope this helps,

Regards,
AW