Installation on CentOS

This section describes specific installation procedure for EOxServer on CentOS GNU/Linux based operating systems. In this example, a raw CentOS 6.4 minimal image is used.

This guide is assumed (but not tested) to be applicable also for equivalent versions of the prominent North American Enterprise Linux and its clones.

See also

Prerequisites

This example requires a running CentOS installation with superuser privileges available.

Installation from RPM Packages

Preparation of RPM Repositories

The default repositories of CentOS do not provide all software packages required for EOxServer, and some packages are only provided in out-dated versions. Thus several further repositories have to be added to the system’s list.

The first one is the ELGIS (Enterprise Linux GIS) repository which can be added with the following yum command:

sudo rpm -Uvh http://elgis.argeo.org/repos/6/elgis-release-6-6_0.noarch.rpm

The second repository to be added is EPEL (Extra Packages for Enterprise Linux) again via a simple yum command:

sudo yum install epel-release

Finally EOxServer is available from the yum repository at packages.eox.at. This repository offers current versions of packages like MapServer as well as custom built ones with extra drivers enabled like GDAL and/or with patches applied like libxml2. It is not mandatory to use this repository as detailed below but it is highly recommended in order for all features of EOxServer to work correctly. The repository is again easily added via a single yum command:

sudo rpm -Uvh http://yum.packages.eox.at/el/eox-release-6-2.noarch.rpm

Installing EOxServer

Once the RPM repositories are configured EOxServer and all its dependencies are installed via a single command:

sudo yum install EOxServer

To update EOxServer simply run the above command again or update the whole system with:

sudo yum update

Please carefully follow the migration/update procedure corresponding to your version numbers for any configured EOxServer instances in case of a major version upgrade.

Further packages may be required if additional features (e.g: a full DBMS) are desired. The following command for example installs all packages needed when using SQLite:

sudo yum install sqlite libspatialite python-pysqlite python-pyspatialite

Alternatively the PosgreSQL DBMS can be installed as follows:

sudo yum install postgresql postgresql-server postgis python-psycopg2

To run EOxServer behind the Apache web server requires the installation of this web server:

sudo yum install httpd mod_wsgi

Now that EOxServer is properly installed the next step is to create and configure a service instance.

Alternate installation method using pip

Required Software Packages

The installation via pip builds EOxServer from its source. Thus there are some additional packages required which can be installed using:

sudo yum install gdal gdal-python gdal-devel mapserver mapserver-python \
                 libxml2 libxml2-python python-lxml python-pip \
                 python-devel gcc

Installing EOxServer

For the installation of Python packages pip is used, which itself was installed in the previous step. It automatically resolves and installs all dependencies. So a simple:

sudo pip-python install eoxserver

suffices to install EOxServer itself.

To upgrade an existing installation of EOxServer simply add the --upgrade switch to your pip command:

sudo pip-python install --upgrade eoxserver

Please don’t forget to follow the update procedure for any configured EOxServer instances in case of a major version upgrade.

Now that EOxServer is properly installed the next step is to create and configure a service instance.

Special pysqlite considerations

When used with spatialite EOxServer also requires pysqlite and pyspatialite which can be either installed as RPMs from packages.eox.at (see Installing EOxServer above) or from source.

If installing from source please make sure to adjust the SQLITE_OMIT_LOAD_EXTENSION parameter in setup.cfg which is set by default but not allowed for EOxServer. The following provides a complete installation procedure:

sudo yum install libspatialite-devel geos-devel proj-devel
sudo pip-python install pyspatialite
wget https://pysqlite.googlecode.com/files/pysqlite-2.6.3.tar.gz
tar xzf pysqlite-2.6.3.tar.gz
cd pysqlite-2.6.3
sed -e '/^define=SQLITE_OMIT_LOAD_EXTENSION$/d' -i setup.cfg
sudo python setup.py install

If the installation is rerun the --upgrade respectively the --force flag have to be added to the pip-python and python commands in order to actually redo the installation:

sudo pip-python install --upgrade pyspatialite
sudo python setup.py install --force