History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: GEOS-1567
Type: Task Task
Status: Open Open
Priority: Major Major
Assignee: Mike Pumphrey
Reporter: Andrea Aime
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
GeoServer

Create documentation for installing geoserver on Ubuntu

Created: 01/Dec/07 09:34 AM   Updated: 20/May/08 11:35 AM
Component/s: Documentation
Affects Version/s: 1.6.0-RC1
Fix Version/s: 1.6.5

Time Tracking:
Not Specified


 Description  « Hide
Installing GeoServer on Ubuntu is... hard... mostly due to the very locked down security model of tomcat there.

Short list of things to be expanded:

  • install java6, tomcat 5.5, eventually tomcat-admin (libapr to get some speed up serving data, at least according to the tomcat devs...)
  • change /etc/default/tomcat55 to look like:
# Run Tomcat as this user ID. Not setting this or leaving it blank will use the
# default of tomcat55.
#TOMCAT5_USER=tomcat55

# The home directory of the Java development kit (JDK). You need at least
# JDK version 1.4. If JAVA_HOME is not set, some common directories for 
# the Sun JDK, various J2SE 1.4 versions, and the free runtimes
# java-gcj-compat-dev and kaffe are tried.
JAVA_HOME=/usr/lib/jvm/java-6-sun

# Directory for per-instance configuration files and webapps. It contain the
# directories conf, logs, webapps, work and temp. See RUNNING.txt for details.
# Default: /var/lib/tomcat5.5
#CATALINA_BASE=/var/lib/tomcat5.5

# Arguments to pass to the Java virtual machine (JVM).
JAVA_OPTS="-jvm server -Djava.awt.headless=true -Xmx256M"

# Java compiler to use for translating JavaServer Pages (JSPs). You can use all
# compilers that are accepted by Ant's build.compiler property.
#JSP_COMPILER=jikes

# Use the Java security manager? (yes/no, default: yes)
# WARNING: Do not disable the security manager unless you understand
# the consequences!
# NOTE: java-gcj-compat-dev currently doesn't support a security
# manager. 
TOMCAT5_SECURITY=no

(hint, we disable the security manager because GeoServer is more like a desktop app, it changes
env variables, it writes to the file system, uses reflections, messes with java logging configuration and so on...
long story short, there is no way to make it work under a security manager).

  • change line 148 of /etc/init.d/tomcat55 to look like:
    find "$CATALINA_BASE"/temp/ -mindepth 1 -exec rm -rf {} +

    (hint, we changed rm -f to {{rm -rf }}, thanks Fabio for suggesting this}

  • drop geoserver.war in /var/lib/tomcat55/webapps
  • start up tomcat

If that does not work, have a look at /var/log/syslog since the default tomcat
output is redirected there.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Andrea Aime - 01/Dec/07 09:37 AM
Also, as added bonus:
  • install msttcorefonts to have good looking fonts (our demos use times new roman)
  • install mapserver-bin to have shptree available, this is needed to spatially index huge shapefiles, GeoServer built in indexer works only with small ones (50-100MB depending on how the memory is setup)

Andrea Aime - 03/Dec/07 01:01 PM
As an alternative to disable security manager it's possible to do the following (thank Jason):

but not across the entire tomcat deployment
(19.58.58) pickeringj: in /etc/tomcat5.5/policy.d/
(19.59.37) aaime: you gave all security permissions to geoserver there right?
(19.59.39) pickeringj: grant codeBase "file:/usr/share/tomcat5.5/webapps/geoserver/-" { (19.59.40) pickeringj: permission java.security.AllPermission; (19.59.43) pickeringj: };


Mantas - 13/Dec/07 05:14 AM
It would be better to make a package for every stable ubuntu and geoserver release (you can use Ubuntu's PPA )

Andrea Aime - 13/Dec/07 05:41 AM
Would be. Are you volounteering to make all the .deb packages? I would not know where to start

Mike Pumphrey - 22/Feb/08 11:13 AM
Does documentation exist anywhere for this type of install or are we starting from scratch?

Andrea Aime - 22/Feb/08 01:13 PM
There are some tips here: http://grimmeister.wordpress.com/2007/08/08/setting-up-an-open-geospatial-consortium-service-server/

However, I find it easier to follow the separate installation process for Tomcat 6 outlined here:
http://www.howtogeek.com/howto/linux/installing-tomcat-6-on-ubuntu/

and then just drop the .war in it.

Ah, of course the super-easy way would be to just the the .bin distribution, that does not even require a separate tomcat install,
just needs a jdk around and eventually a script to start/stop it as a service