Dipole Consulting SPRL

Building MapServer with MrSid support on CentOS 4.5 PDF Print E-mail

This article shows how to build a running php-mapscript service on a CentOS 4.5 server.

 

To get the MrSid support, you need to have login on Lizardtech website that allows you to download the DSDK 7.

 

Environment checks

 

yum install php-devel gcc4-c++ gd gd-devel php-gd php-dbase

 

Because the default compiler on CentOS 4.5 is gcc 3.4, and the DSDK is only available for gcc 3.2 and 4.1, I suggest to use the gcc 4.1 that is available from the yum archives.

 

Proj 4 installation

 

wget ftp://ftp.remotesensing.org/proj/proj-4.5.0.tar.gz
tar xzf proj-4.5.0.tar.gz
cd proj-4.5.0
CC=gcc4 CXX=g++4 ./configure
make
make install

 

GEOS installation


yum install swig
wget http://geos.refractions.net/geos-3.0.0rc4.tar.bz2
bunzip geos-3.0.0rc4.tar.gz2
tar xf geos-3.0.0rc4.tar
CC=gcc4
CXX=g++4 ./configure
make
make install


Add a /etc/ld.so.conf.d/mapserver.conf file with /usr/local/lib in it

[root@ssc geos-3.0.0rc4]# echo "/usr/local/lib" > /etc/ld.so.conf.d/mapserver.conf

 

GDAL installation


wget ftp://ftp.remotesensing.org/gdal/gdal-1.4.2.tar.gz
tar xzf gdal-1.4.2.tar.gz
cd gdal-1.4.2
CC=gcc4
CXX=g++4 ./configure --with-mrsid=/root/downloads/carto/Geo_DSDK-7.0.0.2167                                              make
make install


 

Mapserver installation

 

http://mapserver.gis.umn.edu/docs/howto/phpmapscript-install

wget http://download.osgeo.org/mapserver/mapserver-4.10.2.tar.gz
tar xzf mapserver-4.10.2.tar.gz
cd mapserver-4.10.2
CC=gcc4
CXX=g++4 ./configure --with-proj=/usr/local \
            --with-geos=/usr/local/bin/geos-config  \
            --with-ogr=/usr/local/bin/gdal-config  \
            --with-gdal=/usr/local/bin/gdal-config \
            --with-curl-config=/usr/bin/curl-config \
            --with-httpd=/usr/sbin/httpd  \
            --with-php=/usr/include/php > ../mapserver.config
make
cp mapscript/php3/php_mapscript.so /usr/lib/php/modules/
echo "extension=php_mapscript.so" > /etc/php.d/mapserver.ini

 That's it !

Last Updated ( mercredi, 17 septembre 2008 )
 
Next >
Main Menu
Home
Services
Products
References
Technical
Jobs
Downloads
Links
Contact Us
Login Form





Lost Password?
No account yet? Register