From 0baeb077541d16011da07eb23edcc4cea399a5fa Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Wed, 12 Jun 2019 00:21:32 -0500 Subject: [PATCH] Split install steps into git clone and composer install (#10249) * Split install steps into git clone and composer install This gives the admin a little more knowledge about how to maintain the system, showing them composer_wrapper.php and su - librenms They will get errors if composer_wrapper doesn't work because of a proxy or no internet connection We lose stats on packagist.org (https://packagist.org/packages/librenms/librenms/stats) If we wanted to keep stats, we could use: ``` COMPOSER_ALLOW_SUPERUSER=1 composer create-project --no-dev --no-install --keep-vcs librenms/librenms librenms dev-master ``` not sure that is worth it. * fix composer_wrapper.php path --- doc/Developing/Getting-Started.md | 2 +- .../Installation-CentOS-7-Apache.md | 23 ++++++++++++------- .../Installation-CentOS-7-Nginx.md | 23 ++++++++++++------- .../Installation-Ubuntu-1804-Apache.md | 21 +++++++++++------ .../Installation-Ubuntu-1804-Nginx.md | 17 ++++++++++++-- doc/Installation/index.md | 2 +- 6 files changed, 61 insertions(+), 27 deletions(-) diff --git a/doc/Developing/Getting-Started.md b/doc/Developing/Getting-Started.md index 545e770d4e..1127b975b8 100644 --- a/doc/Developing/Getting-Started.md +++ b/doc/Developing/Getting-Started.md @@ -14,7 +14,7 @@ Possible options: ### Set up your development git clone 1. Follow the [documentation on using git](Using-Git.md) - 2. Install development dependencies `./composer_wrapper.php install` + 2. Install development dependencies `./scripts/composer_wrapper.php install` 3. Set variables in .env, including database settings. Which could be a local or remote MySQL server including your production DB. ```dotenv APP_ENV=local diff --git a/doc/Installation/Installation-CentOS-7-Apache.md b/doc/Installation/Installation-CentOS-7-Apache.md index a20e89d30a..7c2d327af5 100644 --- a/doc/Installation/Installation-CentOS-7-Apache.md +++ b/doc/Installation/Installation-CentOS-7-Apache.md @@ -17,10 +17,23 @@ path: blob/master/doc/ useradd librenms -d /opt/librenms -M -r usermod -a -G librenms apache -#### Install LibreNMS +#### Download LibreNMS cd /opt - composer create-project --no-dev --keep-vcs librenms/librenms librenms dev-master + git clone https://github.com/librenms/librenms.git + +#### Set permissions + + chown -R librenms:librenms /opt/librenms + chmod 770 /opt/librenms + setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/ + setfacl -R -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/ + +#### Install PHP dependencies + + su - librenms + ./scripts/composer_wrapper.php install --no-dev + exit ## DB Server ## @@ -164,12 +177,6 @@ LibreNMS keeps logs in `/opt/librenms/logs`. Over time these can become large an cp /opt/librenms/misc/librenms.logrotate /etc/logrotate.d/librenms -### Set permissions - - chown -R librenms:librenms /opt/librenms - setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/ - setfacl -R -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/ - ## Web installer ## Now head to the web installer and follow the on-screen instructions. diff --git a/doc/Installation/Installation-CentOS-7-Nginx.md b/doc/Installation/Installation-CentOS-7-Nginx.md index b7deab9f97..0dc1d435bc 100644 --- a/doc/Installation/Installation-CentOS-7-Nginx.md +++ b/doc/Installation/Installation-CentOS-7-Nginx.md @@ -20,7 +20,21 @@ path: blob/master/doc/ #### Download LibreNMS cd /opt - composer create-project --no-dev --keep-vcs librenms/librenms librenms dev-master + git clone https://github.com/librenms/librenms.git + +#### Set permissions + + chown -R librenms:librenms /opt/librenms + chmod 770 /opt/librenms + setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/ + setfacl -R -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/ + chgrp apache /var/lib/php/session/ + +#### Install PHP dependencies + + su - librenms + ./scripts/composer_wrapper.php install --no-dev + exit ## DB Server ## @@ -194,13 +208,6 @@ LibreNMS keeps logs in `/opt/librenms/logs`. Over time these can become large an cp /opt/librenms/misc/librenms.logrotate /etc/logrotate.d/librenms -### Set permissions - - chown -R librenms:librenms /opt/librenms - setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/ - setfacl -R -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/ - chgrp apache /var/lib/php/session/ - ## Web installer ## Now head to the web installer and follow the on-screen instructions. diff --git a/doc/Installation/Installation-Ubuntu-1804-Apache.md b/doc/Installation/Installation-Ubuntu-1804-Apache.md index af20f104a2..7064b91b07 100644 --- a/doc/Installation/Installation-Ubuntu-1804-Apache.md +++ b/doc/Installation/Installation-Ubuntu-1804-Apache.md @@ -15,11 +15,23 @@ path: blob/master/doc/ useradd librenms -d /opt/librenms -M -r usermod -a -G librenms www-data -#### Install LibreNMS +#### Download LibreNMS cd /opt - composer create-project --no-dev --keep-vcs librenms/librenms librenms dev-master + git clone https://github.com/librenms/librenms.git + +#### Set permissions + chown -R librenms:librenms /opt/librenms + chmod 770 /opt/librenms + setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/ + setfacl -R -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/ + +#### Install PHP dependencies + + su - librenms + ./scripts/composer_wrapper.php install --no-dev + exit ## DB Server ## @@ -109,11 +121,6 @@ LibreNMS keeps logs in `/opt/librenms/logs`. Over time these can become large an cp /opt/librenms/misc/librenms.logrotate /etc/logrotate.d/librenms -### Set permissions - - chown -R librenms:librenms /opt/librenms - setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/ - setfacl -R -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/ ## Web installer ## diff --git a/doc/Installation/Installation-Ubuntu-1804-Nginx.md b/doc/Installation/Installation-Ubuntu-1804-Nginx.md index cc6ececfb9..e4d7a3b9e5 100644 --- a/doc/Installation/Installation-Ubuntu-1804-Nginx.md +++ b/doc/Installation/Installation-Ubuntu-1804-Nginx.md @@ -15,10 +15,23 @@ path: blob/master/doc/ useradd librenms -d /opt/librenms -M -r usermod -a -G librenms www-data -#### Install LibreNMS +#### Download LibreNMS cd /opt - composer create-project --no-dev --keep-vcs librenms/librenms librenms dev-master + git clone https://github.com/librenms/librenms.git + +#### Set permissions + + chown -R librenms:librenms /opt/librenms + chmod 770 /opt/librenms + setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/ + setfacl -R -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/ + +#### Install PHP dependencies + + su - librenms + ./scripts/composer_wrapper.php install --no-dev + exit ## DB Server ## diff --git a/doc/Installation/index.md b/doc/Installation/index.md index 3724a3eea6..3adb30ca86 100644 --- a/doc/Installation/index.md +++ b/doc/Installation/index.md @@ -22,7 +22,7 @@ If you want to install manually then we have some documentation which should mak - [RHEL / CentOS 7 Nginx](http://docs.librenms.org/Installation/Installation-CentOS-7-Nginx/) ### Old Install Docs -These install docs are longer updated and may result in an unsuccessful install. +These install docs are no longer updated and may result in an unsuccessful install. - [Ubuntu 16.04 Apache](http://docs.librenms.org/Installation/Installation-Ubuntu-1604-Apache/) - [Ubuntu 16.04 Nginx](http://docs.librenms.org/Installation/Installation-Ubuntu-1604-Nginx/)