Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Table of Contents

...

introduction

This page tells you how to install Geoserver.

...

Because it is CPU intensive, we take all measures recommended by Geoserver to improve performance.

java

The Geoserver team strongly recommends using the latest proprietary sun JDK.

...

Code Block
$ which java
path_is_echoed_to_screen

java installation (linux)

"Alternatives" is one way that to allow multiple versions of JVMs to run on a single host.
We do not have to use the alternatives framework - in fact for the tomcat init, we point to the jdk/jre directly.
todo - Could use some best practices here.

...

java advanced imaging (JAI)

To get the best performance, be sure to install the JAI libraries.

...

  • install java jdk not jre only
    • if you use jre only subsequent step fails
  • download the jai jre package
    • wget "http://download.java.net/media/jai/builds/release/1_1_3/jai-1_1_3-lib-linux-i586-jre.bin"
  • cd into your JDK's jre dir
  • run /bin/sh /tmp/jai-1_1_3-lib-linux-i586-jre.bin
    Is this a little bit counter-intuitive to you too?

java fonts

To get the nice fonts you are used to you need to install them on linux systems.

...

I am not documenting because I think this will be slightly different on any given system.

tomcat

After installing java, try to start tomcat.

...

TODO - applogic school
When want geoserver to have lots of memory, so we need to make sure the JVM under tomcat has the right JAVA_OPTS -Xmx. Is this simply set in the UI resources? Right now the MAX is at 64GB - which seems wrong. Someone spent a lot of time trying to intelligently pick an Xmx value in /appliance/appliance.sh. In any case, we want something right around 2-4GB here. Beyond that and GC may be overworked?

tomcat native acceleration

Concensus is that tomcat native acceleration is worth the trouble.

...

Inspect tomcat log file to make sure it's working.

Running tomcat at boot up

append the line to /etc/rc.d/rc.local

Code Block

tomcat5 start

tomcat logging

TODO - logging should say when it is using tcnative or not.

...

Geoserver takes care of its own logging.

tomcat test

To make sure it's working, ssh onto the host and

...

and make sure there is a java process and see what port it is listening on.

tomcat configuration

The tomcat server configuration file is called server.xml.

...

Code Block
1 <?xml version="1.0" encoding="UTF-8"?>

2 <Server port="8005" shutdown="SHUTDOWN"> 
3   <GlobalNamingResources> 
4   </GlobalNamingResources>

5   <Service name="Catalina"> 
6     <Connector port="8080" maxThreads="100" address="in" /> 
7     <Connector port="8080" maxThreads="100" address="localhost" />

8     <Connector port="8009" protocol="AJP/1.3" address="in" /> 
9     <Engine name="Catalina" defaultHost="localhost"> 
10       <Host name="localhost" appBase="webapps">

11       </Host> 
12     </Engine> 
13   </Service>

14 </Server> 

To make this happen we must add a new line in /appliance/appliance.sh bettwen 171 and 172.

Code Block
171 config[$index]="    <Connector port=\"${_tomcat_port}\" maxThreads=\"${_max_connections}\" address=\"in\" />" && ((index++)) 
    config[$index]="    <Connector port=\"${_tomcat_port}\" maxThreads=\"${_max_connections}\" address=\"localhost\" />" && ((index++))

172 config[$index]='    <Connector port="8009" protocol="AJP/1.3" address="in" />' && ((index++)) 

geoserver introduction

install

Download the war file, and drop it into the TOMCAT webapps dir.
Put the data dir in a separate location.

...

Finally copy the configuration files into geoserver_configuration.

paletted images

We use a paletted images to improve map image quality and maintain performance.

applogic introduction

applogic startup sequence

  • /appliance/appliance.sh
    • overwrites /appliance/tomcat/conf/server.xml (1)
    • sets tomcat port and max connections
    • sources /etc/applogic.sh
      • /etc/applogic.sh: key value paris written from applogic UI
      • where does the UI application store data?
      • sets tomcat port to 8080
    • set and export JAVA_OPTS
    • calls /usr/apache-tomcat-5.5.27/bin/startup.sh
      • calls ./catalina.sh
        • calls ./setclasspath.sh
        • set JAVA_HOME
        • set JRE_HOME
        • set CATALINA_HOME
        • set CLASSPATH
        • execute java - tomcat startup

(1) but does not add in server-minimal.xml
this is why it does not listen on localhost!

applogic file system

The tomcat home is here

  • /appliance/tomcat
    which contain symlinks to
  • /mnt/fs/prod_app/
    which is where we see web_apps and the like.

read more