Skip to content

Commit

Permalink
Split install steps into git clone and composer install (#10249)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
murrant committed Jun 12, 2019
1 parent fd7defd commit 0baeb07
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 27 deletions.
2 changes: 1 addition & 1 deletion doc/Developing/Getting-Started.md
Expand Up @@ -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
Expand Down
23 changes: 15 additions & 8 deletions doc/Installation/Installation-CentOS-7-Apache.md
Expand Up @@ -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 ##

Expand Down Expand Up @@ -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.
Expand Down
23 changes: 15 additions & 8 deletions doc/Installation/Installation-CentOS-7-Nginx.md
Expand Up @@ -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 ##

Expand Down Expand Up @@ -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.
Expand Down
21 changes: 14 additions & 7 deletions doc/Installation/Installation-Ubuntu-1804-Apache.md
Expand Up @@ -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 ##

Expand Down Expand Up @@ -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 ##

Expand Down
17 changes: 15 additions & 2 deletions doc/Installation/Installation-Ubuntu-1804-Nginx.md
Expand Up @@ -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 ##

Expand Down
2 changes: 1 addition & 1 deletion doc/Installation/index.md
Expand Up @@ -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/)
Expand Down

0 comments on commit 0baeb07

Please sign in to comment.