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.