Mise à jour de la doc d'install
Suite à une install ex nihilo de labnbook et en me basant sur la doc en place j'ai pu constater quelques manques. J'ai fais une mise à jour de mon coté mais je ne peux pas vous la pousser. Voici un git diff
sur master
diff --git a/admin-sys/INSTALL.md b/admin-sys/INSTALL.md
index 3690ce6..98eba59 100644
--- a/admin-sys/INSTALL.md
+++ b/admin-sys/INSTALL.md
@@ -8,7 +8,7 @@ An automatic installation with Ansible is provided in a separate repository.
Requirements
------------
-- PHP 7.0 (other 7.X are untested)
+- PHP 7.0 or 7.3 (other 7.X are untested)
- MySQL 5 minimum (tested with MariaDB 10.1 and 10.3)
- PHP extensions: intl json mbstring pdo xml
@@ -16,34 +16,14 @@ Installation
------------
1. Get the source code:
- `git clone git@gricad-gitlab.univ-grenoble-alpes.fr:labnbook/labnbook.git && cd labnbook`
+ `git clone -b production https://gricad-gitlab.univ-grenoble-alpes.fr/labnbook/labnbook.git && cd labnbook`
### Local install
-1. Create the database and a mysql user:
- ```
- echo "CREATE DATABASE labnbook DEFAULT CHARACTER SET 'utf8mb4' DEFAULT COLLATE 'utf8mb4_unicode_ci';" | mysql
- echo "GRANT ALL PRIVILEGES ON labnbook.* TO labnbook@localhost IDENTIFIED BY 'monmdp';" | mysql
- ```
-
-2. Load the DB dump: `zcat dump.sql.gz | mysql labnbook`
- Cleaning the dump may be useful (change charsets, etc).
-
-3. Copy `.env.sample` to `.env` and edit it (change password)
-
-4. To install Labnbook dependencies, you need [composer](https://getcomposer.org/download/)
-and [yarn](https://yarnpkg.com/en/docs/install)
-
-5. run `composer install`
-
-5. Generate laravel key `php artisan key:generate` and public storage link `php artisan storage:link`
-
-7. Run the configuration script : `./refresh.sh` that will install composer and yarn dependencies and run migrations
-
-8. Ensure `php-fpm` (or `mod_php`) is correctly configured.
- Debian fpm: check `/etc/php/7.0/fpm/pool.d/www.conf` (default pool),
+1. Ensure `php-fpm` (or `mod_php`) is correctly configured.
+ Debian fpm: check `/etc/php/7.3/fpm/pool.d/www.conf` (default pool),
especially the directives `listen` and `pm`,
- then check `/etc/php/7.0/fpm/php.ini`.
+ then check `/etc/php/7.3/fpm/php.ini`.
To allow posting large files, configure the webserver (see usual parameters of Apache, Nginx, etc),
and the PHP pool. E.g. in `php.ini`:
@@ -60,7 +40,7 @@ and [yarn](https://yarnpkg.com/en/docs/install)
upload_max_filesize = 64M
```
-9. Increase the MySQL max size of queries, and be more lenient on the SQL syntax.
+2. Increase the MySQL max size of queries, and be more lenient on the SQL syntax.
Add to the config, e.g. `/etc/mysql/conf.d/labnbook.conf`:
```
[mysqld]
@@ -69,7 +49,33 @@ and [yarn](https://yarnpkg.com/en/docs/install)
sql-mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
```
-10. Configure your webserver : if you are developping just use laravel's `php artisan serve`, else see the end of the legacy local install instructions
+3. Create the database and a mysql user:
+ ```
+ echo "CREATE DATABASE labnbook DEFAULT CHARACTER SET 'utf8mb4' DEFAULT COLLATE 'utf8mb4_unicode_ci';" | mysql
+ echo "GRANT ALL PRIVILEGES ON labnbook.* TO labnbook@localhost IDENTIFIED BY 'monmdp';" | mysql
+ ```
+
+4. Create the DB:
+ ```
+ mysql -u labnbook -p labnbook < public/data/sql/labnbook_struct.sql
+ mysql -u labnbook -p labnbook < public/data/sql/labnbook_data.sql
+ ```
+
+5. Copy `.env.sample` to `.env` and edit it (change db password)
+
+6. To install Labnbook dependencies, you need [composer](https://getcomposer.org/download/)
+ and [yarn](https://yarnpkg.com/en/docs/install)
+
+7. Run `composer install`
+
+8. Generate laravel key `php artisan key:generate` and public storage link `php artisan storage:link`
+
+9. Run the configuration script : `./refresh.sh` that will install composer and yarn dependencies and run migrations
+
+10. If you are using apache2, copy `docker/labnbook.conf` to `/etc/apache2/sites-available/labnbook.conf`, edit it and enable it
+
+11. Go to http://your.labnbook.domain.tld, and connect with the user "admin" and the password "mdp"
### Docker install
Aussi, j'ai eu quelques soucis sur l'étape de refresh.sh, mais j'ai vu ça avec David Beniamine et ces erreurs dépendent des données chargées par le dump public/data/sql/labnbook_data.sql
.
Edited by EXT Thibaud B