[Mapbender-commits] r3782 - trunk/mapbender

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Mar 17 12:48:44 EDT 2009


Author: christoph
Date: 2009-03-17 12:48:44 -0400 (Tue, 17 Mar 2009)
New Revision: 3782

Modified:
   trunk/mapbender/Install.txt
Log:


Modified: trunk/mapbender/Install.txt
===================================================================
--- trunk/mapbender/Install.txt	2009-03-17 16:48:17 UTC (rev 3781)
+++ trunk/mapbender/Install.txt	2009-03-17 16:48:44 UTC (rev 3782)
@@ -2,15 +2,184 @@
 
 http://www.mapbender.org/index.php/Installation
 
+To update a running Mapbender Installation have a look at: http://www.mapbender.org/Update_Mapbender
+
+
 Every Mapbender User is invited to let the Mapbender Wiki grow.
 If you want an account to edit any of these Wiki pages please write an email to info at mapbender.org and request for an ID and password. 
 You need a valid email address to be able to edit this Wiki. 
 
+----
+-- 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) 
+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. 
 
 ----
--- 1. Database:
+-- 1. Download of the package
 ----
+Download the newest Mapbender OSGeo installation package. 
+For further details see Download Mapbender.
+Extracting the package
+Mapbender consists of multiple PHP-files in different directories which can be downloaded in one ZIP-file. To extract the ZIP-file you will need archiving software like unzip (commandline) or FileZip (Windows).
 
+Directories
+After downloading and unpacking Mapbender you find the following directories:
+    * conf - directory for the configuration file mapbender.conf
+    * core
+    * documents
+    * http - directory for the application. Within this directory the modules are sorted by type in subdirectories. Some modules are pure JavaScript applications, even though they have .php as suffix.
+    * lib
+    * license - license information files
+    * log - logfiles will be saved here
+    * owsproxy
+    * resource - directory for the SQL-Dump to build up the Mapbender database or update the database; also contains translation files 
+
+----
+-- 2. Internationalisation
+----
+* 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
+
+
+----
+-- 3. 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/
+
+       <Directory /path/to/mapbender2/http>
+          Options MultiViews
+          DirectoryIndex index.php
+          Order allow,deny
+          Allow from all
+       </Directory>
+
+For example using Ubuntu edit: /etc/apache2/sites-available/default
+
+      Alias /mapbender /var/www/apache2-default/mapbender_2.4.3/http/
+
+       <Directory /var/www/apache2-default/mapbender_2.4.3/http>
+          Options MultiViews
+          DirectoryIndex index.php
+          Order allow,deny
+          Allow from all
+       </Directory>
+
+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>
+           Options Indexes MultiViews FollowSymLinks
+           AllowOverride None
+           Order deny,allow
+           Deny from all
+           Allow from 127.0.0.0/255.0.0.0 ::1/128
+   
+           # Insert filter
+           SetOutputFilter DEFLATE
+   
+           # Netscape 4.x has some problems...
+           BrowserMatch ^Mozilla/4 gzip-only-text/html
+   
+           # Netscape 4.06-4.08 have some more problems
+           BrowserMatch ^Mozilla/4\.0[678] no-gzip
+   
+           # MSIE masquerades as Netscape, but it is fine
+           # BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
+   
+           # NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
+           # the above regex won't work. You can use the following
+           # workaround to get the desired effect:
+           BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
+   
+           # Don't compress images
+           SetEnvIfNoCase Request_URI \
+           \.(?:gif|jpe?g|png)$ no-gzip dont-vary
+   
+           # Make sure proxies don't deliver the wrong content
+           Header append Vary User-Agent env=!dont-vary
+       </Directory>
+
+Make sure you have loaded the required modules (for example, Ubuntu and Apache2)
+* a2enmod deflate
+* a2enmod headers
+
+For Windows and Apache2, you have to activate the modules at httpd.conf.
+* LoadModule deflate_module modules/mod_deflate.so
+* LoadModule headers_module modules/mod_headers.so
+
+Mapbender will load almost twice as fast! 
+
+----
+-- 5. PHP Configuration
+----
+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 !
+
+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:
+
+display_errors = Off
+
+3. Check the following details in php.ini allow_url_fopen parameter:
+extension_dir = (path to extensions-directory)
+allow_url_fopen = On
+
+4. Mapbender manages access authorization in SESSIONS. Check the following details:
+session.save_handler = files
+session.save_path = (Path to SESSIONS-Directory). (Check authorisation!)
+
+
+5. Further details of session management should be customized according to server load (see 'garbage collection' in php.ini)
+
+6. With regard to other modules the extension gd2 should be included in the installation and configuration process.
+extension=php_gd2.dll        (Windows)
+extension=gd.so              (Linux)
+
+On a Debian-System you find this lib in /usr/lib/libgd.so. If it is not installed zou can do that using the command (or use Synaptic Packet Manager or similar):
+# apt.get install lbgd2-dev 
+
+7. For some Mapbender modules access to a PostgreSQL database is required. If these modules should be used, you have to check the availability of the required extension in the php.ini file:
+extension=php_pgsql.dll      (Windows)
+extension=pgsql.so           (Linux)
+
+8. from Mapbender 2.5 on we need gettext and mbstring
+extension=php_gettext.dll     (Windows)
+extension=php_mbstring.dll    (Windows)
+
+Furthermore check, whether the database information in ./conf/mapbender.conf is correct. 
+
+
+----
+-- 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 --
 --
