[Mapbender-commits] r7352 - trunk/mapbender

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Dec 22 04:35:51 EST 2010


Author: astrid_emde
Date: 2010-12-22 01:35:51 -0800 (Wed, 22 Dec 2010)
New Revision: 7352

Modified:
   trunk/mapbender/Install.txt
Log:
updated

Modified: trunk/mapbender/Install.txt
===================================================================
--- trunk/mapbender/Install.txt	2010-12-22 09:30:11 UTC (rev 7351)
+++ trunk/mapbender/Install.txt	2010-12-22 09:35:51 UTC (rev 7352)
@@ -10,16 +10,24 @@
 You need a valid email address to be able to edit this Wiki. 
 
 ----
--- Prerequisite
+-- 1. Prerequisite
 ----
-To be able to install and operate your own copy of Mapbender you need:
-    * Webserver (Apache, MS IIS)
-    * an installation of PHP (scripting language, version > 5.1.x)
-    * Database (PostgreSQL >7.3 or MySQL > 4k) 
+Mapbender requires the following components, carfeully read the instructions for the configuration process of each package: 
+* Webserver ( Apache httpd, MS IIS)
+* Database (PostgreSQL >= 8.x with [[PostGIS]])
+* PHP (scripting language, version > 5.1.x)
+** php-mbstring
+** php-gd2
+** php5-imagick
+** php-gettext
+
 The following instructions only describe the configuration process for these packages, please follow the installation instructions for your operating system individually as the paths to files will vary on your systems. 
 
+* Please consider to customize the main configuration file <tt>mapbender.conf</tt> and make sure that this file is backed up.
+* If you want to use Mapbender in an i18n (Internationalization) environment, you need to install php-gettext, see gettext.
+
 ----
--- 1. Download of the package
+-- 2. Download of the package
 ----
 Download the newest Mapbender OSGeo installation package. 
 For further details see Download Mapbender.
@@ -40,28 +48,59 @@
     * tools - assorted scripts for various tasks; contains the script creating the mo files for i18n during the installation
 
 ----
--- 2. Internationalisation
+-- 3. Install Script
 ----
-* Set USE_I18N to true in mapbender.conf.
-	define("USE_I18N", true);
-* Define default language 
-	define("LANGUAGE", "en");   // "en", "de", "bg", "gr", "nl", "it", es" 	
-* Compile the .po files into .mo files via msgfmt, see http://www.mapbender.org/gettext. 
-	msgfmt resources/locale/bg_BG/LC_MESSAGES/Mapbender.po -o resources/locale/bg_BG/LC_MESSAGES/Mapbender.mo
-	msgfmt resources/locale/de_DE/LC_MESSAGES/Mapbender.po -o resources/locale/de_DE/LC_MESSAGES/Mapbender.mo
-	msgfmt resources/locale/fr_FR/LC_MESSAGES/Mapbender.po -o resources/locale/fr_FR/LC_MESSAGES/Mapbender.mo
-	msgfmt resources/locale/el_GR/LC_MESSAGES/Mapbender.po -o resources/locale/el_GR/LC_MESSAGES/Mapbender.mo
-	msgfmt resources/locale/it_IT/LC_MESSAGES/Mapbender.po -o resources/locale/it_IT/LC_MESSAGES/Mapbender.mo
+The install script creates the Mapbender database and loads the initial content. It also compiles the Mapbender.mo files to implement multi language support (i18n). The install script install.sh (install.bat for Windows systems) is located in the directory: 
+ ./mapbender/resources/db/
 
+You have to run the script on a command line interface (Shell or DOS prompt) in that directory so that the script can find all related directories and files. 
 
+You will be asked to input information, make sure that you have them ready. After requesting this information the installation will proceed automatically. Depending on your system and the connected database this may take a while.
+
 ----
--- 3. Apache virtual directory
+-- 3.1 Required Information
 ----
+Before running this script make sure that:
+* you have the credentials og a PostgreSQL user with superuser privileges
+* you know under which account the web server is running (on Debian Linux typically www-data)
+* you know to which group the web server user belongs (on Debian Linux typically www-data)
+
+You can also give all arguments on the commandline:
+ ./install.sh <HOST> <PORT> <DBNAME> <DBTEMPLATE> <DBUSER>
+
+Example:
+ ./install.sh localhost 5432 mapbender_data template0 postgres
+
+----
+-- 3.2 Database Host
+----
+Enter the name, IP or FQDN of the server running the PostgreSQL database (default: localhost).
+
+----
+-- 3.3 Database Port
+----
+The default database port of PostgreSQL is 5432. Only change this if your database cannot be accessed through port 5432. 
+
+----
+-- 3.4 Database Name
+----
+====  ====
+Enter a name for your database. You can use any name following the PostgreSQL conventions (no capitals, no special characters, etc.). This database will contain the credentials of all your users, the metadata of the OWS services and the configurations of your applications. 
+
+----
+-- 3.5 Database Template
+----
+PostgreSQL can use a template to create a new database (default template0). It is recommended to create a postgis_template containing the PostGIS extension and use this template for your Mapbender database. Mapbender needs PostGIS functions for some functionality.  
+
+
+----
+-- 4. Apache virtual directory
+----
 After installation create a virtual directory. Edit /etc/apache/httpd.conf (path varies, for apache2 /etc/apache2/sites-available/default):
 
