Geomoose on RHEL

From Bellman
Revision as of 06:57, 7 May 2013 by Brian Wilson (talk | contribs) (→‎Prerequisite packages)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Really it's CentOS but who is asking? 6.2 I think. And Geomoose 2.6.1

== PostgreSQL

The default postgresql packages are far too old (8.4 vs 9.1 or 9.2) for Geomoose.

When installing a newer PostgreSQL on RHEL, use the postgres developer group RPM repository. If you already have a version of PostgreSQL running then you will need to deal with migrating the data and config.

sudo rpm -ivh
sudo yum install postgresql91-server postgresql91-contrib postgresql91-devel
sudo ldconfig

If you don't have a version of postgresql install then

sudo service postgresql-9.1 initdb

(then edit the pg_hba.conf and postgresql.conf files in /var/lib/pgsql/9.1/data

sudo chkconfig postgresql-9.1 on
sudo service postgresql-9.1 start

Prerequisite packages

# Always a good first step
yum update

Recommended by the Geomoose page: php5 php5-dev php5-gd php5-pgsql php5-sqlite php-pear php5-curl

sudo yum install php php-devel php-gd php-pear-Net-Curl 
sudo yum install zlib-devel

SQLite I don't see a php sqlite package for RHEL


tar xzvf mapserver-6.2.1.tar.gz 
cd mapserver-6.2.1
./configure \
--with-php \
--with-agg \
--with-gd \
--with-wfs \
--with-wmsclient \
--with-wfsclient \
--with-postgis \
--with-proj \
--with-geos \
--with-freetype \
--with-gdal \
--with-ogr \
--with-python \
sudo make install
sudo ldconfig

It should say:

Libraries have been installed in:

To see if it's bound correctly, I check thusly

ldd /usr/lib64/php/modules/ | grep libpq => /usr/pgsql-9.1/lib/ (0x00007fe3fe65e000)

I get the extension to load by doing this:

cd /etc/php.d/
sudo sh -c 'echo "# Enable mapserver mapscript extension" > mapscript.ini'
sudo sh -c 'echo extension=/usr/local/lib/php/extensions/no-debug-non-zts-20100525/ >> mapscript.ini'
sudo apachectl restart