jump to navigation

Revisiting Geoserver on Ubuntu July 28, 2008

Posted by grimmeister in Geoinformatics.

After a year or so of running Geoserver 1.5.x in a prototyping environment, I have run through the process of getting Geoserver 1.6.4 running in Ubuntu 8.04 a.k.a Hardy Heron production environment.

The overall view: it is dead easy now, with less fiddling necessary. So the steps in the process

Apache Tomcat/5.5
Sun jdk 1.6.0_06-b02
Linux 2.6.24-16-server kernel
64 bit Architecture

1) sudo apt-get install sun-java6-jdk.
Given that sun jdk installed, make sure its jvm is the default jvm
sudo update-alternatives --config java
choose the sun option

2)Tomcat is a bit quirky on Ubuntu

2.1)if not installed, do:
sudo apt-get install tomcat5.5 tomcat5.5-admin tomcat5.5-webapps

2.2)Configure Tomcat for the Java JDK. Edit /etc/default/tomcat5.5, uncommenting this line:

2.3)Set some permissions:
cd /var/lib/tomcat5.5/
sudo chown -R tomcat55:tomcat55 logs work
sudo chown tomcat55:tomcat55 /usr/share/tomcat5.5

2.4)Change service port to 8080 (default is 8180) in /etc/tomcat5.5/server.xml if need be

2.5)Change the users and passwords for working with tomcat, tomcat admin and tomcat manager in /var/lib/tomcat5.5/conf/tomcat-users.xml
Advice seems to be to get a separate admin user with roles {admin, manager,tomcat}

2.6) No more need to fiddle with the catalina.out issue – seems to have been fixed

So, to Geoserver…

1) We need to have the ability to serve OGC standard WFS, WMS and potentially WCS. We know the Geoserver tool works as we have been serving WMS, WFS and very large WCS’s through it.

1.1) Download the .war file in a zip file from the Geoserver website. We are using 1.6.4. Extract .war file

1.2) Deploy the .war file from the Tomcat Manager page. This will take place okay, but Geoserver will not be able to start, for Tomcat on Ubuntu (well, as provided by Ubuntu in the repositories) is by default tightly locked down.

1.3) No need seems to exist to create a geoserver.policy file anymore. On 8.04, it would appear that such a file would have to live in /etc/tomcat-5.5/conf/policy.d directory, but its presence completely prevented Tomcat from even starting, so I left it out

1.4) One still needs to open the /var/lib/tomcat5.5/conf/policy.d/04webapps.policy document and add a line to it granting looser security permissions:
permission java.security.AllPermission;

Then restart Tomcat and get cracking with setting up your data environment or migrating it across to the new version of Geoserver.


1. Andrea Aime - August 5, 2008

Hey, thanks a lot for providing this new, updated, detailed tutorial. Many GeoServer users will just love it ūüôā

2. Bruce Bannerman - August 14, 2008

Thanks, this was quite useful in troubleshooting my installation.


3. Setting up an Open Geospatial Consortium Service server « SouthernTip - November 7, 2008

[…] Setting up an Open Geospatial Consortium Service server August 8, 2007 Posted by grimmeister in Geoinformatics. trackback UPDATED for HARDY HERON here […]

4. Revving up Geoserver on Ubuntu HH LTS « SouthernTip - November 10, 2008

[…] by grimmeister in Geoinformatics. Tags: geoserver, ubuntu trackback Given my setup described at revisiting-geoserver-on-ubuntu , I am slowly learning (with Tim Sutton) good and weird lessons on how to make geoserver really […]

5. More progress on SilverMap - Nick’s Blog - June 8, 2009

[…] I found was this page that describes how you can get GeoServer to run under Tomcat. The command line that grabbed me […]

6. Geoserver en entorno de producción (I): Instalación básica | Ni'palante Ni'patras - March 8, 2010

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: