How to Install LibreNMS on Ubuntu 16.04


  1. A fresh Alibaba cloud Ubuntu 16.04 instance.
  2. A static IP address is configured on the instance.
  3. A Root password is setup on the server.

Launch Alibaba Cloud ECS Instance

apt-get update -y

Install LAMP Server

apt-get install apache2 mariadb-server -y
systemctl start apache2
systemctl start mysql
systemctl enable apache2
systemctl enable mysql
apt-get install software-properties-common -y
add-apt-repository ppa:ondrej/php
apt-get install libapache2-mod-php7.1 php7.1-cli php7.1-mysql php7.1-gd php7.1-snmp php-pear php7.1-curl snmp graphviz php7.1-mcrypt php7.1-json fping imagemagick whois mtr-tiny nmap python-mysqldb snmpd php-net-ipv4 php-net-ipv6 rrdtool git -y
phpenmod mcrypt
a2enmod php7.1
a2dismod mpm_event
a2enmod mpm_prefork
nano /etc/php/7.1/cli/php.ini
date.time = Asia/Kolkata

Configure MariaDB

Change the password for root ? N
Remove anonymous users? Y
Disallow root login remotely? Y
Remove test database and access to it? Y
Reload privilege tables now? Y
mysql -u root -p
MariaDB [(none)]> CREATE DATABASE librenmsdb;
MariaDB [(none)]> CREATE USER 'librenmsuser'@'localhost' IDENTIFIED BY 'password';
MariaDB [(none)]> GRANT ALL PRIVILEGES ON librenmsdb.* TO 'librenmsuser'@'localhost';
MariaDB [(none)]> exit;

Download LibreNMS

useradd librenms -d /opt/librenms -M -r
usermod -a -G librenms www-data
cd /opt/
git clone librenms
./scripts/composer_wrapper.php install --no-dev
chown -R librenms:librenms /opt/librenms/
chmod -R 755 /opt/librenms

Configure Apache for LibreNMS

nano /etc/apache2/sites-available/librenms.conf
<VirtualHost *:80>
DocumentRoot /opt/librenms/html/
CustomLog /opt/librenms/logs/access_log combined
ErrorLog /opt/librenms/logs/error_log
AllowEncodedSlashes NoDecode
<Directory "/opt/librenms/html/">
Require all granted
AllowOverride All
Options FollowSymLinks MultiViews
a2ensite librenms.conf
a2enmod rewrite
systemctl restart apache2

Access LibreNMS Web Installation Wizard

cd /opt/librenms
cp librenms.nonroot.cron /etc/cron.d/librenms
cp misc/librenms.logrotate /etc/logrotate.d/librenms
systemctl restart cron
logrotate -f /etc/logrotate.conf
Component | Version
--------- | -------
LibreNMS | 1.41-13-g447ae69
DB Schema | 253
MySQL | 10.0.34-MariaDB-0ubuntu0.16.04.1
RRDTool | 1.5.5
[OK] Composer Version: 1.6.5
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct

Related Alibaba Cloud Products




Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Python String interpolation

Permutations & Combinations + Ruby

No more Copy & Paste: Sharing assets between Rails (and other) apps

Complete Guide to Data Validation Testing Tools and Techniques

Web Shell Hunting: Meet the Web Shell Analyzer

What is a STOSA Organization?

Summer Internship Story (Part 2)

My Goals for the KodeCamp Internship program as a back-end developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alibaba Cloud

Alibaba Cloud

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:

More from Medium

Kubernetes container orchestration commands and Interview questions and answers

Sessions & Session Management

Session Concepts

Red Hat Advanced Cluster Security for Kubernetes Configuration & Api Basics

Kubernetes Architecture — Processes run on Master Node