Geomoose on RHEL: Difference between revisions

From Wildsong
Jump to navigationJump to search
Brian Wilson (talk | contribs)
m Created page with '== versions == Really it's CentOS but who is asking? 6.2 I think. And Geomoose 2.6.1 == prerequisite packages == # Always a good first step yum update Recommended by the G…'
 
Brian Wilson (talk | contribs)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
== versions ==
== Versions ==


Really it's CentOS but who is asking?
Really it's CentOS but who is asking?
Line 5: Line 5:
And Geomoose 2.6.1
And Geomoose 2.6.1


== prerequisite packages ==
== 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 http://yum.postgresql.org/9.1/redhat/rhel-6-x86_64/pgdg-centos91-9.1-4.noarch.rpm
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
  # Always a good first step
Line 12: Line 32:
Recommended by the Geomoose page: php5 php5-dev php5-gd php5-pgsql php5-sqlite php-pear php5-curl
Recommended by the Geomoose page: php5 php5-dev php5-gd php5-pgsql php5-sqlite php-pear php5-curl


jpeg
sudo yum install php php-devel php-gd php-pear-Net-Curl  
gif
sudo yum install zlib-devel
tiff
 
sphinx-tools if I want docs
 
RHEL
 
yum install php php-devel php-gd php-pear-Net-Curl  


'''SQLite''' I don't see a php sqlite package for RHEL
'''SQLite''' I don't see a php sqlite package for RHEL
Doing a package install of '''php-pgsql''' forces the installation of postgreslql-libs 8.4 which is way too old.
I am running PostgreSQL 9.1 along with PostGIS 2


=== mapserver ===
=== mapserver ===
Line 49: Line 59:
  make
  make
  sudo make install
  sudo make install
sudo ldconfig
It should say:
Libraries have been installed in:
/usr/lib64/php/modules
To see if it's bound correctly, I check thusly
ldd /usr/lib64/php/modules/php_mapscript.so | grep libpq
libpq.so.5 => '''/usr/pgsql-9.1/lib/libpq.so.5''' (0x00007fe3fe65e000)
I get the extension to load by doing this:


Libraries have been installed in:
cd /etc/php.d/
  /usr/local/lib/php/extensions/no-debug-non-zts-20100525
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/php_mapscript.so >> mapscript.ini'
sudo apachectl restart

Latest revision as of 14:57, 7 May 2013

Versions

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 http://yum.postgresql.org/9.1/redhat/rhel-6-x86_64/pgdg-centos91-9.1-4.noarch.rpm
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

mapserver

wget http://download.osgeo.org/mapserver/mapserver-6.2.1.tar.gz
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 \
--with-zlib
make
sudo make install
sudo ldconfig

It should say:

Libraries have been installed in:
/usr/lib64/php/modules

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

ldd /usr/lib64/php/modules/php_mapscript.so | grep libpq

libpq.so.5 => /usr/pgsql-9.1/lib/libpq.so.5 (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/php_mapscript.so >> mapscript.ini'
sudo apachectl restart