Working with OpenGeo Suite for Red Hat Linux

This document contains information about various tasks specific to OpenGeo Suite for Red Hat-based Linux distributions.

Starting and stopping OpenGeo services

OpenGeo Suite is comprised of two main services:

  1. The Tomcat web server that contains all the OpenGeo web applications such as GeoServer, GeoWebCache, and GeoExplorer.
  2. The PostgreSQL database server with the PostGIS spatial extensions.

On Red Hat based distributions the service command is used to control the services.

Controlling the Tomcat service

To start/stop/restart the Tomcat service:

service tomcat start|stop|restart

Note

Depending on the distribution and version the service name may be one of “tomcat”, “tomcat5”, or “tomcat6”. Use the service command to determine which one is installed:

service --status-all | grep tomcat

Controlling the PostgreSQL service

Before PostgreSQL service can be started it must first be initialized:

service postgresql-9.3 initdb

To start/stop/restart the PostgreSQL service:

service postgresql-9.3 start|stop|restart

Service port configuration

The Tomcat and PostgreSQL services run on ports 8080 and 5432 respectively. These ports can often conflict with existing services on the systemk, in which case the ports must be changed.

Changing the Tomcat port

To change the Tomcat port:

  1. Edit the file /etc/tomcat/server.xml.

    Note

    Depending on the distribution and version replace “tomcat” with “tomcat5” or “tomact6” accordingly. Use the service command to determine which one is installed:

    service --status-all | grep tomcat
    
  2. Search for “8080” (around line 75) and change the port attribute to the desired value.

  3. Restart tomcat.

    service tomcat restart
    

Changing the PostgreSQL port

To change the PostgreSQL port:

  1. Edit the file /var/lib/pgsql/9.3/data/postgresql.conf.

  2. Search or the port property (around line 63), uncomment and change it to the desired value.

  3. Restart PostgreSQL.

    service postgresql-9.3 restart
    

GeoServer Data Directory

The GeoServer Data Directory is the location on the file system where GeoServer stores all of its configuration, and optionally data. When working with GeoServer it is often necessary to know where this directory is. It is located at /var/lib/opengeo/geoserver.

You may wish to change this location to an alternate location, perhaps to use an existing GeoServer configuration. To do so:

  1. Edit the file /usr/share/opengeo/geoserver/WEB-INF/web.xml.
  2. Search for GEOSERVER_DATA_DIR and change its value accordingly.
  3. Restart Tomcat.

PostgreSQL Configuration

PostgreSQL configuration is controlled within the postgresql.conf file. This file is located at /var/lib/pgsql/9.3/data/postgresql.conf.

You will want to ensure you can connect to the database, and that you have a user to work with. Please see the section on Connecting to PostgreSQL on Linux for the first time.