Changes between Initial Version and Version 1 of RedHat9AndMapserver40


Ignore:
Timestamp:
Jan 26, 2009, 11:53:56 AM (15 years ago)
Author:
jmckenna
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • RedHat9AndMapserver40

    v1 v1  
     1= !RedHat9 and !MapServer40
     2
     3The 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:
     4
     5    * Added Xerces for WFS client support
     6    * Update to latest package versions
     7    * Use 'sudo' instead of running everything as root
     8    * Install PHP in /usr/local/php433 to allow multiple PHP installations to coexist
     9    * Install MapServer binaries as mapserv_40 and php_mapscript_40.so to allow multiple versions to coexist on the same box
     10
     11The 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.
     12
     13Daniel M, 2003-10-09
     14
     15== Build Notes ==
     16
     17{{{
     18# removed these and dependent rpms
     19sudo apt-get remove gd
     20sudo apt-get remove curl
     21sudo apt-get remove curl-devel
     22sudo apt-get remove php
     23
     24# already have following rpms installed
     25sudo apt-get install freetype freetype-devel
     26sudo apt-get install libpng libpng-devel
     27sudo apt-get install libtiff libtiff-devel zlib zlib-devel
     28sudo apt-get install libjpeg libjpeg-devel
     29#
     30# I'm assuming that you will be providing a non-commercial mapserver
     31# application, and then can use the PDFlib-Lite under their
     32# Alladin-type license. If not, you will need to either
     33# purchase the full PDFlib library or disable
     34wget http://www.pdflib.com/products/pdflib/download/PDFlib-Lite-5.0.2-Unix-src.tar.gz
     35tar xzf PDFlib-Lite-5.0.2-Unix-src.tar.gz
     36cd PDFlib-Lite-5.0.2-Unix-src
     37make clean
     38./configure
     39make
     40sudo make install
     41cd ..
     42
     43# download and build ming
     44wget http://www.opaque.net/ming/ming-0.2a.tgz
     45tar xzf ming-0.2a.tgz
     46cd ming-0.2a
     47make clean
     48make
     49make static
     50sudo make install
     51
     52cd ..
     53
     54# download and build curl
     55wget http://curl.haxx.se/download/curl-7.10.7.tar.gz
     56tar xzf curl-7.10.7.tar.gz
     57cd curl-7.10.7
     58make clean
     59./configure
     60make
     61sudo make install
     62
     63cd ..
     64
     65# add /usr/local/lib to /etc/ld.so.conf ...
     66# and run ldconfig
     67sudo /sbin/ldconfig
     68
     69# download and install gd-2 into /usr/local
     70rm -f /usr/lib/libgd.*     # to remove any potentially conflicts
     71wget http://www.boutell.com/gd/http/gd-2.0.15.tar.gz
     72tar xzf gd-2.0.15.tar.gz
     73cd gd-2.0.15
     74make clean
     75./configure
     76make
     77sudo make install
     78cd ..
     79
     80# download and build proj libraries
     81wget --passive-ftp ftp://ftp.remotesensing.org/pub/proj/proj-4.4.7.tar.gz
     82wget --passive-ftp ftp://ftp.remotesensing.org/pub/proj/proj-nad27-1.1.tar.gz
     83tar xzf proj-4.4.7.tar.gz
     84cd proj-4.4.7/nad
     85tar xzf ../../proj-nad27-1.1.tar.gz
     86cd ..
     87./configure
     88make
     89sudo make install
     90
     91cd ..
     92
     93# if you are going to use WMS/WFS then you might want to download and install
     94# a new epsg file with custom canadian projections and esri projections codes
     95wget http://www.maptools.org/dl/proj4-epsg-with-42xxx-and-esri.zip
     96unzip proj4-epsg-with-42xxx-and-esri.zip
     97sudo mv epsg /usr/local/share/proj/
     98
     99#download and install Xerces 1.6 (for GML support in OGR)
     100wget http://xml.apache.org/dist/xerces-c/stable/archives/Xerces-C_1_6_0/xerces-c-src1_6_0.tar.gz
     101tar xzf xerces-c-src1_6_0.tar.gz
     102cd xerces-c-src1_6_0
     103#set SERCESROOT to the xerces source directory
     104export XERCESCROOT=`pwd`
     105cd src
     106# The configure file in the distribution is not executable!
     107chmod +x ./configure
     108./configure
     109make
     110sudo make install
     111
     112sudo /sbin/ldconfig
     113
     114cd ../..
     115
     116
     117# download and install gdal-1.1.9
     118wget --passive-ftp ftp://ftp.remotesensing.org/pub/gdal/gdal-1.1.9.tar.gz
     119tar xzf gdal-1.1.9.tar.gz
     120cd gdal-1.1.9
     121make clean
     122./configure  --with-ogr --without-python --with-xerces
     123make
     124sudo make install
     125cd ..
     126
     127sudo /sbin/ldconfig
     128
     129# download and build php
     130#
     131# Note that I install PHP under /usr/local/php433 in order to allow
     132# multiple versions of PHP to coexist on my server
     133#
     134wget http://ca.php.net/get/php-4.3.3.tar.gz/from/ca2.php.net/mirror
     135tar xzf php-4.3.3.tar.gz
     136cd php-4.3.3
     137make clean
     138./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
     139make
     140sudo cp sapi/cgi/php /var/www/cgi-bin/php433
     141sudo make install
     142sudo cp php.ini-dist /usr/local/php433/php.ini
     143
     144# note: include brackets in the following command to keep your shell in current directory
     145(cd /usr/local/php433; sudo ln -s lib/php/extensions/no-debug-non-zts-20020429/ extensions)
     146
     147# edit your php.ini:
     148#diff /usr/local/php433/php.ini php.ini-dist
     149#428c428
     150#< extension_dir = "/usr/local/php433/extensions/"
     151#---
     152#> extension_dir = "./"
     153
     154cd ..
     155
     156
     157# download and build mapserver
     158wget http://cvs.gis.umn.edu/dist/mapserver-4.0.tar.gz
     159tar xzf mapserver-4.0.tar.gz
     160cd mapServer-4.0
     161rm -f config.cache
     162./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
     163
     164make clean
     165make
     166# DO NOT do a "make install"
     167
     168sudo cp mapserv /var/www/cgi-bin/mapserv_40
     169sudo cp mapscript/php3/php_mapscript.so /usr/local/php433/extensions/php_mapscript_40.so
     170
     171cd ..
     172
     173# add to /etc/httpd/conf/httpd.conf
     174
     175#
     176# For PHP scripts as CGI-BIN
     177#
     178#AddType application/x-httpd-php-cgi .php .php4 .phtml
     179#Action  application/x-httpd-php-cgi /cgi-bin/php433
     180
     181sudo /sbin/service httpd restart
     182
     183# create /var/www/html/ms_info.php
     184#<?php
     185#dl("php_mapscript_40.so");
     186#phpinfo();
     187#?>
     188
     189# check the output of http://yourhost/ms_info.php
     190# for mapserver support
     191}}}