Installation Mapbender 2.1
From MapbenderWiki
(deutsche Version weiter unten!)
Please observe that this is the installation procedure of the previous version! Get the newest instructions on Installation procedures.
Contents |
English
Update Mapbender - Update a running Mapbender Installation
Prerequisite
To be able to use Mapbender you need:
- Webserver (Apache, MS IIS)
- an installation of PHP (scripting language) (version > 4.3)
- Database (currently MySQL(version > 4), the MultiDB branch also supports PostgreSQL)
Directories
After downloading Mapbender 2 contains the following directories:
- conf - directory for configuration files
- http - directory for the application. Within this directory the modules are sorted by type in subdirectories. Some modules are pure JavaScript applications, even so they have .php as suffix. This is because they get the parameters from the database.
- resource - directory for SQL-Dump
Installation
Apache virtual directory
Create a virtual directory. Edit /etc/apache/httpd.conf:
Alias /mapbender /path/to/mapbender2/http/
<Directory /path/to/mapbender2/http>
Options Indexes !MultiViews
!DirectoryIndex index.php
Order allow,deny
Allow from all
</Directory>
PHP Configuration
You have to make some necessary adjustments in the file php.ini. Changes in the php.ini become operative only after restart of the Apache-Webserver !
1. During the test and installation phase of mapbender, error messages should be displayed. Configure 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: - display_errors = Off
3. Check the following details in php.ini: - 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 extention gd2 should be included in the installation and configuration process.
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
Furthermore check, wether the database information in conf/pgsql.conf is correct.
MySQL
1. Mapbender requires read permission on a MySQL-Database. PHP normally contains this extension already (see php.ini).
Configuration: Add read permission to the files ./conf/mysql.conf and ./conf/pgsql.conf. The file ./conf/www.conf additionally has to be writable.
for Linux-Operationsystems change the following values: - chmod 644 mysql.conf pgsql.conf - chmod 666 www.conf
Notice!
This has changed in Mapbender V. 2.2!
2. Edit the file ./conf/www.conf. The URL points to the login script so that it can be found from any exit point of Mapbender (sessions ran out of time, log off, no permission, etc.).
$login = 'http://SERVERNAME_OR_IP/mapbender/frames/login.php';
3. If you see a login but no connect ot the database check whether the server can finde the adress defined in ./conf/mysql.conf
$server="localhost"
This will work only when Mapbender is installed on the same machine as MySQL. If not, insert the IP-adress instead of localhost.
4. Depending on the MySQL version you might not be able to log in because the password has been encoded differently (a change in !MySQL). You can create a new password for any user by explicitly setting the following SQL:
UPDATE mb_user SET mb_user_password=PASSWORD('!My_SECRET_PASSWORD') WHERE mb_user_name='root';
6. Depending on the operating system you might miss InnoDB in MySQL! Check this out prior to doing anything else if you experience trouble when deleting anything in the administration GUI.
Mapbender Configuration Files
The Mapbender Configuration files are found in the directory "conf". Here you find files with the ending -dist. Rename the file for example from mysql.conf-dist to mysql.conf. You won't loose your configuration at next update of Mapbender.
In mysql.conf the details for accessing the MySQL-database have to be edited: $server = "localhost"; //computername IP
$db = "mapbender_2_0"; // name of database
$owner = "root"; //user name
$pw = ""; //password
For some moduls (f. e. mod_changeEPSG.php) a postgresql connection is necessary.
$host = "localhost";
$port = "5432"; //port
$dbname = "<db_name>";
$user = "<name>";
$password = "<password>";
To check wether Mapbender can build up a connection to the mysql and postgresql database, run the php mapbender_setup.php
http://mycomputername/mapbender/mapbender_setup.php
Depending on the configuration you should see the folowing:
File to start Mapbender:
| DB | Connect | Database |
| MySQL: | on | on |
| pgSQL: | on | on |
If any of these values is 'Off' you will have to make sure that the configuration settings in the files mysql.conf and pgsql.conf are correct.
From now on, mapbender is also able to communicate with its users by email. For example, when a user lost his/her password, mapbender can send an email to this person with a new password. Another example: Whenever a WMS is updated, the users using this WMS are notified by mapbender via email.
To enable mapbender to send emails, the administrator must specify a mail server (and set up a mail account on this server) in mail.conf. Please notice: mapbender only features SMTP mailing!
For further settings check 'class_administration.php', or please check phpmailer (http://sourceforge.net/projects/phpmailer) for more information. Currently, phpmailer 1.72 is in use.
Example
$mailHost = "192.163.0.1"; $mailUsername = "mapbender"; $mailPassword = "mapbender";
Notice
Please observe that in version 2.2 configuration files have been consolidated! Read up on Installation.
Deutsch
Bitte beachten Sie, dass es sich bei dieser Anleitung nicht um die aktuelle Version handelt. Die aktuellen Anweisungen finden sich auf den Installations-Seiten.
Update Mapbender - Aktualisierung einer laufenden Mapbender Installation
Betriebsvoraussetzungen (Deutsch)
Mapbender benötigt folgende Softwarevoraussetzungen:
- Webserver (Apache, MS IIS)
- PHP (Skriptsprache)
- Database (aktuell MySQL, der MultiDB Zweig im CVS unterstützt auch PostgreSQL)
Hinweise zur Installation
1. Zuerst wird ein virtuelles Verzeichnis angelegt. Hierzu wird die Datei /etc/apache/httpd.conf editiert:
Alias /mapbender /pfad/zu/mapbender2/http/
<Directory /pfad/zu/mapbender2/http>
Options Indexes !MultiViews
!DirectoryIndex index.php
Order allow,deny
Allow from all
</Directory>
2. Den Dateien ./conf/mysql.conf und ./conf/pgsql.conf müssen Leserechte eingeräumt werden. Die Datei ./conf/www.conf muss schreibbar gesetzt werden (das kann aus Sicherheitsgründen nach der Installation im Betrieb auch wieder zurückgesetzt werden).
Für Linux-Betriebssysteme bitte folgende Werte ändern: - chmod 644 mysql.conf pgsql.conf - chmod 666 www.conf
3. Danach sollte der Pfad in der Datei ./conf/www.conf editiert werden. Berücksichtigen Sie evtl. angelegt virtuelle Verzeichnisse im Apache.
$login = 'http://SERVERNAME_OR_IP/mapbender/frames/login.php';
Diese URL verweist auf das Loing-Skript, um aus allen Ausstiegen aus Mapbender auffindbar zu sein.
Hinweis!
Diese Datei wurde in Mapbender v 2.2 konsolidiert und ist in die zentrale Konfigurationsdatei umgezogen.
4. Wenn jetzt das Login Fenster angezeigt wird, aber die Datenbank nicht erreichbar ist findet der Server evtl. die !MySQL Datenbank nicht, das wird in der Datei ./conf/mysql.conf eingestellt.
$server="localhost"
Das funktioniert natürlich nur, wenn Mapbender auf der gleichen Maschine betrieben wird wie die MySQL Datenbank. Andernfalls wird hier die IP Nummer eingetragen.
5. Aufgrund einer Änderungn im Verschlüsselungsalgorithmus in !MySQL passt das mit dem Mapbender Datenbank-Dump ausgelieferte Passwort evtl. nicht mehr. Sie können über folgendes SQL jedem Nutzer explizit ein neues Passwort übergeben:
UPDATE mb_user SET mb_user_password=PASSWORD('!Mein_SICHERES_PASSWORT') WHERE mb_user_name='root';
6. Je nach Version des Betriebssysten fehlt möglicherweise InnoDB in MySQL! Prüfen Sie das deshalb bitte zuerst, falls Sie auf Probleme beim Löschen in der Administrations GUI stoßen.
Systemdaten für die hier angegebenen Schritte:
- Debian 3.0 (gemischt mit sarge)
- MySQL 4.0
- PHP 4.3
- Mapserver 4.2
- Mapbender 2.0
Mapbender Konfigurationsdateien
Die Mapbender Konfigurationsdateien befinden sich im Ordner "conf". Hier befinden sich Dateien mit der Endung -dist. Diese müssen Sie umbenennen Endung .conf und an Ihre Umgebung anpassen. Bei nächsten Update des Mapbender werden die Konfigurationsdateien nicht überschrieben.
In mysql.conf wird der Zugang zur MySQL-Datenbank festgelegt:
$server = "localhost"; // Computername IP
$db = "mapbender_2_0"; // Datenbankname
$owner = "root"; // Benutzername
$pw = ""; // Passwort
Für einige Module z. B. changeEPSG,Flächenberechnung ist eine PostgreSQL-Verbindung notwendig, da hier auf PostGIS-Funktionen zugegriffen wird.
$host = "localhost";
$port = "5432"; //port
$dbname = "<db_name>";
$user = "<name>";
$password = "<password>";
Die Prüfung, ob Mapbender auf die MySQL und PostgreSQL Datenbanken zugreifen kann erfolgt über den Aufruf der mapbender_setup.php
http://mycomputername/mapbender/mapbender_setup.php
Als Ergebnis sollte folgendes ausgegebene werden:
File to start Mapbender: http://www.nanopatente.de/mapbender/frames/login.php
| DB | Connect | Database |
| MySQL: | on | on |
| pgSQL: | on | on |
Falls eine der Verbindungen nicht gültig ist, wird der Wert 'Off' angezeigt. Überprüfen Sie dann die Einstellungen in den Dateien mysql.conf und pgsql.conf.
Von nun an kann Mapbender auch mit seinen Nutzern kommunizieren, z.B. kann im Falle eines verlorenen Passworts ein neues per Email zugeschickt werden. Ausserdem werden Nutzer informiert, wenn ein WMS, den sie benutzen, aktualisiert oder verändert wird.
Damit Mapbender Emails senden kann muss der Administrator einen Mailserver (und einen validen Mailaccount auf diesem Server) in mail.conf angeben. Bitte beachten Sie: Mapbender bietet nur SMTP mailing!
Weitere Einstellungen können in 'class_administration.php' gemacht werden, zudem lohnt auch ein Blick auf phpmailer (http://sourceforge.net/projects/phpmailer). Zur Zeit wird phpmailer 1.72 verwendet.
Beispiel
$mailHost = "192.163.0.1"; $mailUsername = "mapbender"; $mailPassword = "mapbender";
Hinweis
Bite beachten Sie, dass die Konfigurationsdateien in Version 2.2 konsolidiert (zusammengeführt) wurden! Lesen Sie die neueste Version auf den Installationsseiten.
