[Mapserver-users] Mandrake 9.1 - installation of MapServer
Yann
st027364 at ait.ac.th
Fri May 2 03:41:15 PDT 2003
Modified list from the MapServer WIKI RedHat8.0
April 02, 2003
Yann Chemin and Prasad Bauchkar
Asian Institute of Technology, Thailand
When "#" is put in front of an command, it means we did not use it
Build Notes
#downloads
Gd => http://www.boutell.com/gd/http/gd-2.0.12.tar.gz
Freetype =>
http://prdownloads.sourceforge.net/freetype/freetype-2.1.4.tar.gz?download
LibTiff =>
ftp://ftp.remotesensing.org/pub/libtiff/tiff-v3.6.0-beta.tar.gz
proj4 => ftp://ftp.remotesensing.org/pub/proj/proj-4.4.7.tar.gz
Shapelib => ftp://gdal.velocet.ca/pub/outgoing/shapelib-1.2.10.tar.gz
PHP => http://www.php.net/get/php-4.3.1.tar.gz/from/au.php.net/mirror
#http://snaps.php.net/
# removed these and dependent rpms
# rpm -e gd
rpm -e curl-7.10.3-1
# rpm -e curl-devel-7.9.8-1
rpm -e php
# already have rpm installed
rpm -q libpng3-1.2.5-2mdk
rpm -q libpng3-devel-1.2.5-2mdk
rpm -q libjpeg62-6b-26mdk
rpm -q libjpeg62-devel-6b-26mdk
# download and install pdflib
#http://www.pdflib.com/products/pdflib/download/PDFlib-5.0.0-Linux.tar.gz
#http://search.cpan.org/CPAN/authors/id/M/MS/MSERGEANT/PDFLib-0.12.tar.gz
#tar xzf PDFLib-5.0.0-Linux.tar.gz
#tar xzf PDFLib-0.12.tar.gz
#I gave up on this one, better find the RPM if we have time
# download and build ming
http://prdownloads.sourceforge.net/ming/ming-0.2a.tgz?download
tar xzf ming-0.2a.tgz
cd ming-0.2a
make
make static
make install
# download and build curl
ftp.wau.nl/pub/Mandrake/9.1/i586/Mandrake/RPMS/bison-1.35-3mdk.i586.rpm
urpmi bison-1.35-3mdk.i586.rpm
ftp.wau.nl/pub/Mandrake/9.1/SRPMS/curl-7.10.3-1mdk.src.rpm
urpmi --install-src curl-7.10.3-1mdk.src.rpm
gzip -d /usr/src/RPM/SOURCES/curl-7.10.3-1.tar.bz2 /home/yann/tmp
cd curl-7.10.3
./configure
make
make install
# add /usr/local/lib to /etc/ld.so.conf
/sbin/ldconfig
# download and install gd-2 into /usr/local
#rm -f /usr/lib/libgd.* # to remove any potentially conflicts
tar xzf gd-2.0.11.tar.gz
cd gd-2.0.11
./configure
make
make install
# download and install gdal-1.1.8
tar xzf gdal-1.1.8.tar.gz
cd gdal-1.1.8
./configure \
--with-libz \
--with-png \
--with-libtiff=internal \
--with-geotiff=internal \
--with-jpeg \
--without-jasper \
--without-python
make
make ogr-all
make install
/sbin/ldconfig
# download and build php-4.3.0
ftp.wau.nl/pub/Mandrake/9.1/i586/RPMS/flex-2.5.4a-20mdk.i586.rpm
urpmi flex-2.5.4a-20mdk.i586.rpm
tar xzf php-4.3.0.tar.gz
cd php-4.3.0
rm -f config.cache
./configure \
--enable-force-cgi-redirect \
--enable-discard-path \
--with-config-file-path=/etc/httpd/ \
--with-gd=/usr/local \
--with-jpeg-dir \
--with-png-dir \
--with-zlib-dir \
--with-freetype-dir \
--without-ttf \
--with-pdflib \ #removed
--with-mysql \
--with-regex=system \
--with-ming \
--enable-dbase \
--enable-dbx \
--enable-versioning
make
cp sapi/cgi/php /var/www/cgi-bin
make install
cp php.ini-dist /etc/httpd/php.ini
# change the following as appropriate
diff -s /etc/httpd/php.ini php.ini-dist
Files /etc/httpd/php.ini and php.ini-dist are identical
#423c423
#< extension_dir = /etc/httpd/php_mods
#---
#> extension_dir = ./
# download and build proj libraries
tar xzf proj-4.4.7.tar.gz
cd proj-4.4.7
./configure
make
make install
/sbin/ldconfig
# download and build mapserver-3.7
tar xzf mapserver-3.7.tgz
cd mapServer-3.7
rm -f config.cache
./configure \
--without-tiff \
--without-eppl \
--without-jpeg \
--with-threads \
--with-proj \
--with-gdal=/usr/local/bin \
--with-php=../php4-STABLE-200305010930 \
--with-gd=/usr/local \
--with-freetype=/usr/bin \
--without-pdf \
--with-ogr \
--with-gdal \
--with-ming \
--with-wmsclient \
--with-wfs \
--with-wfs-client
#I did not get the following message during my build
#--------------------------------------------------------
# I got an undefined "_snprintf" which required changing
# mswmslayer.c to #include <stdio.h>
# and replace "_snprintf" with "snprintf"
#--------------------------------------------------------
make
# DO NOT do a "make install"
cp legend mapserv scalebar /var/www/cgi-bin
#No /php_mods/ in /etc/httpd/ !
#cp mapscript/php3/php_mapscript.so /etc/httpd/php_mods/
cp /home/yann/mapserver_dev/mapscript/php3/php_mapscript.so
/usr/lib/php/extensions/php_mapscript.so
# add to /etc/httpd/conf/httpd.conf
#
# For PHP scripts as CGI-BIN
#
AddType application/x-httpd-php-cgi .php .php4 .phtml
Action application/x-httpd-php-cgi /cgi-bin/php
/etc/rc.d/init.d/httpd restart
# create /var/www/html/info.php
<?php
dl("php_mapscript.so");
phpinfo();
?>
# check the output of http://yourhost/info.php
# for mapserver support
--
Yann <st027364 at ait.ac.th>
AIT
More information about the MapServer-users
mailing list