Librenms Ubuntu Server
Librenms Ubuntu Server
#Download LibreNMS
cd /opt
git clone https://github.com/librenms/librenms.git
#Set Permissions
chown -R librenms:librenms /opt/librenms
chmod 771 /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/
#Set timezone
nano /etc/php/7.4/fpm/php.ini
(change) ;date.timezone =
(to) date.timezone = Asia/Jakarta
save setting = ctrl+o > enter > ctrl+x
nano /etc/php/7.4/cli/php.ini
(change) ;date.timezone=
(to) date.timezone=Asia/Jakarta
save setting = ctrl+o >> ctrl+c
date
#Configure mariadb
nano /etc/mysql/mariadb.conf.d/50-server.cnf
mysql -u root
CREATE DATABASE librenms CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'librenms'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON librenms.* TO 'librenms'@'localhost';
FLUSH PRIVILEGES;
exit
#Configure PHP-FPM
cp /etc/php/7.4/fpm/pool.d/www.conf /etc/php/7.4/fpm/pool.d/librenms.conf
nano /etc/php/7.4/fpm/pool.d/librenms.conf
[librenms]
Change user and group to "librenms":
user = librenms
group = librenms
Change listen to a unique name:
listen = /run/php-fpm-librenms.sock
#Configure snmpd
cp /opt/librenms/snmpd.conf.example /etc/snmp/snmpd.conf
nano /etc/snmp/snmpd.conf
Edit the text which says RANDOMSTRINGGOESHERE and set your own community string.
randomsnmp
chmod +x /usr/bin/distro
systemctl enable snmpd
systemctl restart snmpd
#Web installer
chown librenms:librenms /opt/librenms/config.php
#Python module
apt-get install python-3.pip
su - librenms
pip3 install -r requirements.txt
#Systemd
cp /opt/librenms/misc/librenms.service /etc/systemd/system/librenms.service &&
systemctl enable --now librenms.service
--------------------
user = librenms
pass = password