diff --git a/Documentation/For_ops/INSTALL/INSTALL_DEV_Ubuntu_16.04.md b/Documentation/For_ops/INSTALL/INSTALL_DEV_Ubuntu_16.04.md index d60f4f124e84548bea932276ff031eeeb4c0212c..0048f47009fd6ef24b5f367ec6073ddc00e2300c 100644 --- a/Documentation/For_ops/INSTALL/INSTALL_DEV_Ubuntu_16.04.md +++ b/Documentation/For_ops/INSTALL/INSTALL_DEV_Ubuntu_16.04.md @@ -17,7 +17,10 @@ apt-get install \ libapache2-mod-php \ postgresql \ php-pgsql \ - php7.0-sqlite3 + php7.0-sqlite3 \ + php7.0-xml \ + php7.0-mbstring + ``` ## Prerequisites: PHP > timezone + max_upload @@ -143,7 +146,7 @@ As any user, 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'; ALTER DATABASE debug_kit OWNER TO comptoir; ``` @@ -182,6 +185,13 @@ sudo groupadd comptoir sudo usermod -aG comptoir superdupont 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 @@ -198,13 +208,6 @@ cd /home/comptoir/Comptoir-srv/ /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 @@ -264,13 +267,27 @@ Replace `my-password` with suitable value. Adjust Postgres credentials in `config/app.php`, search for 'Datasources' and 'default'. Now adjust: -* host -* port -* username -* password -* database +```php +'default' => [ + 'className' => 'Cake\Database\Connection', + 'driver' => 'Cake\Database\Driver\Postgres', + '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 'debug_kit' => [ @@ -281,8 +298,8 @@ and 'default'. Now adjust: 'username' => 'comptoir', 'password' => 'comptoir', 'database' => 'debug_kit', - 'encoding' => 'Europe/Paris', - 'timezone' => 'UTC', + 'encoding' => 'utf8', + 'timezone' => 'Europe/Paris', 'cacheMetadata' => true, 'quoteIdentifiers' => false, ], @@ -293,18 +310,29 @@ and 'default'. Now adjust: Copy default parameters of `comptoir.default.php` into `comptoir.php` ```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 -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 49, // Maarch Courrier 9, // Asqatasun 23 // OpenADS ] + +## Load Debug kit for Comptoir **SRV** + +As user `superdupont`, do: + +```shell +bin/cake plugin load DebugKit +``` + + ## Set UNIX permissions As user `root` do: @@ -325,10 +353,10 @@ done ## 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"