| 1 | = !RedHat9 and !MapServer40b |
| 2 | |
| 3 | The following are my build notes for installing !MapServer 4.0b on a new installation of !RedHat 9. This is based on the RedHat8AndMapserver37 build notes, but modified to include newer libraries and make it fit my style of redhat installation. Some additions to the RedHat8AndMapserver37 page may apply here. |
| 4 | |
| 5 | One thing that I do on all redhat installations now is to install the port of "apt" for rpm-based distributions, available at http://freshrpms.net/apt/. When I did the fresh install of RH9 for this mapserver server, I did a fairly minimal install; really just enough to have ssh, httpd, text-based internet, and general development. Then I downloaded apt from http://shrike.freshrpms.net/rpm.html?id=650, installed the rpm and ran: |
| 6 | |
| 7 | apt-get update |
| 8 | apt-get upgrade |
| 9 | |
| 10 | to get all of the RH9 updates. As I run up against libraries or commands that are missing, and available in standard rpms, I then run "apt-get install 'rpmname'" to get things working. |
| 11 | |
| 12 | I run all these commands as root, so be careful, particularly if this is anything like a production machine. When I use this, I have the text in window, and I cut-and-paste to my Eterm to run the commands. This could almost be a script, or group of scripts with a menu, similar to http://www.apachetoolbox.com/. |
| 13 | |
| 14 | Erich |
| 15 | |
| 16 | July 14, 2003, modified to handle the beta2 file of mapserver. |
| 17 | |
| 18 | == Build Notes == |
| 19 | |
| 20 | {{{ |
| 21 | # removed these and dependent rpms |
| 22 | # moved the following to the end: apt-get remove gd |
| 23 | # Reason: Too many dependencies on php caused the command to crash if php wasn't removed first G. Creager 2003-11-16 |
| 24 | apt-get remove curl |
| 25 | apt-get remove curl-devel |
| 26 | apt-get remove php |
| 27 | apt-get remove gd |
| 28 | |
| 29 | # already have following rpms installed |
| 30 | apt-get install freetype freetype-devel |
| 31 | apt-get install libpng libpng-devel |
| 32 | apt-get install libtiff libtiff-devel zlib zlib-devel |
| 33 | apt-get install libjpeg libjpeg-devel |
| 34 | # |
| 35 | # I'm assuming that you will be providing a non-commercial mapserver |
| 36 | # application, and then can use the PDFlib-Lite under their |
| 37 | # Alladin-type license. If not, you will need to either |
| 38 | # purchase the full PDFlib library or disable |
| 39 | |
| 40 | # Doesn't respond to wget anymore: |
| 41 | #wget http://www.pdflib.com/products/pdflib/download/PDFlib-Lite-5.0.1-Unix-src.tar.gz |
| 42 | # So get: |
| 43 | wget http://www.pdflib.com/products/pdflib/download/PDFlib-Lite-5.0.2-Unix-src.tar.gz |
| 44 | tar xzf PDFlib-Lite-5.0.2-Unix-src.tar.gz |
| 45 | cd PDFlib-Lite-5.0.2-Unix-src |
| 46 | make clean |
| 47 | ./configure |
| 48 | make |
| 49 | make install |
| 50 | cd .. |
| 51 | |
| 52 | # download and build ming |
| 53 | wget http://www.opaque.net/ming/ming-0.2a.tgz |
| 54 | tar xzf ming-0.2a.tgz |
| 55 | cd ming-0.2a |
| 56 | make clean |
| 57 | make |
| 58 | make static |
| 59 | make install |
| 60 | |
| 61 | cd .. |
| 62 | |
| 63 | # download and build curl |
| 64 | wget http://curl.haxx.se/download/curl-7.10.5.tar.gz |
| 65 | tar xzf curl-7.10.5.tar.gz |
| 66 | cd curl-7.10.5 |
| 67 | make clean |
| 68 | ./configure |
| 69 | make |
| 70 | make install |
| 71 | |
| 72 | cd .. |
| 73 | |
| 74 | # add /usr/local/lib to /etc/ld.so.conf |
| 75 | /sbin/ldconfig |
| 76 | |
| 77 | # download and install gd-2 into /usr/local |
| 78 | rm -f /usr/lib/libgd.* # to remove any potentially conflicts |
| 79 | wget http://www.boutell.com/gd/http/gd-2.0.15.tar.gz |
| 80 | tar xzf gd-2.0.15.tar.gz |
| 81 | cd gd-2.0.15 |
| 82 | make clean |
| 83 | ./configure |
| 84 | make |
| 85 | make install |
| 86 | cd .. |
| 87 | |
| 88 | # download and install gdal-1.1.8 |
| 89 | wget --passive-ftp ftp://ftp.remotesensing.org/pub/gdal/gdal-1.1.8.tar.gz |
| 90 | tar xzf gdal-1.1.8.tar.gz |
| 91 | cd gdal-1.1.8 |
| 92 | make clean |
| 93 | ./configure --with-libz --with-png --with-libtiff=internal --with-geotiff=internal --with-jpeg --without-jasper --without-python |
| 94 | make |
| 95 | make ogr-all |
| 96 | make install |
| 97 | cd .. |
| 98 | |
| 99 | /sbin/ldconfig |
| 100 | |
| 101 | # download and build php |
| 102 | wget http://us2.php.net/get/php-4.3.2.tar.gz/from/us3.php.net/mirror |
| 103 | tar xzf php-4.3.2.tar.gz |
| 104 | cd php-4.3.2 |
| 105 | make clean |
| 106 | rm -f config.cache |
| 107 | ./configure --enable-force-cgi-redirect --with-config-file-path=/etc/httpd/ --with-gd=/usr/local --with-jpeg-dir=/usr/lib --with-png-dir=/usr/lib --with-tiff-dir=/usr/lib --with-zlib-dir=/usr/lib --with-freetype-dir --without-ttf --with-pdflib --with-mysql --with-regex=system --with-ming --enable-dbase --enable-dbx --enable-versioning |
| 108 | |
| 109 | make |
| 110 | cp sapi/cgi/php /var/www/cgi-bin |
| 111 | make install |
| 112 | cp php.ini-dist /etc/httpd/php.ini |
| 113 | # change the following as appropriate |
| 114 | #diff /etc/httpd/php.ini php.ini-dist |
| 115 | #423c423 |
| 116 | #< extension_dir = /etc/httpd/php_mods |
| 117 | #--- |
| 118 | #> extension_dir = ./ |
| 119 | cd .. |
| 120 | |
| 121 | |
| 122 | # download and build proj libraries |
| 123 | wget --passive-ftp ftp://ftp.remotesensing.org/pub/proj/proj-4.4.7.tar.gz |
| 124 | wget --passive-ftp ftp://ftp.remotesensing.org/pub/proj/proj-nad27-1.1.tar.gz |
| 125 | tar xzf proj-4.4.7.tar.gz |
| 126 | cd proj-4.4.7/nad |
| 127 | tar xzf ../../proj-nad27-1.1.tar.gz |
| 128 | cd .. |
| 129 | ./configure |
| 130 | make |
| 131 | make install |
| 132 | |
| 133 | /sbin/ldconfig |
| 134 | cd .. |
| 135 | |
| 136 | |
| 137 | # download and build mapserver |
| 138 | #wget http://mapserver.gis.umn.edu/dist/mapserver-4.0b.tar.gz |
| 139 | wget http://cvs.gis.umn.edu/dist/mapserver-4.0-beta2.tar.gz |
| 140 | tar xzf mapserver-4.0-beta2.tar.gz |
| 141 | cd mapServer-4.0-beta2 |
| 142 | rm -f config.cache |
| 143 | ./configure --without-tiff --without-eppl --without-jpeg --with-threads --with-proj --with-gdal=/usr/local/bin --with-php=../php-4.3.2 --with-gd=/usr/local --with-freetype=/usr/bin --with-pdf --with-ogr --with-gdal --with-ming --with-wmsclient --with-wfs --with-wfs-client |
| 144 | |
| 145 | make clean |
| 146 | make |
| 147 | # DO NOT do a "make install" |
| 148 | |
| 149 | cp legend mapserv scalebar /var/www/cgi-bin |
| 150 | mkdir /etc/httpd/php_mods/ |
| 151 | cp mapscript/php3/php_mapscript.so /etc/httpd/php_mods/ |
| 152 | |
| 153 | cd .. |
| 154 | |
| 155 | # add to /etc/httpd/conf/httpd.conf |
| 156 | |
| 157 | # |
| 158 | # For PHP scripts as CGI-BIN |
| 159 | # |
| 160 | #AddType application/x-httpd-php-cgi .php .php4 .phtml |
| 161 | #Action application/x-httpd-php-cgi /cgi-bin/php |
| 162 | |
| 163 | service httpd restart |
| 164 | |
| 165 | # create /var/www/html/ms_info.php |
| 166 | #<?php |
| 167 | #dl("php_mapscript.so"); |
| 168 | #phpinfo(); |
| 169 | #?> |
| 170 | |
| 171 | # check the output of http://yourhost/ms_info.php |
| 172 | # for mapserver support |
| 173 | }}} |
| 174 | |
| 175 | Erich Schroeder |