-       Alias /mapbender /path/to/mapbender2/http/
+       Alias /mapbender /path/to/mapbender/http/
 
-       <Directory /path/to/mapbender2/http>
+       <Directory /path/to/mapbender/http>
           Options MultiViews
           DirectoryIndex index.php
           Order allow,deny
@@ -70,9 +109,9 @@
 
 For example using Ubuntu, edit: /etc/apache2/sites-available/default
 
-      Alias /mapbender /var/www/apache2-default/mapbender_2.4.3/http/
+      Alias /mapbender /var/www/apache2-default/mapbender/http/
 
-       <Directory /var/www/apache2-default/mapbender_2.4.3/http>
+       <Directory /var/www/apache2-default/mapbender/http>
           Options MultiViews
           DirectoryIndex index.php
           Order allow,deny
@@ -81,12 +120,13 @@
 
 You must reload (or stop and restart) the Apache program after making changes to the configuration file to make them take effect. If you want to enable directory browsing, e.g. for debugging purposes add Indexes to the Options line.
 
+
 ----
 -- 4. Apache output compression
 ----
 For optimal performance, enable output compression of your web server. Here's an instruction for Apache (see http://httpd.apache.org/docs/2.0/mod/mod_deflate.html for more details). Just append the content in bold to your Directory settings
 
-       <Directory /var/www/apache2-default/mapbender_2.4.3/http>
+       <Directory /var/www/apache2-default/mapbender/http>
            Options Indexes MultiViews FollowSymLinks
            AllowOverride None
            Order deny,allow
@@ -129,18 +169,25 @@
 Mapbender will load almost twice as fast! 
 
 ----
--- 5. PHP Configuration
+-- 5. Internationalisation
 ----
-You might have to make some adjustments to the file php.ini. Changes in the php.ini also become operative only after restarting the Apache web server !
+* Set USE_I18N to true in mapbender.conf.
+	define("USE_I18N", true);
+* Define default language 
+	define("LANGUAGE", "de");   // "en", "de", "bg", "gr", "nl", "it", es" 	
+* Compile the .po files into .mo files via msgfmt, see http://www.mapbender.org/gettext. (this is also done by the install sript)
+	msgfmt resources/locale/bg_BG/LC_MESSAGES/Mapbender.po -o resources/locale/bg_BG/LC_MESSAGES/Mapbender.mo
+	msgfmt resources/locale/de_DE/LC_MESSAGES/Mapbender.po -o resources/locale/de_DE/LC_MESSAGES/Mapbender.mo
+	msgfmt resources/locale/fr_FR/LC_MESSAGES/Mapbender.po -o resources/locale/fr_FR/LC_MESSAGES/Mapbender.mo
+	msgfmt resources/locale/el_GR/LC_MESSAGES/Mapbender.po -o resources/locale/el_GR/LC_MESSAGES/Mapbender.mo
+	msgfmt resources/locale/it_IT/LC_MESSAGES/Mapbender.po -o resources/locale/it_IT/LC_MESSAGES/Mapbender.mo
 
-1. During the test and installation phase of Mapbender it can be helpful to display error messages. To see error messages displayed configure the file php.ini as follows:
-
-error_reporting  =  E_ALL & ~E_NOTICE
-display_errors = On
-
-2. After testing and installing, error messages should not be displayed anymore, turn this setting off again:
-
+----
+-- 5. PHP Configuration
+----
+1. Error Logging
 display_errors = Off
+error_log = /var/log/php.log
 
 3. Check the following details in php.ini allow_url_fopen parameter:
 extension_dir = (path to extensions-directory)
@@ -172,99 +219,13 @@
 
 
 ----
