Skip to content
Snippets Groups Projects
Commit fcd9455d authored by Julie gauthier's avatar Julie gauthier
Browse files

Merge branch '431-uprgade-documentation-install' into 'develop'

Resolve "Uprgade Documentation install"

Closes #431

See merge request Comptoir/Comptoir-srv!120
parents 2bad6c2a a7aab341
No related branches found
No related tags found
No related merge requests found
...@@ -17,7 +17,10 @@ apt-get install \ ...@@ -17,7 +17,10 @@ apt-get install \
libapache2-mod-php \ libapache2-mod-php \
postgresql \ postgresql \
php-pgsql \ php-pgsql \
php7.0-sqlite3 php7.0-sqlite3 \
php7.0-xml \
php7.0-mbstring
``` ```
## Prerequisites: PHP > timezone + max_upload ## Prerequisites: PHP > timezone + max_upload
...@@ -143,7 +146,7 @@ As any user, do: ...@@ -143,7 +146,7 @@ As any user, do:
as user `root` postgresql, do : as user `root` postgresql, do :
``` ```postgresql
CREATE DATABASE debug_kit WITH TEMPLATE = template0 ENCODING = 'UTF8' LC_COLLATE = 'fr_FR.UTF-8' LC_CTYPE = 'fr_FR.UTF-8'; CREATE DATABASE debug_kit WITH TEMPLATE = template0 ENCODING = 'UTF8' LC_COLLATE = 'fr_FR.UTF-8' LC_CTYPE = 'fr_FR.UTF-8';
ALTER DATABASE debug_kit OWNER TO comptoir; ALTER DATABASE debug_kit OWNER TO comptoir;
``` ```
...@@ -182,6 +185,13 @@ sudo groupadd comptoir ...@@ -182,6 +185,13 @@ sudo groupadd comptoir
sudo usermod -aG comptoir superdupont sudo usermod -aG comptoir superdupont
sudo chown -R www-data:comptoir /home/comptoir/Comptoir-srv/webroot/img/files sudo chown -R www-data:comptoir /home/comptoir/Comptoir-srv/webroot/img/files
``` ```
Test it:
```shell
grep -E "^comptoir:" /etc/group
```
Comptoir's group must contain 2 users : comptoir, superdupont.
## POSTGRESQL sanitize content ## POSTGRESQL sanitize content
...@@ -198,13 +208,6 @@ cd /home/comptoir/Comptoir-srv/ ...@@ -198,13 +208,6 @@ cd /home/comptoir/Comptoir-srv/
/usr/local/bin/composer install /usr/local/bin/composer install
``` ```
## Load Debug kit for Comptoir **SRV**
As user `superdupont`, do:
```shell
bin/cake plugin load DebugKit
```
## APP.PHP Configure logs for CRUD actions ## APP.PHP Configure logs for CRUD actions
...@@ -264,13 +267,27 @@ Replace `my-password` with suitable value. ...@@ -264,13 +267,27 @@ Replace `my-password` with suitable value.
Adjust Postgres credentials in `config/app.php`, search for 'Datasources' Adjust Postgres credentials in `config/app.php`, search for 'Datasources'
and 'default'. Now adjust: and 'default'. Now adjust:
* host ```php
* port 'default' => [
* username 'className' => 'Cake\Database\Connection',
* password 'driver' => 'Cake\Database\Driver\Postgres',
* database 'persistent' => false,
'host' => 'localhost',
//'port' => 'non_standard_port_number',
'username' => 'comptoir',
'password' => 'comptoir',
'database' => 'comptoir',
'encoding' => 'utf8',
'timezone' => 'Europe/Paris',
'cacheMetadata' => true,
'log' => false,
```
/!\ You should comment the 'test' section of Datasources.
## APP.PHP Configure debug-kit database credentials
* Datasource for debug-kit After the 'test' commented, add datasource for debug-kit
```php ```php
'debug_kit' => [ 'debug_kit' => [
...@@ -281,8 +298,8 @@ and 'default'. Now adjust: ...@@ -281,8 +298,8 @@ and 'default'. Now adjust:
'username' => 'comptoir', 'username' => 'comptoir',
'password' => 'comptoir', 'password' => 'comptoir',
'database' => 'debug_kit', 'database' => 'debug_kit',
'encoding' => 'Europe/Paris', 'encoding' => 'utf8',
'timezone' => 'UTC', 'timezone' => 'Europe/Paris',
'cacheMetadata' => true, 'cacheMetadata' => true,
'quoteIdentifiers' => false, 'quoteIdentifiers' => false,
], ],
...@@ -293,18 +310,29 @@ and 'default'. Now adjust: ...@@ -293,18 +310,29 @@ and 'default'. Now adjust:
Copy default parameters of `comptoir.default.php` into `comptoir.php` Copy default parameters of `comptoir.default.php` into `comptoir.php`
```shell ```shell
cp config/comptoir.default.php config/comptoir.default.php cd /home/comptoir/Comptoir-srv
cp config/comptoir.default.php config/comptoir.php
``` ```
### Categories.PickOfTheMonth ### Categories.PickOfTheMonth
The array `Categories => PickOfTheMonth` contain the four ids of softwares you want see in the section `Pick of the month` on the home page. In `comptoir.php`, the array `Categories => PickOfTheMonth` contain the four ids of softwares you want see in the section `Pick of the month` on the home page.
Default ids [ 27, // Authentik Default ids [ 27, // Authentik
49, // Maarch Courrier 49, // Maarch Courrier
9, // Asqatasun 9, // Asqatasun
23 // OpenADS ] 23 // OpenADS ]
## Load Debug kit for Comptoir **SRV**
As user `superdupont`, do:
```shell
bin/cake plugin load DebugKit
```
## Set UNIX permissions ## Set UNIX permissions
As user `root` do: As user `root` do:
...@@ -325,10 +353,10 @@ done ...@@ -325,10 +353,10 @@ done
## APACHE Vhost preparation ## APACHE Vhost preparation
As `root`, edit `/etc/hosts` and add `comptoir-srv.local` next to the "localhost" entry: As `root`, do:
``` ```
127.0.0.1 localhost my-computer-name comptoir-srv.local echo "127.0.0.1 comptoir-srv.local" >> /etc/hosts
``` ```
## APACHE Vhost creation "comptoir-srv" ## APACHE Vhost creation "comptoir-srv"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment