[mapserver-commits] r8099 - trunk/docs/howto

svn at osgeo.org svn at osgeo.org
Tue Nov 25 11:09:59 EST 2008


Author: hobu
Date: 2008-11-25 11:09:58 -0500 (Tue, 25 Nov 2008)
New Revision: 8099

Modified:
   trunk/docs/howto/building-mapserver-its-main-dependencies-from-scratches-under-linux.txt
Log:
convert to ReST thanks crschmidt\!

Modified: trunk/docs/howto/building-mapserver-its-main-dependencies-from-scratches-under-linux.txt
===================================================================
--- trunk/docs/howto/building-mapserver-its-main-dependencies-from-scratches-under-linux.txt	2008-11-25 15:48:45 UTC (rev 8098)
+++ trunk/docs/howto/building-mapserver-its-main-dependencies-from-scratches-under-linux.txt	2008-11-25 16:09:58 UTC (rev 8099)
@@ -1,150 +1,197 @@
-<p>The goal is to have latest versions of mapserver and its main dependencies.
-<p>The script will build:
-<ul><li>GDAL</li>
-<li>PROJ</li><li>GEOS</li><li>MAPSERVER</li><POSTGIS</li></ul>
-<h2>How it works</h2>
-</p><p>Fisrst, all the libraries and mapserver will be downloaded from their official websites, then tey will be uncompressed and extracted on your disk, then they will be configured, built and installed one by one.
+*****************************************************************************
+ Building MapServer From Scratch Under Linux
+*****************************************************************************
 
-<p>Note that you don't have to run the script as root, run it as a normal user, you will be prompted for a password when needed. If your distribution doesn't use the "sudo" system, just change all "sudo" commands in the script into "su -c ".
-<h2>Prerequisites</h2>
-</p><p>Building from sources means you already have installed the compiler, its tools and the header files of all the main shared libraries (zlib etc.) and have a working toolchain for compilation from sources.
-<p>This was tested on Linux KUbuntu, Ubuntu server and Debian.
+:Author:  alessandro pasott      
+:Revision: $Revision$
+:Date: $Date$
+:Last Updated: 2007/06/20
 
-<h2>Configuration</h2>
-</p><p>After copying the script on the disk and making it executable, you should open it with an editor and change some configuration variables.
-</p><p>More detailed instructions are in the script comments.
-</p>
+.. sectnum::
 
-<h2>If something goes wrong</h2>
-<p>First uncomment WGET in the code if you don't want to download all files again, then check your paths and those configured or hardcoded in the script.
-<p>Chek also the parameters passed to the "configure" commands in the script, maybe you don't need all those options.
+.. contents:: Table of Contents
+    :depth: 2
+    :backlinks: top
 
 
-<h2>Code</h2>
-<pre>
+Introduction
+============
 
+This is just a small script to download, configure and build mapserver and its
+main dependencies from sources under Linux. This HowTo assumes a basic
+knowledge of bash commands and the ability to edit the scripts itself and
+change a few configuration prameters.
 
-# Where to install: usually /usr or /usr/local
-PREFIX=/usr
+The goal is to have latest versions of mapserver and its main dependencies.
 
-# Directory of PHP binary libs, in my case, was /usr/lib/php5/20051025/
-PHPLIBDIR=/usr/lib/php5/20051025/
+The script will build:
+ * GDAL
+ * PROJ
+ * GEOS
+ * MAPSERVER
+ * POSTGIS
 
-# Uncomment for a debug build of gdal library
-#DEBUG_GDAL=1
+How it works
+============
 
-# Activate download (deactivate if you have still downloaded)
-WGET=1
+Fisrst, all the libraries and mapserver will be downloaded from their official
+websites, then tey will be uncompressed and extracted on your disk, then they
+will be configured, built and installed one by one.
 
-# Libraries to fetch, configure, build and install
-# Adjust versions according to your needs
-GEOS="geos-3.0.0rc4"
-GDAL="gdal-1.4.1"
-PROJ="proj-4.5.0"
-MAPSERVER="mapserver-4.10.1"
-# Uncomment if you still have postgresql installed and want
-# to build postgis, adjust paths in the last code block of this file
-#POSTGIS="postgis-1.2.1"
+Note that you don't have to run the script as root, run it as a normal user,
+you will be prompted for a password when needed. If your distribution doesn't
+use the "sudo" system, just change all "sudo" commands in the script into "su
+-c ".
 
