Mapbender PostgreSQL/PostGIS configuration

From MapbenderWiki

Jump to: navigation, search

Contents

EN

Mapbender makes use of PosgreSQL/PostGIS for several features. These are:

  • ChangeEpsg
  • measure length
  • measure area
  • SaveWKT (store digitized geometries)

Configuration

To be able to access PostGIS functions the Mapbender server box has to have access to the PostgreSQL database (port 5432). If the Mapbender php scripts are located on the same engine as the PostgreSQL the connection can be opened to localhost. If the php scripts are located on another physical server you have to edit the pg_hba.conf file of the PostgreSQL installation. Set the client server as trusted to the database server to be able to connect through port 5432.

Edit the file ./conf/pgsql.conf and include the necessary connection information. - $host = ""; (localhost, IP, server name) - $port = "5432"; (default unless explicitly changed) - $dbname = ""; (any database with PostGIS functions) - $user = "admin"; (user that is allowed to connect this database) - $password = ""; (password of that user)

The password can be omitted (recommended) if the database user has no password and the client is trusted in the PostgreSQL configuration file pg_hba.conf.


Security advice:

Make sure that all files in the ./conf/ dicrectory are not published in the http service. They should not be readable from outside.




DE

Mapbender benutzt einige Funktionen der PosgreSQL/PostGIS-Datenbank. Diese sind:

  • ChangeEpsg (EPSG ändern)
  • measure length (Länge messen)
  • measure area (Fläche messen)
  • SaveWKT (store digitized geometries) (abspeichern von digitalisierten Geometrien in WKT)

Konfiguration

Um in der Lage zu sein die PostGIS Funktionen einzusetzen muss die Mapbender Server Box Zugang zur PostgreSQL-Datenbank erlangen (über port 5432). Wenn sich die Mapbender PHP-Skripte auf derselben Maschine befinden wie die PostgreSQL-Datenbank, kann eine Verbindung als 'localhost' geöffnet werden. Wenn sich die Mapbender PHP-Skripte auf einer anderen physikalischen Maschine befinden, müssen Sie die Datei pg_hba.conf bei der PostgreSQL Installation anpassen. Setzen Sie den Client Server auf "trusted" für den Datenbank Server, so dass er in der Lage ist eine Verbindung über den Port 5432 herzustellen.

Passen Sie die Datei ./conf/pgsql.conf an und fügen Sie die notwendigen Informationen ein. - $host = ""; (localhost, IP, Server Name) - $port = "5432"; (Standardeinstellung, außer es wird ausdrücklich geändert) - $dbname = ""; (Name jeder Datenbank mit PostGIS-Funktionen) - $user = "admin"; (Benutzername, der berechtigt ist die Verbindung zur Datenbank herzustellen) - $password = ""; (Passwort dieses Benutzers)

Dieses Passwort kann weggelassen werden (empfohlen), wenn der Datenbank-Benutzer kein Passwort hat und der Client in der Datei pg_hba.conf der PostgreSQL Konfiguration als vertrauenswürdig eingetragen ist.

Sicherheitshinweis:

Vergewissern Sie sich, dass alle Dateien im Verzeichnis ./conf/ nicht veröffentlicht sind im http-Dienst. Sie sollten von außen nicht lesbar sein.

Views
Personal tools