[Mapbender-commits] r6507 - trunk/build/osgeolive

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Sat Jul 3 06:51:25 EDT 2010


Author: uli
Date: 2010-07-03 10:51:25 +0000 (Sat, 03 Jul 2010)
New Revision: 6507

Modified:
   trunk/build/osgeolive/install_mapbender.sh
Log:


Modified: trunk/build/osgeolive/install_mapbender.sh
===================================================================
--- trunk/build/osgeolive/install_mapbender.sh	2010-07-03 10:07:20 UTC (rev 6506)
+++ trunk/build/osgeolive/install_mapbender.sh	2010-07-03 10:51:25 UTC (rev 6507)
@@ -24,7 +24,7 @@
 #
 # Uninstall:
 # ============
-# sudo rm -rf /opt/mapbender/
+# sudo rm -rf /var/www/mapbender
 
 # live disc's username is "user"
 USER_NAME="user"
@@ -32,18 +32,30 @@
 TMP_DIR="/tmp/build_mapbender"
 INSTALLURL="http://www.mapbender.org/download/"
 INSTALLFILE="mapbender_2.6.1"
+INSTALL_DIR="/var/www"
+
 mkdir -p "$TMP_DIR"
 
 # Install mapbender dependencies.
 echo "Installing mapbender"
 
-apt-get install --yes  php5 php5-curl 
+apt-get install --assume-yes php5 php5-gd php5-imagick php5-pgsql 
 
 if [ ! -x "`which wget`" ] ; then
     echo "ERROR: wget is required, please install it and try again"
     exit 1
 fi
 
+if [ ! -x "`which gettext`" ] ; then
+    apt-get install gettext
+fi
+
+if [ ! -x "`which unzip`" ] ; then
+    apt-get install unzip
+fi
+
+# check more libraries...
+
 cd "$TMP_DIR"
 if [ ! -e "$INSTALLFILE".zip] ; then 
    wget -O mapbender_osgeo.zip --progress=dot:mega \
@@ -54,11 +66,25 @@
 
 # uncompress mapbender
 unzip -o "mapbender_osgeo.zip"
-cp -R $INSTALLFILE/ /opt/mapbender
-chmod -R uga+r /opt/mapbender
-chown -R www-data:www-data /opt/mapbender
+cp -R $INSTALLFILE/ $INSTALL_DIR/mapbender
+chmod -R uga+r $INSTALL_DIR/mapbender
+chown -R www-data:www-data $INSTALL_DIR/mapbender
 
 
+#Create apache2 configuration for mapbender
+echo "#Configure apache for mapbender " >> /etc/apache2/conf.d/mapbender
+echo "Alias /mapbender $INSTALL_DIR/mapbender/http/" >> /etc/apache2/conf.d/mapbender
+echo "<Directory $INSTALL_DIR/mapbender/http>" >> /etc/apache2/conf.d/mapbender
+echo "Options MultiViews" >> /etc/apache2/conf.d/mapbender
+echo "DirectoryIndex index.php" >> /etc/apache2/conf.d/mapbender
+echo "Order allow,deny" >> /etc/apache2/conf.d/mapbender
+echo "Allow from all" >> /etc/apache2/conf.d/mapbender 
+echo "</Directory>" >> /etc/apache2/conf.d/mapbender             
+#Restart apache2 for mapbender
+/etc/init.d/apache2 force-reload
+
+
+
 #Add Launch icon to desktop
 if [ ! -e /usr/share/applications/mapbender.desktop ] ; then
    cat << EOF > /usr/share/applications/mapbender.desktop



More information about the Mapbender_commits mailing list