Skip to content

Commit c8c9f55

Browse files
authored
Merge pull request #287 from mapbender/fix/installation
Fix/installation
2 parents b8be223 + 28df011 commit c8c9f55

10 files changed

Lines changed: 138 additions & 72 deletions

README.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@ The sources are [on Github](https://github.com/mapbender/mapbender-documentation
88

99
The website code is generated using [Sphinx](http://sphinx-doc.org/), therefore the documentation source is written in [Restructured Text](http://sphinx-doc.org/rest.html).
1010

11-
You find a documentation about how the documentation is structured in the documentation itself in chapter [How to write Mapbender Documentation?](http://doc.mapbender.org/en/book/development/documentation_howto.html) or directly [here in this Git-Repository](https://github.com/mapbender/mapbender-documentation/blob/master/en/book/development/documentation_howto.rst).
11+
You find a documentation about how the documentation is structured in the documentation itself in chapter [How to write Mapbender Documentation?](http://doc.mapbender.org/en/book/development/documentation_howto.html) or directly [here in this Git-Repository](https://github.com/mapbender/mapbender-documentation/blob/master/en/documentation_howto.rst).
1212

1313

1414
To build the website locally, you need to install Sphinx. Install it in Debian-based distributions via
1515

1616
```bash
17-
$ apt install python-sphinx
17+
sudo apt-get install sphinx-common python3-sphinx
18+
sudo apt-get install pip3
19+
sudo pip3 install sphinxcontrib-phpdomain
1820
```
1921

2022
You can then build the documentation by running:
@@ -23,7 +25,23 @@ You can then build the documentation by running:
2325
$ make
2426
```
2527

28+
Example
29+
30+
```bash
31+
32+
cd /data
33+
git clone git clone git@github.com:mapbender/mapbender-documentation
34+
git checkout release/3.2.0
35+
36+
ln -s /data/mapbender-documentation/_build/ /var/www/html/mb-doc
37+
38+
rm -Rf _build
39+
sphinx-build . _build -A version=3.2.0
40+
41+
http://localhost/mb-doc/
42+
```
43+
2644
To participate in the documentation, create a fork and submit a pull request with your changes.
2745

2846

29-
Have fun!
47+
Have fun!
Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,42 @@
11
.. _installation_symfony_de:
22

3-
Installation im Symfony Webserver
3+
Installation von Mapbender unter Verwendung des Symfony-eigenen Webservers
44
#################################
55

6-
Mapbender baut auf dem `Symfony <http://symfony.com/>`_ Framework auf und kann daher den in `Symfony eingebauten Webserver <http://symfony.com/doc/current/cookbook/web_server/built_in.html>`_ nutzen. Das ermöglicht Ihnen einen schnellen Test von Mapbender, ohne eine Integration in einen Webserver vorzunehmen. Dies eignet sich nicht für Produktivumgebungen. In dieser Anleitung wird die SQLite Datenbank verwendet.
6+
Mapbender baut auf das `Symfony <http://symfony.com/>`_ Framework auf und kann
7+
daher den `Symfony-eigenen Webserver <http://symfony.com/doc/current/cookbook/web_server/built_in.html>`_ nutzen.
8+
Das ermöglicht Ihnen einen schnellen Test von Mapbender, ohne eine Integration in einen Webserver vorzunehmen.
79

8-
* Systemvoraussetzungen in der Installationsanleitung `Linux <installation_ubuntu.html>`_ bzw. `Windows <installation_windows.html>`_
9-
* Download der aktuellen Mapbender Version unter https://mapbender.org/builds/
10+
.. hint:: Der Symfony-eigenen Webserver eignet sich nicht für die Produktivumgebungen.
11+
12+
In dieser Anleitung wird die im Installationspaket mitgelieferte SQLite-Datenbank verwendet.
13+
14+
* Bitte prüfen Sie die Systemvoraussetzungen in der Installationsanleitung `Linux <installation_ubuntu.html>`_ bzw. `Windows <installation_windows.html>`_
15+
* Laden Sie die aktuellen Mapbender-Version herunter https://mapbender.org/builds/
1016
* Entpacken in ein beliebiges Verzeichnis.
11-
* Start des Symfony Webserver:
17+
* Starten Sie den Symfony-eigenen Webserver.
18+
19+
.. code-block:: bash
20+
21+
app/console server:run
22+
23+
Der Befehl führt einen lokalen Webserver aus.
24+
25+
Standardmäßig lauscht der Server auf die Adresse 127.0.0.1 und den ersten freien Port ab 8000.
26+
27+
Mapbender ist nun auf dem lokalen Rechner über die Adresse http://127.0.0.1:8001/ erreichbar.
28+
Beachten Sie, dass über diesen Aufruf standardmäßig der Entwickler-Modus gestartet wird.
29+
30+
Sie können den Aufruf auch mehrfach ausführen. Es wird dann der nächste freie Port verwendet.
31+
32+
Die gewünschte Adresse kann auch über die Angabe der IP und des Ports angegeben werden:
1233

13-
.. code-block:: bash
34+
.. code-block:: bash
1435
15-
app/console server:run 0.0.0.0:8000
36+
app/console server:run 127.0.0.1:80002
37+
38+
[OK] Server listening on http://127.0.0.1:8002
39+
40+
// Quit the server with CONTROL-C.
1641
17-
Mapbender ist dann vom Host-Rechner aus über http://ip-adresse:8000/app.php erreichbar.
42+
[Mon Jan 31 15:56:57 2022] PHP 7.4.3 Development Server (http://127.0.0.1:8002) started

de/installation/installation_ubuntu.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ Installation auf Ubuntu/Debian
66
Die mitgelieferte SQLite Datenbank ist für Testinstallationen geeignet. In dieser Datenbank befinden sich bereits vorkonfigurierte Demoanwendungen (die Datenbank liegt unter **<mapbender>/app/db/demo.sqlite**).
77
Eine Anleitung für eine Testinstallation auf Basis des Symfony Webservers finden Sie unter `Installation auf dem Symfony eigenen Webserver <installation_symfony.html>`_.
88

9-
Für den Produktiveinsatz wird PostgreSQL empfohlen.
9+
.. hint:: Für den Produktiveinsatz wird PostgreSQL empfohlen.
1010
Weitere Installationshinweise finden Sie im Kapitel `Optional > Mapbender Einrichtung auf PostgreSQL <#optional>`_.
1111

1212

1313
Voraussetzungen
1414
---------------
1515

16-
- PHP (ab Version 5.6, maximal 7.2)
16+
- PHP >= 7.1
1717
- Apache Installation mit folgenden aktivierten Modulen:
1818

1919
* mod_rewrite
@@ -36,7 +36,7 @@ Installation der benötigten PHP-Extensions:
3636
Entpacken und im Webserver registrieren
3737
---------------------------------------
3838

39-
Download der aktuellen Mapbender Version und entpacken nach /var/www/mapbender:
39+
Download der aktuellen Mapbender Version und entpacken nach /var/www/mapbender oder ein anderes Verzeichnis:
4040

4141
.. code-block:: bash
4242
@@ -90,7 +90,7 @@ Verzeichnisrechte
9090
9191
Nächste Schritte
9292
----------------
93-
Es kann nun auf die Mapbender Installation unter **http://hostname/mapbender/** zugegriffen werden.
93+
Es kann nun auf die Mapbender Installation unter **http://[hostname]/mapbender/** zugegriffen werden.
9494

9595
Per Voreinstellung lauten die Anmeldedaten
9696

de/installation/installation_update.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@ Um Mapbender zu aktualisieren, müssen Sie die folgenden Schritte durchführen:
77

88
* Laden Sie die neuste Version von http://mapbender.org/builds/ herunter
99
* Sichern Sie Ihre Konfigurationsdateien (parameters.yml und config.yml) und Ihre alte Mapbender Version (Dateien und Datenbank)
10-
* Ersetzen Sie die Dateien durch die neuen Mapbender Dateien
10+
* Ersetzen Sie die Dateien durch die neuen Mapbender-Dateien
1111
* Vergleichen Sie die Konfigurationsdateien und prüfen diese auf neue Parameter und Änderungen
12-
* Aktualisieren Sie Ihre Mapbender Datenbank
13-
* Übernahme Ihrer Screenshots: Kopieren Sie die Dateien Ihrer alten Mapbender Version von /web/uploads/ in das /web/uploads Verzeichnis Ihrer neuen Mapbender Version
12+
* Aktualisieren Sie Ihre Mapbender-Datenbank
13+
* Übernahme Ihrer Screenshots: Kopieren Sie die Dateien Ihrer alten Mapbender Version von mapbender/web/uploads/ in das mapbender/web/uploads Verzeichnis Ihrer neuen Mapbender Version
1414
* Wenn Sie Ihre eigenen Templates verwenden sollten, müssen Sie diese mit denen der neuen Version vergleichen (kam es zu Änderungen?)
15-
* Importieren Sie die Anwendungen aus der mapbender.yml Datei, um sich den neusten Stand der Entwicklungen anzuschauen
16-
* Abhängig von Ihrer alten Mapbender Version, muss unter Umständen noch der Apache Alias für Mapbender in der Datei **/etc/apache2/sites-available/mapbender.conf** angepasst werden
15+
* Importieren Sie die Demo-Anwendungen (über den Befehl bin/composer run reimport-example-apps oder über die Web-Administration), um sich den neusten Stand der Entwicklungen anzuschauen
1716
* Unter https://doc.mapbender.org/de/installation/installation_ubuntu.html im Bereich **Entpacken und im Webserver registrieren** ist beschrieben, wie die Konfigurationsdatei für den Apache Alias aussehen sollte
1817
* Das war's auch schon! Schauen Sie sich Ihre neue Mapbender Version an.
1918

@@ -54,9 +53,10 @@ Im Folgenden sind die einzelnen Schritte als Befehle aufgeführt.
5453
app/console doctrine:schema:update --dump-sql
5554
app/console doctrine:schema:update --force
5655
57-
# Importieren Sie die Anwendungen aus der mapbender.yml Datei, um sich den neusten Stand der Entwicklungen anzuschauen
56+
# Importieren Sie die Demo-Anwendungen, um sich den neusten Stand der Entwicklungen anzuschauen
5857
bin/composer run reimport-example-apps
5958
59+
# export the web directory
6060
app/console assets:install web --symlink --relative
6161
6262
# Setzen Sie die Schreibrechte für Besitzer (u), Gruppe (g) und Andere (a). Weisen Sie die Skripte dem Apache User (www-data) zu.

de/installation/installation_windows.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ Nachfolgend beschreiben wir die Installation für eine Produktivumgebung.
1010
Voraussetzungen
1111
---------------
1212

13-
* PHP NTS (ab Version 5.6, maximal 7.2, https://windows.php.net/download/)
13+
* PHP NTS >= 7.1 https://windows.php.net/download/)
1414
* Apache Installation, als Dienst eingerichtet (https://www.apachelounge.com/download/)
1515
mit folgenden aktivierten Modulen:
1616

1717
* mod_rewrite
1818
* mod_fcgid
1919

20-
* eingerichtete PostgreSQL Datenbank (Version < 10, https://www.enterprisedb.com/downloads/postgres-postgresql-downloads)
20+
* eingerichtete PostgreSQL Datenbank (https://www.enterprisedb.com/downloads/postgres-postgresql-downloads)
2121

2222
* vorhandene Datenbank für die Mapbender Konfiguration
2323
* ggf. eigenen Benutzer für Zugriff
@@ -179,7 +179,7 @@ Weitere Informationen zur Konfiguration im Kapitel :ref:`installation_configurat
179179
Der erste Start
180180
---------------
181181

182-
Die Mapbender Installation kann unter **http://hostname/mapbender/** aufgerufen werden.
182+
Die Mapbender Installation kann unter **http://[hostname]/mapbender/** aufgerufen werden.
183183

184184
Per Voreinstellung lauten die Anmeldedaten:
185185

en/documentation_howto.rst

Lines changed: 22 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ You find the Mapbender Documentation at:
1010

1111
https://doc.mapbender.org
1212

13-
The Documentation is build from the mapbender-docmentation repository at Github. This repository is used to build and deploy the http://doc.mapbender.org website on a nightly base. The website code is generated using Sphinx, therefore the documentation source is written in Restructured Text.
13+
The Documentation is build from the mapbender-docmentation repository at Github. This repository is used to build and deploy the https://doc.mapbender.org website. The website code is generated using Sphinx, therefore the documentation source is written in Restructured Text.
1414

1515
This HowTo concentrates on the build of the documentation at http://doc.mapbender.org.
1616

@@ -47,25 +47,13 @@ Every language (en - english, de - german) has the same file structure.
4747
index.rst # refers to TheBook, Developer's Book & the Bundle Documentation
4848
bundles.rst # lists the chapters of this category - refers to rst files
4949
development.rst # lists the chapters of this category - refers to rst files
50-
thebook.rst # lists the chapters of this category - refers to rst files
51-
/book
52-
....
53-
/development
50+
/architecture
51+
/development
52+
....
53+
/functions
54+
/backend
55+
/basic
5456
....
55-
/bundles
56-
/Mapbender
57-
/CoreBundle
58-
index.rst # refers to the elements, entitiy & service documentation
59-
template_element.rst # template to use for new element documentation
60-
/elements
61-
legend.rst
62-
...
63-
/services
64-
...
65-
/WmsBundle
66-
...
67-
/FOM
68-
...
6957
7058
7159
How to build the documentation via Sphinx?
@@ -77,14 +65,17 @@ To build the website locally, you need to install Sphinx. In Debian-based distri
7765

7866
.. code-block:: bash
7967
80-
apt-get install python-sphinx
68+
sudo apt-get install sphinx-common python3-sphinx
69+
sudo apt-get install pip3
70+
sudo pip3 install sphinxcontrib-phpdomain
8171
8272
8373
You can then build the documentation by running
8474

8575
.. code-block:: bash
8676
87-
sphinx-build . output
77+
sphinx-build . _build -A version=3.2.0
78+
8879
8980
You can also use the generate.sh shell script if you like.
9081

@@ -157,7 +148,7 @@ Here are the steps you have to do:
157148
# get the documentation files from github
158149
cd /data
159150
git clone git@github.com:mapbender/mapbender-documentation
160-
cd /mapbender-documentation/en/bundles/Mapbender/CoreBundle
151+
cd /mapbender-documentation/en/functions/basic
161152
162153
# create a rst-file. Use the template for element documentation!
163154
cp template_element.rst elements/add_wms.rst
@@ -166,18 +157,22 @@ Here are the steps you have to do:
166157
167158
# build the the documentation locally to see how your documentation looks like
168159
cd /data/mapbender-documentation/
169-
sphinx-build . output
160+
rm -Rf _build
161+
sphinx-build . _build -A version=3.2.0
170162
171163
# have a look at the documentation in your browser (example location). Is everything ok? Any changes needed?
172-
file:///data/mapbender-documentation/output/index.html
164+
ln -s /data/mapbender-documentation/_build/ /var/www/html/mb-doc
165+
http://localhost/mb-doc/
173166
174167
# add, commit and push your new file to the mapbender-documentation repository
175168
# replace <element_name> with the element name, dont forget to remove the <, >
176-
git add en/bundles/Mapbender/CoreBundle/elements/<element_name>.rst
177-
git commit -m 'new documentation for element <element_name>' en/bundles/Mapbender/CoreBundle/elements/<element_name>.rst
178-
git push
169+
git checkout -b feature/add_wms
170+
git add en/functions/basic/add_wms.rst
171+
git commit -m 'new documentation for element <element_name>'
172+
git push --set-upstream origin feature/add_wms
179173
180174
# get the actual files from the mapbender-documentation repository
175+
git checkout master
181176
git pull
182177
183178
Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,44 @@
11
.. _installation_symfony:
22

3-
Installation in the Symfony built-in webserver
3+
Installation of Mapbender using Symfony built-in webserver
44
##############################################
55

6-
Mapbender is built on the `Symfony <http://symfony.com/>`_ Framework and therefore can take usage of the `Symfony built-in webserver <http://symfony.com/doc/current/cookbook/web_server/built_in.html>`_. This allows a quick test of Mapbender without an integration into an external webserver. This is not suited for production environments. In this document we assume that the SQLite database is used.
6+
Mapbender is built on the `Symfony <http://symfony.com/>`_ Framework and therefore
7+
can make use of the `Symfony built-in webserver <http://symfony.com/doc/current/cookbook/web_server/built_in.html>`_.
8+
This setup allows a quick test of Mapbender without an integration into an external webserver.
79

8-
* Take notice of the installation documentation `Linux <installation_ubuntu.html>`_ respectively `Windows <installation_windows.html>`_
10+
.. hint:: The use of the Symfony built-in webserver is not suitable for production environments.
11+
12+
In this document we assume that the SQLite database is used.
13+
14+
* Please check the installation documentation for `Linux <installation_ubuntu.html>`_ respectively `Windows <installation_windows.html>`_
915
* Download the current Mapbender version https://mapbender.org/builds/.
1016
* Extract Mapbender in an arbitrary directory.
11-
* Start the Symfony webserver:
17+
* Start the Symfony webserver.
18+
19+
.. code-block:: bash
20+
21+
app/console server:run
22+
23+
The command runs a local web server. By default, the server listens on 127.0.0.1 address
24+
and the port number is automatically selected as the first free port starting from 8000.
25+
26+
Now Mapbender is available on the local machine with the address http://127.0.0.1:8001/.
27+
Please note that Mapbender runs in the developer mode per default.
28+
29+
30+
31+
If you run the command several times Symfony will choose the next available port.
32+
33+
34+
You also could change the default address and port by passing them as an argument:
1235

13-
.. code-block:: bash
36+
.. code-block:: bash
1437
15-
app/console server:run 0.0.0.0:8000
38+
app/console server:run 127.0.0.1:80002
39+
40+
[OK] Server listening on http://127.0.0.1:8002
41+
42+
// Quit the server with CONTROL-C.
1643
17-
After that, Mapbender is available from the host machine with the URL http://ip-address:8000/app.php.
44+
[Mon Jan 31 15:56:57 2022] PHP 7.4.3 Development Server (http://127.0.0.1:8002) started

en/installation/installation_ubuntu.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ Installation on Ubuntu/Debian
55

66
Mapbender is shipped with a preconfigured SQLite database which includes preconfigured applications (the database is located under **<mapbender>/app/db/demo.sqlite**).
77

8-
For productive use PostgreSQL is recommended. You can find the neccessary configuration steps in chapter `Optional > Mapbender Deployment on PostgreSQL <#optional>`_.
8+
.. hint:: For productive use PostgreSQL is recommended. You can find the neccessary configuration steps in chapter `Optional > Mapbender Deployment on PostgreSQL <#optional>`_.
99

1010
Requirements
1111
------------
1212

13-
- PHP (from version 5.6 to 7.2)
13+
- PHP >= 7.1
1414
- Apache installation with the following modules activated:
1515

1616
* mod_rewrite
@@ -32,7 +32,7 @@ Installation of mandatory PHP extensions:
3232
Unpack and register to web server
3333
---------------------------------
3434

35-
Download the current Mapbender version and unzip it into /var/www/mapbender:
35+
Download the current Mapbender version and unzip it into /var/www/mapbender or a different location:
3636

3737
.. code-block:: bash
3838
@@ -87,7 +87,7 @@ Directory rights
8787
First steps
8888
-----------
8989

90-
The Mapbender installation can now be accessed under **http://hostname/mapbender/**.
90+
The Mapbender installation can now be accessed under **http://[hostname]/mapbender/**.
9191
User data by default:
9292

9393
username: "root", password: "root"
@@ -120,9 +120,9 @@ To use the optional LDAP-connection, following PHP-LDAP-extension is required:
120120
Configuration of PostgreSQL database for productive use:
121121

122122
Requirements:
123-
- configured PostgreSQL database (version < 10)
123+
- configured PostgreSQL database
124124
- database for Mapbender configuration
125-
- possibly user for access
125+
- PostgreSQl database user to access the database with create database right
126126

127127
Installation PHP-PostgreSQL driver
128128

0 commit comments

Comments
 (0)