Mapserver on Linux: Difference between revisions
Brian Wilson (talk | contribs) mNo edit summary |
Brian Wilson (talk | contribs) mNo edit summary |
||
Line 1: | Line 1: | ||
== | == How I built MapServer for CDS == | ||
=== Installation === | === Installation === | ||
Line 12: | Line 12: | ||
I built PHP/Mapscript to run under Apache 2.0.54 on a system based on | I built PHP/Mapscript to run under Apache 2.0.54 on a system based on | ||
[http://www.trustix.org/ Trustix Linux] 2.2. (This happens to be the system most readily available at the moment.) I have TSL 2.2 or 3.0 on all my servers. | [http://www.trustix.org/ Trustix Linux] 2.2. (This happens to be the system most readily available at the moment.) I have TSL 2.2 or 3.0 on all my servers. | ||
For performance reasons I want to use PHP as a loadable module so I am | For performance reasons I want to use PHP as a loadable module so I am | ||
building PHP/Mapscript | building PHP/Mapscript. | ||
Relevant installed packages with TSL 2.2 include | Relevant installed packages with TSL 2.2 include | ||
Line 26: | Line 24: | ||
'''zlib''' conpression library -- '''zlib''' and '''zlib-devel''' packages | '''zlib''' conpression library -- '''zlib''' and '''zlib-devel''' packages | ||
=== PHP === | |||
As mentioned above I have to build [http://www.php.net/ PHP] 4.4.0 | |||
Building requires the TSL packages: '''flex''', '''gcc''', '''make''', '''glibc-devel'''; generally these are required to build most anything. | Building requires the TSL packages: '''flex''', '''gcc''', '''make''', '''glibc-devel'''; generally these are required to build most anything. | ||
Line 43: | Line 43: | ||
--with-mysql ''only if you want builtin mysql support'' | --with-mysql ''only if you want builtin mysql support'' | ||
'' | Then the usual | ||
'' | |||
Projections | make | ||
su | |||
make install | |||
The 'make install' step will modify your httpd.conf file to include the module | |||
but you have to restart apache completely ('apachectl restart' will not work.) | |||
apachectl stop | |||
apachectl restart | |||
=== MapServer supporting cast of characters === | |||
==== Projections ==== | |||
[http://proj.maptools.org/ PROJ] 4.4.8 installed from RPM for Redhat. | |||
Proj includes a library for performing respective forward and inverse transformation of cartographic data to or from cartesian data with a wide range of selectable projection functions. | Proj includes a library for performing respective forward and inverse transformation of cartographic data to or from cartesian data with a wide range of selectable projection functions. | ||
Map file support -- Raster and Vector files | ==== Map file support -- Raster and Vector files ==== | ||
[http://www.gdal.org/ GDAL] 1.2.3<br> | [http://www.gdal.org/ GDAL] 1.2.3<br> | ||
Line 58: | Line 72: | ||
I built the entire GDAL package with './configure; make; make install' | I built the entire GDAL package with './configure; make; make install' | ||
=== Building MapServer === | |||
MapServer wanted me to install [http://sourceforge.net/project/showfiles.php?group_id=3157 Freetype] but there is no TSL Freetype so I installed | MapServer wanted me to install [http://sourceforge.net/project/showfiles.php?group_id=3157 Freetype] but there is no TSL Freetype so I installed | ||
Line 75: | Line 89: | ||
--with-gdal=/usr/local/bin/gdal-config --with-wfs \ | --with-gdal=/usr/local/bin/gdal-config --with-wfs \ | ||
--with-tiff \ | --with-tiff \ | ||
--with-php=.. | --with-php=../php-4.4.0 | ||
</pre> | </pre> | ||
Revision as of 23:18, 14 September 2005
How I built MapServer for CDS
Installation
The INSTALL file has this text in it: "Visit http://mapserver.gis.umn.edu/ for full documentation and installation instructions." It took me a good 30 minutes to find any useful documentation at the UMN site!
Look in their MapServerWiki. Here is a doc on MapServerCompilation
Server
I built PHP/Mapscript to run under Apache 2.0.54 on a system based on Trustix Linux 2.2. (This happens to be the system most readily available at the moment.) I have TSL 2.2 or 3.0 on all my servers.
For performance reasons I want to use PHP as a loadable module so I am building PHP/Mapscript.
Relevant installed packages with TSL 2.2 include
Apache 2.0.54 web server -- installed from apache TSL package
GD 2.0.33 graphics library -- installed from gd and gd-devel TSL packages
zlib conpression library -- zlib and zlib-devel packages
PHP
As mentioned above I have to build PHP 4.4.0 Building requires the TSL packages: flex, gcc, make, glibc-devel; generally these are required to build most anything.
The options I used for the PHP configure script are:
./configure \ --with-apxs2 \ --with-pear \ --with-gd --enable-gd-imgstrttf --with-freetype-dir=/usr \ --with-png-dir=/usr \ --with-xpm-dir=/usr/X11R6 \ this is probably not needed --enable-gd-native-ttf \ --with-zlib \ --with-gettext \ --with-xml \ --with-mysql only if you want builtin mysql support
Then the usual
make su make install
The 'make install' step will modify your httpd.conf file to include the module but you have to restart apache completely ('apachectl restart' will not work.)
apachectl stop apachectl restart
MapServer supporting cast of characters
Projections
PROJ 4.4.8 installed from RPM for Redhat. Proj includes a library for performing respective forward and inverse transformation of cartographic data to or from cartesian data with a wide range of selectable projection functions.
Map file support -- Raster and Vector files
GDAL 1.2.3
GDAL is the "Geospatial Data Abstraction Library".
GDAL is a translator library for raster geospatial data formats.
OGR The OGR library is a subcomponent of GDAL so you don't need to worry about it if you install GDAL. The OGR Simple Features Library allows MapServer users to display several types of vector data files in their native formats. For example, MapInfo Mid/Mif and TAB data do not need to be converted to ESRI shapefiles when using OGR support with MapServer.
I built the entire GDAL package with './configure; make; make install'
Building MapServer
MapServer wanted me to install Freetype but there is no TSL Freetype so I installed version 2.1.9 from source with the traditional './configure; make; make install',
The configuration I used for the actual MapServer build looks like this:
./configure \ --prefix=/usr/local/mapserver \ --with-httpd=/usr/sbin/httpd \ --with-gd=/usr/local \ --with-freetype \ --with-jpeg \ --with-proj \ --with-ogr=/usr/local/bin/gdal-config \ --with-gdal=/usr/local/bin/gdal-config --with-wfs \ --with-tiff \ --with-php=../php-4.4.0