+Prerequisites
+=============
+Building from sources means you already have installed the compiler, its tools
+and the header files of all the main shared libraries (zlib etc.) and have a
+working toolchain for compilation from sources.
 
+This was tested on Linux KUbuntu, Ubuntu server and Debian.
 
+Configuration
+=============
 
-if [ $GEOS ]; then
-        if [ $WGET = 1 && ! -f "$GEOS.tar.bz2" ]; then
-                wget http://geos.refractions.net/$GEOS.tar.bz2
-                tar -xjf $GEOS.tar.bz2
-        fi
+After copying the script on the disk and making it executable, you should open it with an editor and change some configuration variables.
 
-        cd $GEOS
-        ./configure --prefix=$PREFIX
-        make clean
-        make
-        sudo make install
+More detailed instructions are in the script comments.
 
-        cd ..
-fi
+If something goes wrong
+=======================
+First uncomment WGET in the code if you don't want to download all files again,
+then check your paths and those configured or hardcoded in the script.
 
-if [ $GDAL ]; then
-        if [ $WGET = 1 ]; then
-                wget http://download.osgeo.org/gdal/$GDAL.tar.gz
-                tar -xzf $GDAL.tar.gz
-        fi
+Check also the parameters passed to the "configure" commands in the script,
+maybe you don't need all those options.
 
-        cd $GDAL
-        if [ $DEBUG_GDAL ]; then
-                export CFG=debug
-        fi
-        ./configure --prefix=$PREFIX --with-mysql
-        make clean
-        make
-        sudo make install
-        cd ..
-fi
 
+Code
+====
+::
 
-if [ $PROJ ]; then
-        if [ $WGET = 1 ]; then
-                wget ftp://ftp.remotesensing.org/proj/$PROJ.tar.gz
-                tar -xzf $PROJ.tar.gz
-        fi
+  # Where to install: usually /usr or /usr/local
+  PREFIX=/usr
+  
+  # Directory of PHP binary libs, in my case, was /usr/lib/php5/20051025/
+  PHPLIBDIR=/usr/lib/php5/20051025/
+  
+  # Uncomment for a debug build of gdal library
+  #DEBUG_GDAL=1
+  
+  # Activate download (deactivate if you have still downloaded)
+  WGET=1
+  
+  # Libraries to fetch, configure, build and install
+  # Adjust versions according to your needs
+  GEOS="geos-3.0.0rc4"
+  GDAL="gdal-1.4.1"
+  PROJ="proj-4.5.0"
+  MAPSERVER="mapserver-4.10.1"
+  # Uncomment if you still have postgresql installed and want
+  # to build postgis, adjust paths in the last code block of this file
+  #POSTGIS="postgis-1.2.1"
+  
+  
+  
+  
+  if [ $GEOS ]; then
+          if [ $WGET = 1 && ! -f "$GEOS.tar.bz2" ]; then
+                  wget http://geos.refractions.net/$GEOS.tar.bz2
+                  tar -xjf $GEOS.tar.bz2
+          fi
+  
+          cd $GEOS
+          ./configure --prefix=$PREFIX
+          make clean
+          make
+          sudo make install
+  
+          cd ..
+  fi
+  
+  if [ $GDAL ]; then
+          if [ $WGET = 1 ]; then
+                  wget http://download.osgeo.org/gdal/$GDAL.tar.gz
+                  tar -xzf $GDAL.tar.gz
+          fi
+  
+          cd $GDAL
+          if [ $DEBUG_GDAL ]; then
+                  export CFG=debug
+          fi
+          ./configure --prefix=$PREFIX --with-mysql
+          make clean
+          make
+          sudo make install
+          cd ..
+  fi
+  
+  
+  if [ $PROJ ]; then
+          if [ $WGET = 1 ]; then
+                  wget ftp://ftp.remotesensing.org/proj/$PROJ.tar.gz
+                  tar -xzf $PROJ.tar.gz
+          fi
+  
+          cd $PROJ
+          ./configure --prefix=$PREFIX
+          make clean
+          make
+          sudo make install
+          sudo cp $PREFIX/include/proj_api.h $PREFIX/lib
+          cd ..
+  fi
+  
+  
+  if [ $MAPSERVER ]; then
+          if [ $WGET = 1 ]; then
+                  wget http://cvs.gis.umn.edu/dist/$MAPSERVER.tar.gz
+                  tar -xzf $MAPSERVER.tar.gz
+          fi
+  
+          cd $MAPSERVER
+          ./configure \
+           --with-wfs \
+           --with-wfsclient \
+           --with-wmsclient \
+           --with-proj=$PREFIX/lib \
+           --with-geos=$PREFIX/bin/geos-config \
+           --with-gdal=$PREFIX/bin/gdal-config \
+           --with-ogr=$PREFIX/bin/gdal-config \
+           --with-php=/usr/include/php5 \
+           --with-mygis=yes \
+           --with-postgis \
+           --with-httpd=/usr/sbin/apache2 \
+           --prefix=$PREFIX
+          make clean
+          make
+          sudo cp mapserv /usr/lib/cgi-bin/
+          sudo cp shp2img $PREFIX
+          sudo cp shptree $PREFIX
+          sudo cp tile4ms $PREFIX
+          sudo cp mapscript/php3/php_mapscript.so $PHPLIBDIR
+          cd ..
+  fi
+  
+  
+  
+  if [ $POSTGIS ]; then
+          if [ $WGET = 1 && ! -f "$POSTGIS.tar.gz" ]; then
+                  wget http://www.postgis.org/download/$POSTGIS.tar.gz
+                  tar -xzf $POSTGIS.tar.gz
+          fi
+  
+          cd $POSTGIS
+          ./configure --prefix=$PREFIX/lib/postgresql/8.1/
+          make clean
+          make
+          sudo make install
+          cd ..
+  fi
 
