Skip to content

Commit

Permalink
Update documentation about installation
Browse files Browse the repository at this point in the history
Closes #46
  • Loading branch information
laurentj committed Feb 8, 2024
1 parent 5ddca6d commit ec8f3b4
Showing 1 changed file with 27 additions and 9 deletions.
36 changes: 27 additions & 9 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,47 +20,65 @@ composer require --working-dir=lizmap/my-packages "lizmap/lizmap-pgrouting-modul
### Manual installation of files without Composer

* Get the last ZIP archive in the [repository page](https://projects.3liz.org/lizmap-modules/lizmap-pgrouting-module).
* Extract the archive and copy the `pgrouting` directory in Lizmap Web Client folder `lizmap/lizmap-modules/`
* With Lizmap 3.5 or lower: edit the config file `lizmap/var/config/localconfig.ini.php` and add into
* Extract the archive and copy the `pgrouting` directory (the one containing the `module.xml` file) into the Lizmap Web Client folder `lizmap/lizmap-modules/`
* With **Lizmap 3.5** or lower: edit the config file `lizmap/var/config/localconfig.ini.php` and add into
the section `[modules]`:

```ini
pgrouting.access=2
```


### Launching the installer with Lizmap Web Client 3.6
### Launching the installer with Lizmap Web Client 3.6/3.7

Use following instructions if you are using Lizmap Web Client **3.6 or higher**.

If you are using Lizmap Web Client **3.6 or higher**, execute
First you need to configure the database access in your Lizmap configuration.
Add in `lizmap/var/config/profiles.ini.php` the following parameters, by replacing values with your own credentials.
**Only replace host, database, user and password values.**


```ini
[jdb:pgrouting]

driver=pgsql
host=pgsql
port=5432
database=lizmap
user=lizmap
password="yourpassword"
search_path=pgrouting,public
```

Then execute:

```bash
php lizmap/install/configurator.php pgrouting
```

It will ask you all parameters for the PostgreSQL database access, and also:

It will install some files, and ask you some parameters:

* The **SRID** (code of spatial coordinate system). It must correspond to the projection of your source data
and will be used for the tables created by the module. Default is 2154 (French official code)
* The name of the **PostgreSQL role** that need to be granted with write access on the tables
in the PostgreSQL schema `pgrouting` (that will be created by the module installation
script).

* Then, execute Lizmap install scripts into `lizmap/install/` :

Then, execute Lizmap install scripts into `lizmap/install/` :

```bash
php lizmap/install/installer.php
./lizmap/install/clean_vartmp.sh
./lizmap/install/set_rights.sh
```

Then a new schema `pgrouting` must be visible in your PostgreSQL database, containing the needed
A new schema `pgrouting` must be visible in your PostgreSQL database, containing the needed
tables and functions used by the module.

### Launching the installer with Lizmap 3.5

If you are using Lizmap Web Client **3.6 or higher**, you must manually edit the configuration
If you are using Lizmap Web Client **3.5**, you must manually edit the configuration
file of your instance to specify some options. Edit the file `lizmap/var/config/localconfig.ini.php`
and add the following variable in the section `[modules]`:

Expand Down

0 comments on commit ec8f3b4

Please sign in to comment.