A chef recipe to deploy LibreNMS
TODO: Instalation and configuration of LibreNMS
- Only tested on Centos 7.x and RHEL
- The web administration page is in port 8080 by default
- Fully tested on SELinux. Your welcome ;)
- This recipe is based on installation tutorial RHEL/CentOS + Nginx
- Librenms 1.45v
You need to install chef to run this recipe.
$ curl -L https://www.opscode.com/chef/install.sh | bash
Login as root user or use
sudo
instead
Firstly move to /var directory and clone the chef project
$ mkdir -p /var/chef/cookbooks
$ cd /var/chef/cookbooks
$ git clone https://github.com/jahrmando/librenms.git
You will should have root privilege to clone in /var directory
Run librenms cookbook
$ chef-solo -o 'recipe[librenms::default]'
Before, check the attributes/default.rb file to see what attributes to override if needed or use
sudo
instead
Atributes:
default['mariadb']['user_librenms']['password'] = 'Ch4ng3me'
default['librenms']['hostname'] = 'librenms.example.com'
default['librenms']['port_service'] = '8080'
default['librenms']['snmp_random_string'] = 'PaloCocinaPezCaosVerde'
default['librenms']['webmaster'] = 'webmaster@example.com'
default['librenms']['user_admin'] = 'administrator'
default['librenms']['user_pass'] = 'Ch4ng3meT00'
default['librenms']['phpini']['timezone'] = 'America/Mexico_City'
default['librenms']['scanning_discovery'] = ['10.0.0.0/8', '192.168.0.0/16']
Yep, You can test it with kitchen.
$ kitchen test default-centos-73
Tested on:
- CentOS 7.3
- CentOS 7.4
Secure your MariaDB installation, please execute this:
$ mysql_secure_installation