LibreNMS Server Install Script

I created an installation script for LibreNMS for Ubuntu server 18.04 LTS. I figured I would post it here for others to use, if needed. This was done purely as a learning exercise. If you see something that needs fixed feel free to let me know, or use git hub to submit a fix.

Nifty!

The main problem I see is it uses hard-coded passwords for mysql and snmpd community.

Also, you can automate the steps that happen in the install.php web ui.

Check the official docker if you want to see an example of automated install.

Thanks for the tips. I’ll work on adding some automation, esp. for the password.

1 Like

I need to run only this → install.sh ?

Greetings

###########################################################
Adding libreNMS user to the www-data group
###########################################################
Setting permissions and file access controls
###########################################################
running PHP installer script as librenms user
###########################################################
Could not scan for classes inside "vendor/dapphp/radius" which does not appear to be a file nor a folder
> LibreNMS\ComposerHelper::preInstall
Installing dependencies from lock file
Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run composer update.

  Problem 1
    - Root composer.json requires php ^7.3 || ^8.0 but your php version (7.2.24) does not satisfy that requirement.
  Problem 2
    - laravel/framework is locked to version v8.80.0 and an update of this package was not requested.
    - laravel/framework v8.80.0 requires php ^7.3|^8.0 -> your php version (7.2.24) does not satisfy that requirement.
  Problem 3
    - laravel/serializable-closure is locked to version v1.0.5 and an update of this package was not requested.
    - laravel/serializable-closure v1.0.5 requires php ^7.3|^8.0 -> your php version (7.2.24) does not satisfy that requirement.
  Problem 4
    - laravel/ui is locked to version v3.4.1 and an update of this package was not requested.
    - laravel/ui v3.4.1 requires php ^7.3|^8.0 -> your php version (7.2.24) does not satisfy that requirement.
  Problem 5
    - ramsey/collection is locked to version 1.2.2 and an update of this package was not requested.
    - ramsey/collection 1.2.2 requires php ^7.3 || ^8 -> your php version (7.2.24) does not satisfy that requirement.
  Problem 6
    - laravel/framework v8.80.0 requires php ^7.3|^8.0 -> your php version (7.2.24) does not satisfy that requirement.
    - tightenco/ziggy 0.9.4 requires laravel/framework >=5.4@dev -> satisfiable by laravel/framework[v8.80.0].
    - tightenco/ziggy is locked to version 0.9.4 and an update of this package was not requested.

Why this during install.sh ?

###############################################################################################
Naviagte to http://192.168.100.215/install.php in you web browser to finish the installation.
###############################################################################################```

and if navigate to... 

The page is not working 192.168.100.215 is currently unable to handle the request.
HTTP ERROR 500

@Neo85 your PHP version is too old… apparently the script does not check that before starting.

I have updated the script for Ubuntu 22.04. I have also added a fix for PHP issue.