-        cd $PROJ
-        ./configure --prefix=$PREFIX
-        make clean
-        make
-        sudo make install
-        sudo cp $PREFIX/include/proj_api.h $PREFIX/lib
-        cd ..
-fi
+Originally published on my blog at `ItOpen - Open Web Solutions`_
 
+.. _`ItOpen - Open Web Solutions`: http://www.itopen.it/2007/04/24/a-script-to-build-the-latest-mapserver-webgis-from-sources/
 
-if [ $MAPSERVER ]; then
-        if [ $WGET = 1 ]; then
-                wget http://cvs.gis.umn.edu/dist/$MAPSERVER.tar.gz
-                tar -xzf $MAPSERVER.tar.gz
-        fi
-
-        cd $MAPSERVER
-        ./configure \
-         --with-wfs \
-         --with-wfsclient \
-         --with-wmsclient \
-         --with-proj=$PREFIX/lib \
-         --with-geos=$PREFIX/bin/geos-config \
-         --with-gdal=$PREFIX/bin/gdal-config \
-         --with-ogr=$PREFIX/bin/gdal-config \
-         --with-php=/usr/include/php5 \
-         --with-mygis=yes \
-         --with-postgis \
-         --with-httpd=/usr/sbin/apache2 \
-         --prefix=$PREFIX
-        make clean
-        make
-        sudo cp mapserv /usr/lib/cgi-bin/
-        sudo cp shp2img $PREFIX
-        sudo cp shptree $PREFIX
-        sudo cp tile4ms $PREFIX
-        sudo cp mapscript/php3/php_mapscript.so $PHPLIBDIR
-        cd ..
-fi
-
-
-
-if [ $POSTGIS ]; then
-        if [ $WGET = 1 && ! -f "$POSTGIS.tar.gz" ]; then
-                wget http://www.postgis.org/download/$POSTGIS.tar.gz
-                tar -xzf $POSTGIS.tar.gz
-        fi
-
-        cd $POSTGIS
-        ./configure --prefix=$PREFIX/lib/postgresql/8.1/
-        make clean
-        make
-        sudo make install
-        cd ..
-fi
-
-</pre>
-
-<strong>Originally published on my blog at: <a href="http://www.itopen.it/2007/04/24/a-script-to-build-the-latest-mapserver-webgis-from-sources/"
-> ItOpen - Open Web Solutions</a></strong>
\ No newline at end of file



More information about the mapserver-commits mailing list