[Mapbender-commits] r6499 - trunk/mapbender/resources

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri Jul 2 12:41:29 EDT 2010


Author: astrid_emde
Date: 2010-07-02 16:41:29 +0000 (Fri, 02 Jul 2010)
New Revision: 6499

Added:
   trunk/mapbender/resources/install_mapbender.sh
Log:
for OSGeoLive

Added: trunk/mapbender/resources/install_mapbender.sh
===================================================================
--- trunk/mapbender/resources/install_mapbender.sh	                        (rev 0)
+++ trunk/mapbender/resources/install_mapbender.sh	2010-07-02 16:41:29 UTC (rev 6499)
@@ -0,0 +1,98 @@
+#!/bin/sh
+# Copyright (c) 2009 The Open Source Geospatial Foundation.
+# Licensed under the GNU LGPL.
+# 
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published
+# by the Free Software Foundation, either version 2.1 of the License,
+# or any later version.  This library is distributed in the hope that
+# it will be useful, but WITHOUT ANY WARRANTY, without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU Lesser General Public License for more details, either
+# in the "LICENSE.LGPL.txt" file distributed with this software or at
+# web page "http://www.fsf.org/licenses/lgpl.html".
+
+# About:
+# =====
+# This script will install Mapbender 2.6.1
+
+# Running:
+# =======
+# sudo service apache2 start
+# Then open a web browser and go to http://localhost/mapbender/ Login with root/root
+#
+# Requires: Apache2, PHP5, gettext, image magic
+#
+ZIP="mapbender_2.6.1.zip"
+TMP="/tmp/mapbender"
+
+INSTALL_DIR="/usr/lib"
+MAPBENDER_INSTALL_DIR="$INSTALL_DIR/mapbender"
+
+DATA_FOLDER="/data/mapbender" 
+APACHE_USER="www-data"
+POSTGRESQL_USER_NAME="mapbender"
+MAPBENDER_DATABASE_NAME="mapbender"
+MAPBENDER_DATABASE_USER="mapbender"
+MAPBENDER_DATABASE_NAME MAPBENDER_DATABASE_TEMPLATE MAPBENDER_DATABASE_USER
+
+# check required tools are installed
+if [ ! -x "`which wget`" ] ; then
+   echo "ERROR: wget is required, please install it and try again" 
+   exit 1
+fi
+
+
+## Setup things... ##
+if [ ! -d "$DATA_FOLDER" ] ; then
+   mkdir "$DATA_FOLDER"
+fi
+
+# Check get-text
+apt-get install gettext
+
+
+# add gettext to the PATH if needed
+#????
+if [ `grep -c '/usr/bin/msgfmt'` -eq 0 ] ; then
+   echo 'PATH="$PATH:/usr/bin/"'"
+fi
+
+# Check PostgreSQl/PostGIS
+
+
+
+#set default user/password to the system user for easy login
+sudo -u postgres createuser --superuser $POSTGRESQL_USER_NAME
+####### echo "alter role \"POSTGRESQL_USER_NAME\" with password 'user'" > /tmp/mapbender/log.txt
+
+# Check php Konfiguration
+php-gettext
+....
+
+# wo soll Mapbender liegen
+# APACHE ALIAS
+grep -c '/usr/bin/msgfmt'
+
+ 
+
+# create tmp folders
+mkdir -p "$TMP"
+cd "$TMP"
+
+
+# CASE OF A ZIP
+if [ -f "$ZIP" ] ; then
+   echo "$ZIP has already been downloaded."
+else
+   wget -c --progress=dot:mega "http://www.mapbender.org/download/$ZIP"
+fi
+
+# entpacken nach INSTALL_DIR
+# 
+# Rechte auf install.sh und Verzeichnis
+# 
+cd MAPBENDER_INSTALL_DIR/resources/db 
+./install.sh localhost 5432 MAPBENDER_DATABASE_NAME MAPBENDER_DATABASE_TEMPLATE MAPBENDER_DATABASE_USER
+
+



More information about the Mapbender_commits mailing list