<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5261504130861186800</id><updated>2024-09-01T20:08:24.864-07:00</updated><title type='text'>Mapserver installation on Linux or Solaris</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sudhendra.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5261504130861186800/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://sudhendra.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>SSK</name><uri>http://www.blogger.com/profile/02407950941507356678</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5261504130861186800.post-8023226869885668901</id><published>2010-02-28T18:42:00.000-08:00</published><updated>2010-02-28T19:56:59.625-08:00</updated><title type='text'>Mapserver installation on Linux or Solaris</title><content type='html'>&lt;p&gt;      The installation of MapServer on a Linux/UNIX distribution is not the  most well documented       software around, with only hints of &quot;install this, then install  that&quot; to be found on       the Internet.  To simplify and hopefully demystify this process,  this document takes a       step by step installation approach. Aim of this document is to get MapServer       up and running on your Linux distribution.     &lt;/p&gt;     &lt;p&gt;      This document assumes Redhat Linux Distribution or Solaris 10 with Apache  installed and cgi-bin configuration is done.  If  any of these       components not installed them before  continuing with this       documentation complete this.     &lt;/p&gt;     &lt;p&gt;      This document is based on experience and compiled to benefit  the community.     &lt;/p&gt;Before installing Mapsever we need to download, configure and install its prerequisite libraries.&lt;br /&gt;&lt;br /&gt;Following is the list of libraries and source to download it which one may need to install before installing Mapserver&lt;br /&gt;&lt;br /&gt;A)    Necessary Libraries&lt;br /&gt;&lt;br /&gt;1)    libpng: libpng should be on your system by default. 1.2.12 is the current release with security patches, although versions all the way back to 1.2.7 should work.&lt;br /&gt;(http://www.libpng.org/pub/png/libpng.html )&lt;br /&gt;&lt;br /&gt;2)    freetype: Version 2.x or above is required by GD.&lt;br /&gt;(http://www.freetype.org/ )&lt;br /&gt;&lt;br /&gt;3)    GD: libgd is used by MapServer for rendering images. Version 2.0.28 or greater required.   Version 2.0.29 or later is required to use curved (following) labels, and version 2.0.34 is required for antialiasing (1 pixel wide lines/outlines).&lt;br /&gt;(http://www.libgd.org/ )&lt;br /&gt;&lt;br /&gt;4)     zlib: Zlib should be on your system by default. 1.2.1 is the current release with security patches.&lt;br /&gt;(http://www.zlib.net/ )&lt;br /&gt;&lt;br /&gt;B)    Highly Recommended Software&lt;br /&gt;&lt;br /&gt;1)    PostgreSQL: PostgreSQL is an object-relational database that can be used to store data utilizing PostGIS. The current stable release is 8.1.2.&lt;br /&gt;(http://www.postgresql.org/ )&lt;br /&gt;&lt;br /&gt;2)    Libproj: libproj provides projection support for MapServer. Version 4.4.6 or greater is required.&lt;br /&gt;(http://trac.osgeo.org/proj/ )&lt;br /&gt;&lt;br /&gt;3)     Libcurl: libcurl is the foundation of OGC (WFS/WMS/WCS) client and server support. Version 7.10 or greater is required&lt;br /&gt;(http://curl.haxx.se/libcurl/ )&lt;br /&gt;&lt;br /&gt;4)    OGR: OGR provides access to at least 18 different vector formats.&lt;br /&gt;(http://www.gdal.org/ogr/ )&lt;br /&gt;&lt;br /&gt;5)    GDAL: GDAL provides access to at least 42 different raster formats, while OGR provides access to at least 18 different vector formats. 1.3.1 is the current stable release and contains both GDAL and OGR libraries.&lt;br /&gt;(http://www.gdal.org/ )&lt;br /&gt;&lt;br /&gt;6)    AGG: AGG (Anti-Grain Geometry) is an optional dependency to enable high quality antialiased output for vector data. Currently versions 2.4 and 2.5 are identical featurewise, and only vary in their licence (2.4 is BSD, 2.5 is GPL)&lt;br /&gt;(http://antigrain.com/ )&lt;br /&gt;C) Optional Libraries&lt;br /&gt;&lt;br /&gt;1)    Libtiff: libtiff provides TIFF (Tagged Image File Format) reading support to MapServer.&lt;br /&gt;(http://www.libtiff.org/ )&lt;br /&gt;&lt;br /&gt;2)    Libgeotiff: libgeotiff provides support to read GeoTIFF files (TIFF files with geographic referencing).&lt;br /&gt;(http://trac.osgeo.org/geotiff/ )&lt;br /&gt;&lt;br /&gt;3)    Libjpeg: libjpeg allows MapServer to render images in JPEG format. A sufficient version should be installed by default on your system. Version 6b is the current version and dates back to 1998.&lt;br /&gt;(http://www.ijg.org/ )&lt;br /&gt;&lt;br /&gt;4)    GEOS: GEOS allows MapServer to do spatial predicate and algebra operations (within, touches, etc &amp;amp; union, difference, intersection). Requires version 4.10 or greater.&lt;br /&gt;( http://trac.osgeo.org/geos/ )&lt;br /&gt;&lt;br /&gt;5)    Libxml: libxml is required to use OGC SOS support in MapServer (versions 4.10 and greater). (http://xmlsoft.org/ )&lt;br /&gt;&lt;br /&gt;6)    SDE: Client Library: The client libraries for your platform should be part of the ArcSDE media kit. They are not publicly available for download.&lt;br /&gt;(http://www.esri.com/software/arcgis/arcsde/index.html )&lt;br /&gt;&lt;br /&gt;7)    Oracle Spatial OCI: The client libraries for your platform are available for download from Oracle’s website. Ideally, your client library matches the database you are querying from, but this is not a hard requirement.&lt;br /&gt;(http://www.oracle.com/technology/products/spatial/index.html )&lt;br /&gt;&lt;br /&gt;8)    Libpq: libpq is required to support the use of PostGIS geometries within the PostgreSQL database. Ideally, your client library matches the database you are querying from.&lt;br /&gt;(http://www.postgresql.org/ )&lt;br /&gt;9)    Pdflib (lite): PDFlib Lite is the Open Source version of PDFlib that allows MapServer to produce PDF output. Version 4.0.3 or greater is required.&lt;br /&gt;(http://www.pdflib.com/)&lt;br /&gt;&lt;br /&gt;10)    Libming: libming provides Macromedia Flash output to MapServer. Version 0.2a is required. Later versions are not known to work.&lt;br /&gt;(http://www.libming.org/ )&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;After downloading required libraries use following commands to configure and install it&lt;br /&gt;&lt;br /&gt;By default all libraries get installed at /usr/local folder if want to install it at some other location use --prefix=/path to dir to install&lt;br /&gt;&lt;br /&gt;use ./configure --help to see configuration help&lt;br /&gt;&lt;br /&gt;Here we are assuming we are installing at some other folder not at default location hence we will use --prefix option&lt;br /&gt;&lt;br /&gt;It will make your life easier if you set environment variables before installing all libraries ( needed only if default location is not used)&lt;br /&gt;&lt;br /&gt;setenv PATH &quot;/web/mapserve/static/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/opt/bin&quot;&lt;br /&gt;setenv LD_LIBRARY_PATH &quot;/web/mapserve/static/lib:/lib:/usr/lib&quot;&lt;br /&gt;&lt;br /&gt;Now use following commands&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;1)&lt;/span&gt; &lt;span style=&quot;font-weight: bold;&quot;&gt;Freetype&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;tar zxvf freetype-2.3.9.tar.gz&lt;br /&gt;cd freetype-2.3.9&lt;br /&gt;&lt;br /&gt; ./configure --prefix=/web/mapserve/static&lt;br /&gt;&lt;br /&gt; make&lt;br /&gt; make install&lt;br /&gt;&lt;br /&gt;            &lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;2) Zlib&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;tar zxvf zlib-1.2.3.tar.gz&lt;br /&gt;&lt;br /&gt;cd zlib-1.2.3&lt;br /&gt; ./configure --prefix=/web/mapserve/static --shared&lt;br /&gt;make&lt;br /&gt; make test&lt;br /&gt; make install&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;3) PNG&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;tar zxvf libpng-1.4.0.tar.gz&lt;br /&gt; cd libpng-1.4.0&lt;br /&gt; cp scripts/makefile.linux Makefile&lt;br /&gt;&lt;br /&gt;./configure --prefix=/web/mapserve/static&lt;br /&gt;&lt;br /&gt;make&lt;br /&gt;make test&lt;br /&gt;./pngtest pngnow.png&lt;br /&gt;make install&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;4) JPEG&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;tar zxvf jpegsrc.v6b.tar.gz&lt;br /&gt;cd jpeg-6b&lt;br /&gt; ./configure --prefix=/web/mapserve/static --enable-shared&lt;br /&gt;cp /usr/share/libtool/config.sub /web/mapserve/jpeg-6b&lt;br /&gt;cp /usr/share/libtool/config.guess /web/mapserve/jpeg-6b&lt;br /&gt;&lt;br /&gt;make&lt;br /&gt; make test&lt;br /&gt; make install&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;5) tiff &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;tar -xvf  tiff-3.9.2.tar&lt;br /&gt; cd  tiff-3.9.2&lt;br /&gt; ./configure  --prefix=/web/mapserve/static&lt;br /&gt;make&lt;br /&gt; make  install&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;6) gd&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;tar zxvf gd-2.0.35.tar.gz&lt;br /&gt; cd gd-2.0.35&lt;br /&gt; ./configure --prefix=/web/mapserve/static&lt;br /&gt;&lt;br /&gt;make&lt;br /&gt; make install&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;7) proj&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;tar xvf proj-4.7.0.tar&lt;br /&gt; cd proj-4.7.0/nad&lt;br /&gt;&lt;br /&gt;./configure --prefix=/web/mapserve/static  --enable-shared&lt;br /&gt;&lt;br /&gt;make&lt;br /&gt; make install&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;8) Curl&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;tar -xvf curl-7.19.7.tar&lt;br /&gt; cd curl-7.19.7&lt;br /&gt; ./configure --prefix=/web/mapserve/static  --enable-shared --without-ssl&lt;br /&gt;make&lt;br /&gt; make install&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;9) libgeotiff&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;tar -xvf libgeotiff-1.2.4.tar&lt;br /&gt;cd libgeotiff-1.2.4&lt;br /&gt;./configure --prefix=/web/mapserve/static \&lt;br /&gt;--with-libtiff=/web/mapserve/static  \&lt;br /&gt;--with-jpeg=/web/mapserve/static \&lt;br /&gt;--with-zip=/web/mapserve/static \&lt;br /&gt;--with-proj=/web/mapserve/static&lt;br /&gt;&lt;br /&gt;make&lt;br /&gt;make install&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;10)  geos &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;tar xvf geos-3.2.0.tar&lt;br /&gt;cd geos-3.2.0&lt;br /&gt;./configure --prefix=/web/mapserve/static&lt;br /&gt;make&lt;br /&gt;make install&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;11) PostgreSQL&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;tar zxvf postgresql-8.4.2.tar.gz&lt;br /&gt;cd postgresql-8.4.2.tar.gz&lt;br /&gt;./configure --prefix=/web/mapserve/static \&lt;br /&gt;--with-perl --with-python --with-krb5 --with-openssl&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;make&lt;br /&gt;make install&lt;br /&gt;&lt;br /&gt;//to craete data directory&lt;br /&gt;&lt;br /&gt;mkdir /web/mapserve/Datastore/PostgreData&lt;br /&gt;/web/mapserve/static/bin/initdb -D /web/mapserve/Datastore/PostgreData&lt;br /&gt;&lt;br /&gt;// start&lt;br /&gt;&lt;br /&gt; /web/groups/mapserve/util/mapserver/bin/pg_ctl -D /web/groups/mapserve/Datastore/PostgreData -l logfile start&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;12) postgis&lt;/span&gt;&lt;br /&gt;cd postgis-1.5.0&lt;br /&gt;./configure --prefix=/web/mapserve/static \&lt;br /&gt;            --with-pgconfig=/web/mapserve/static/bin/pg_config \&lt;br /&gt;        --with-geosconfig=/web/mapserve/static/bin/geos-config \&lt;br /&gt;        --with-projdir=/web/mapserve/static \&lt;br /&gt;        --with-gui&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;br /&gt;13) gdal ( It takes time to install)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;tar xvf gdal-1.6.0.tar&lt;br /&gt; cd gdal-1.6.0&lt;br /&gt; ./configure    --prefix=/web/mapserve/static \&lt;br /&gt;--without-ecw --with-png=internal --with-oci=yes  \&lt;br /&gt;--with-jpeg=internal --with-gif=internal --with-libz=internal --with-libtiff=internal \&lt;br /&gt; --with-geotiff=internal --with-perl  --with-php --with-python&lt;br /&gt;&lt;br /&gt;make&lt;br /&gt;make install&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;14)  Bingo...  now you are ready to install mapserver&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;mapserver-5.6.1&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;tar -xvf mapserver-5.6.1.tar&lt;br /&gt; cd mapserver-5.6.1&lt;br /&gt;&lt;br /&gt;./configure --with-proj=/web/mapserve/static \&lt;br /&gt;--with-gd=/web/mapserve/static  \&lt;br /&gt;--with-gdal --with-zlib=/web/mapserve/static \&lt;br /&gt; --with-ogr --with-curl-config=/web/mapserve/static/bin/curl-config \&lt;br /&gt;--with-tiff=/web/mapserve/static --without-pdf  \&lt;br /&gt;--with-freetype=/web/mapserve/static \&lt;br /&gt; --with-wfs --with-wcs --with-wmsclient --with-wfsclient \&lt;br /&gt;--with-png=/web/mapserve/static \&lt;br /&gt;--with-jpeg=/web/mapserve/static \&lt;br /&gt; --with-postgis=/web/mapserve/static/bin/pg_config \&lt;br /&gt; --with-geos=/web/mapserve/static/bin/geos-config --enable-debug&lt;br /&gt;&lt;br /&gt;make&lt;br /&gt;&lt;br /&gt;( Do not give make install command)&lt;br /&gt;&lt;br /&gt;make will create mapserv executable in source directory. Copy it to cgi-bin folder to use it.&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;Testing mapserver&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;/span&gt;&lt;b style=&quot;font-family: times new roman;&quot;&gt;/usr/local/apache2/cgi-bin/mapserv&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;&lt;span style=&quot;font-family: times new roman;&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;T&lt;/span&gt;his  script can only be used to decode form results  and&lt;/span&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;span style=&quot;font-family: times new roman;&quot;&gt;should be initiated as a CGI process via a httpd server.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt; &lt;br /&gt;&lt;pre&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;span style=&quot;font-family: times new roman;&quot;&gt; This message means, MapServer installation is done :-)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;    &lt;br /&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudhendra.blogspot.com/feeds/8023226869885668901/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sudhendra.blogspot.com/2010/02/mapserver-installation-on-linux-or.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5261504130861186800/posts/default/8023226869885668901'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5261504130861186800/posts/default/8023226869885668901'/><link rel='alternate' type='text/html' href='http://sudhendra.blogspot.com/2010/02/mapserver-installation-on-linux-or.html' title='Mapserver installation on Linux or Solaris'/><author><name>SSK</name><uri>http://www.blogger.com/profile/02407950941507356678</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry></feed>