--- 6. Database:
-----
-
-(NOTE: If want to save time, use the new shell script at
-
-resources/db/install.sh
-
-BEWARE! THIS SHELL SCRIPT IS NOT STABLE! USE AT YOUR OWN RISK!)
-
---
--- MySQL --
---
-
--- Create a Database:
--- select the encoding to run your databse: UTF8 or Latin is possible (choose in the mapbender.conf)
--- To Show the possible character sets:
-SHOW CHARACTER SET; 
-SHOW COLLATION;
-SHOW databases;
-
-
--- database with utf8 encoding
-CREATE DATABASE mapbender CHARACTER SET utf8 COLLATE utf8_general_ci ;
-
-
--- database with ISO-8859-1 encoding 
-CREATE DATABASE mapbender CHARACTER SET latin1 COLLATE latin1_german1_ci ;
-
-
--- select the database mapbender
-use mapbender
-
--- special: update the mb_user_password to md5 for an existing Mapbender installation that used password()-encryption
-in the file mapbender/frames/login.php there is a variable $setEncPw. 
-Set $setEncPw = true to transform the password to md5 when the user logged in with the right password. 
-This helps you to transform the passwords step by step from password() to md5().
-
-
-
---If you want to run Mapbender with MySQL load the following files:
-1. mysql_schema_<version>.sql 	(creates tables, keys, constraints)
-2. mysql_data_<version>.sql	(loads data)
-
--- run the scripts as follow:
-source mysql_schema_<version>.sql 
-source mysql_data_<version>.sql (make sure, that you use the right sql for the right encoding)
-
--- Load the update SQL to update from 2.5 to 2.6
-source update/update_2.5_to_2.5.1rc1_<dbtype>_<charset>.sql
-source update/update_2.5.1rc1_to_2.5.1_<dbtype>_<charset>.sql
-source update/update_2.5.1_to_2.6rc1_<dbtype>_<charset>.sql
-
-
---
--- PostgreSQL --
---
-
--- Create a Database with Latin1 or UTF8 encoding
-CREATE DATABASE mapbender ENCODING = 'UTF8';
-
-or
- 
-CREATE DATABASE mapbender ENCODING = 'LATIN1';
-
-
-If you want to run Mapbender with PostgreSQL load the following files:
-1. pgsql_schema_<version>.sql (creates tables, keys, constraints)
-2. pgsql_data_<version>.sql	(loads data)
-3. pgsql_serial_set_sequences_7x_<version>.sql or pgsql_serial_set_sequences_<version>.sql 
-(depending on wich postgresql version you use, sets the values for the sequences)
-- Zaehlerstand der Sequenz fuer Serial-Felder (Autowerte)
-
-
--- How to load the sqls in PostgreSQL:
-psql -f pgsql_schema_<version>.sql <dbname>
-psql -f pgsql_data_<version>.sql <dbname>
-psql -f pgsql_serial_set_sequences_<version>.sql <dbname>
-
-
--- Load the update SQL to update from 2.5 to 2.6
-psql -f update/update_2.5_to_2.5.1rc1_<dbtype>_<charset>.sql
-psql -f update/update_2.5.1rc1_to_2.5.1_<dbtype>_<charset>.sql
-psql -f update/update_2.5.1_to_2.6rc1_<dbtype>_<charset>.sql
-
-----
 -- 7. mapbender configuration
 ----
 The Mapbender Configuration File is found in the directory "conf". 
-Here you find the file mapbender.conf-dist. Rename the file to mapbender.conf. 
-You won't loose your configuration at the next update of Mapbender.
+Here you find the file mapbender.conf-dist. The install script creates a new file mapbender.conf which contains your database information
 
 -- check the database connection
-http://localhost/tools/mapbender_setup.php
+http://localhost/mapbender/tools/mapbender_setup.php
 You can check your setup with the script mapbender_setup.php. 
 The script mapbender_setup.php moved to the directory:
 
@@ -285,20 +246,38 @@
 
 
 ----
+-- 8. database user
+----
+You need a database user with superuser privileges to create the Mapbender database. For security reasons make sure that you remove superuser permissions after installation. 
+
+Database sample configuration:
+ version: pgsql
+ encoding: UTF-8
+ postgres template: postgis_template
+ db host: localhost
+ db port: 5432
+ dbname: mapbender_db
+ user: mapbender
+
+
+----
 -- 8. print configuration
 ----
 to use the pdfprint configure the files:
 mapbender\http\print\printPDF.conf (if you use the print in an iframe)
 mapbender\http\print\printPDF_b.conf (if you use the print with a button - b for button)
-In Linux : change the permission of tmp folder to 777
-$ chmod -R 777 log
+In Linux : change the write permission of tmp folder
+chmod -R g+w tmp
+chgrp -R www-data tmp
 
 
 ----
 -- 9. Change the Permission of log Folder
 ----
-In Linux : change the permission of log folder to 777 so that php script can write logs in it.
-$ chmod -R 777 log
+(this is done by the installscript)
+In Linux : change the permission of the log folder so that Mapbender can write logs in it.
+chmod -R g+w log
+chgrp -R www-data log
 
 
 ---
@@ -314,7 +293,9 @@
 After the installation - first Login
 For login you can use the user account with username root and the inital password root. Make sure to change this password asap in order to secure your Mapbender installation. 
 
+Check the Mapbender log files at mapbender/log. 
 
+
 ---
 -- 11. OWSPROXY
 ---



More information about the Mapbender_commits mailing list