-
Notifications
You must be signed in to change notification settings - Fork 2
RedHat9AndMapserver40
The following are build notes for installing !MapServer 4.0 on a new installation of !RedHat 9. This is a slightly modified version of the [wiki:RedHat9AndMapserver40b] from Erich Schroeder, with the following changes:
* Added Xerces for WFS client support
* Update to latest package versions
* Use 'sudo' instead of running everything as root
* Install PHP in /usr/local/php433 to allow multiple PHP installations to coexist
* Install MapServer binaries as mapserv_40 and php_mapscript_40.so to allow multiple versions to coexist on the same box
The first steps of those instructions assume that you installed the port of "apt" for rpm-based distributions, available at http://freshrpms.net/apt/. You can download apt from http://shrike.freshrpms.net/rpm.html?id=650.
Daniel M, 2003-10-09
== Build Notes ==
{{{
sudo apt-get remove gd
sudo apt-get remove curl
sudo apt-get remove curl-devel
sudo apt-get remove php
sudo apt-get install freetype freetype-devel
sudo apt-get install libpng libpng-devel
sudo apt-get install libtiff libtiff-devel zlib zlib-devel
sudo apt-get install libjpeg libjpeg-devel
wget http://www.pdflib.com/products/pdflib/download/PDFlib-Lite-5.0.2-Unix-src.tar.gz
tar xzf PDFlib-Lite-5.0.2-Unix-src.tar.gz
cd PDFlib-Lite-5.0.2-Unix-src
make clean
./configure
make
sudo make install
cd ..
wget http://www.opaque.net/ming/ming-0.2a.tgz
tar xzf ming-0.2a.tgz
cd ming-0.2a
make clean
make
make static
sudo make install
cd ..
wget http://curl.haxx.se/download/curl-7.10.7.tar.gz
tar xzf curl-7.10.7.tar.gz
cd curl-7.10.7
make clean
./configure
make
sudo make install
cd ..
sudo /sbin/ldconfig
rm -f /usr/lib/libgd.* # to remove any potentially conflicts
wget http://www.boutell.com/gd/http/gd-2.0.15.tar.gz
tar xzf gd-2.0.15.tar.gz
cd gd-2.0.15
make clean
./configure
make
sudo make install
cd ..
wget --passive-ftp ftp://ftp.remotesensing.org/pub/proj/proj-4.4.7.tar.gz
wget --passive-ftp ftp://ftp.remotesensing.org/pub/proj/proj-nad27-1.1.tar.gz
tar xzf proj-4.4.7.tar.gz
cd proj-4.4.7/nad
tar xzf ../../proj-nad27-1.1.tar.gz
cd ..
./configure
make
sudo make install
cd ..
wget http://www.maptools.org/dl/proj4-epsg-with-42xxx-and-esri.zip
unzip proj4-epsg-with-42xxx-and-esri.zip
sudo mv epsg /usr/local/share/proj/
#download and install Xerces 1.6 (for GML support in OGR)
wget http://xml.apache.org/dist/xerces-c/stable/archives/Xerces-C_1_6_0/xerces-c-src1_6_0.tar.gz
tar xzf xerces-c-src1_6_0.tar.gz
cd xerces-c-src1_6_0
#set SERCESROOT to the xerces source directory
export XERCESCROOT=pwd
cd src
chmod +x ./configure
./configure
make
sudo make install
sudo /sbin/ldconfig
cd ../..
wget --passive-ftp ftp://ftp.remotesensing.org/pub/gdal/gdal-1.1.9.tar.gz
tar xzf gdal-1.1.9.tar.gz
cd gdal-1.1.9
make clean
./configure --with-ogr --without-python --with-xerces
make
sudo make install
cd ..
sudo /sbin/ldconfig
wget http://ca.php.net/get/php-4.3.3.tar.gz/from/ca2.php.net/mirror
tar xzf php-4.3.3.tar.gz
cd php-4.3.3
make clean
./configure --enable-shared --with-regex=system --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib --with-gd=/usr/local --with-freetype-dir=/usr --enable-force-cgi-redirect --enable-dbase --with-pdflib --with-mysql --with-config-file-path=/usr/local/php433/ --prefix=/usr/local/php433
make
sudo cp sapi/cgi/php /var/www/cgi-bin/php433
sudo make install
sudo cp php.ini-dist /usr/local/php433/php.ini
(cd /usr/local/php433; sudo ln -s lib/php/extensions/no-debug-non-zts-20020429/ extensions)
#diff /usr/local/php433/php.ini php.ini-dist
#428c428
#< extension_dir = "/usr/local/php433/extensions/"
#---
#> extension_dir = "./"
cd ..
wget http://cvs.gis.umn.edu/dist/mapserver-4.0.tar.gz
tar xzf mapserver-4.0.tar.gz
cd mapServer-4.0
rm -f config.cache
./configure --without-tiff --without-eppl --with-threads --with-proj --with-gdal=/usr/local/bin/gdal-config --with-ogr --with-php=../php-4.3.3 --with-gd=/usr/local --with-freetype=/usr/bin --with-pdf --with-ming --with-wmsclient --with-wfs --with-wfsclient
make clean
make
sudo cp mapserv /var/www/cgi-bin/mapserv_40
sudo cp mapscript/php3/php_mapscript.so /usr/local/php433/extensions/php_mapscript_40.so
cd ..
#AddType application/x-httpd-php-cgi .php .php4 .phtml
#Action application/x-httpd-php-cgi /cgi-bin/php433
sudo /sbin/service httpd restart
#
check the output of http://yourhost/ms_info.php
}}