0% found this document useful (0 votes)
136 views3 pages

Librenms Ubuntu Server

This document provides instructions for installing and configuring the LibreNMS network monitoring system on a server. It describes steps such as installing prerequisite packages, creating a database and user, cloning the LibreNMS code repository, configuring PHP, MariaDB, SNMP and systemd service files.

Uploaded by

Nendar Anubiezz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
136 views3 pages

Librenms Ubuntu Server

This document provides instructions for installing and configuring the LibreNMS network monitoring system on a server. It describes steps such as installing prerequisite packages, creating a database and user, cloning the LibreNMS code repository, configuring PHP, MariaDB, SNMP and systemd service files.

Uploaded by

Nendar Anubiezz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

#NGINX

apt install software-properties-common


add-apt-repository universe
apt update
apt install acl curl composer fping git graphviz imagemagick mariadb-client
mariadb-server mtr-tiny nginx-full nmap php7.4-cli php7.4-curl php7.4-fpm php7.4-gd
php7.4-json php7.4-mbstring php7.4-mysql php7.4-snmp php7.4-xml php7.4-zip rrdtool
snmp snmpd whois unzip python3-pymysql python3-dotenv python3-redis python3-
setuptools python3-systemd

#Add LibreNMS user


useradd librenms -d /opt/librenms -M -r -s "$(which bash)"

#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/

#Install PHP dependencies


su - librenms
ls
./scripts/composer_wrapper.php install --no-dev
exit

#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

timedatectl set-timezone Asia/Jakarta

date
#Configure mariadb
nano /etc/mysql/mariadb.conf.d/50-server.cnf

tambahkan pada basic setting


innodb_file_per_table=1
lower_case_table_names=0

systemctl enable mariadb


systemctl restart mariadb

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

Change [www] to [librenms]:

[librenms]
Change user and group to "librenms":

user = librenms
group = librenms
Change listen to a unique name:

listen = /run/php-fpm-librenms.sock

#Enable lnms command completion


ln -s /opt/librenms/lnms /usr/bin/lnms
cp /opt/librenms/misc/lnms-completion.bash /etc/bash_completion.d/

#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

curl -o /usr/bin/distro https://raw.githubusercontent.com/librenms/librenms-


agent/master/snmp/distro

chmod +x /usr/bin/distro
systemctl enable snmpd
systemctl restart snmpd

#Copy logrotate config


cp /opt/librenms/misc/librenms.logrotate /etc/logrotate.d/librenms

#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

You might also like