@@ -42,14 +211,19 @@
 
 
 --If you want to run Mapbender with MySQL load the following files:
-1. mysql_schema.sql 	(creates tables, keys, constraints)
-2. mysql_data.sql	(loads data)
+1. mysql_schema_<version>.sql 	(creates tables, keys, constraints)
+2. mysql_data_<version>.sql	(loads data)
 
 -- run the scripts as follow:
-source mysql_schema.sql 
-source mysql_data.sql (make sure, that you use the right sql for the right encoding)
+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 --
 --
@@ -63,35 +237,82 @@
 
 
 If you want to run Mapbender with PostgreSQL load the following files:
-1. pgsql_schema.sql (creates tables, keys, constraints)
-2. pgsql_data.sql	(loads data)
-3. pgsql_serial_set_sequences_7x.sql or pgsql_serial_set_sequences.sql 
+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.sql <dbname>
-psql -f pgsql_data.sql <dbname>
-psql -f pgsql_serial_set_sequences.sql <dbname>
+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
 
 ----
--- 2. mapbender configuration
+-- 7. mapbender configuration
 ----
-configure the file mapbender.conf 
+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.
 
 -- check the database connection
 http://localhost/tools/mapbender_setup.php
 
+
 ----
--- 3. print configuration
+-- 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
 
+
+----
+-- 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
+
+
+---
+-- 10. Checking the Setup
+---
+The script moved to tools directory:
+http://localhost/mapbender/tools/mapbender_setup.php
+
+mapbender_setup.php tests the data connections. If you use PostgreSQL it checks if PostGIS and MD5 are available.
+
+Further more you have to check the settings in pg_hba.conf (e.g. you have to set ident sameUser to trust).
+
+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. 
+
+
+---
+-- 11. OWSPROXY
+---
+Create an ALIAS for owsproxy:
+
+Alias /owsproxy/ "/data/mapbender/owsproxy/"
+ <Directory /data/mapbender/owsproxy/>
+    AllowOverride None
+    Order Deny,Allow
+    Allow from all
+ </Directory>
+ 
+URL to owsproxy (no terminating slash)
+ define("OWSPROXY", "http://<ip or name>/owsproxy");
+ 
+Apache configuration:
+ RedirectMatch ^.*owsproxy.([^i][\w\d]+)\/([\w\d]+)\/?$ http://<name or ip>/owsproxy/http/index.php?sid=$1\&wms=$2\& 
+ 
+Replace <name or ip> with the owsproxy URL.



More information about the Mapbender_commits mailing list