How to Install Observium on Ubuntu 18.04

r00t June 14, 2018

Install Observium on Ubuntu 18.04

In this tutorial we are going to learn how to install Observium on Ubuntu 18.04. We will also install and configure its prerequisites. Observium is an open source system monitoring software written in PHP. It is a cross-platform application and supports all popular operating systems such as Windows, Linux, NetApp, Cisco, FreeBSD, Dell, Netscaler and much more.

I recommend to use a minimal Ubuntu server setup as a basis for the tutorial, that can be a virtual or a root server image with an Ubuntu 18.04 Bionic Beaver minimal install from a web hosting company or you use our minimal server tutorial to install a server from scratch.

Install Observium on Ubuntu 18.04

Step 1. First, ensure your system and apt package lists are fully up-to-date by running the following:

apt-get update -y
apt-get upgrade -y

Step 2. Installing LAMP on Ubuntu 18.04.

You should check out this LAMP stack install tutorial for Ubuntu 18.04, if you haven’t installed LAMP yet. Once it’s installed, come back here and read on. We also will install the required packages for LAMP stack and the important PHP extension that TextPattern CMS relies on:

apt-get install php7.2 libapache2-mod-php7.2 php7.2-common php7.2-mbstring php7.2-xmlrpc php7.2-soap php7.2-mysql php7.2-gd php7.2-xml php7.2-cli php7.2-zip

Step 3. Installing Observium on Ubuntu 18.04.

First, Download the latest community version of Observium:

tar zxvf observium-community-latest.tar.gz
mv observium /var/www/html/observium
mkdir -p /var/www/html/observium/rrd

Now just set the right permissions for the folders:

chown www-data:www-data -R /var/www/html/observium

Step 4. Create a database for Observium.

Next, we need to create a database for the Observium installation:

mysql -uroot -p

Run the following command to create a database for Observium:

MariaDB [(none)]> SET GLOBAL sql_mode='';
MariaDB [(none)]> CREATE DATABASE observiumdb;
MariaDB [(none)]> CREATE USER 'observiumuser'@'localhost' IDENTIFIED BY 'y0uR-pa55W0rd';
MariaDB [(none)]> GRANT ALL PRIVILEGES ON observiumdb.* TO 'observiumuser'@'localhost';
MariaDB [(none)]> exit

Step 5. Configure Apache web server for Observium.

For this you can take the default config as a template:

cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/observium.conf

Now edit the currently created Config as follows:

nano /etc/apache2/sites-available/observium.conf

Modify the virtual host file for your Observium site to resemble the example below:

<VirtualHost *:80>
 DocumentRoot /var/www/html/observium/html

<Directory /var/www/html/observium/html/>
 Options FollowSymlinks
 AllowOverride All
 Require all granted

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined


Finally, reload the web server as suggested, for the changes to take effect:

a2ensite observium.conf
a2enmod rewrite
systemctl restart apache2.service

Next, Create a config.php file:

nano /var/www/html/observium/config.php

Add the following lines:

$config[‘db_extension’] = ‘mysqli’;
$config[‘db_host’] = ‘localhost’;
$config[‘db_user’] = ‘observiumuser’;
$config[‘db_pass’] = ‘y0uR-pa55W0rd’;
$config[‘db_name’] = ‘observiumdb’;
$config[‘snmp’][‘community’] = array(“public”);
$config[‘auth_mechanism’] = “mysql”;

Then, run the following commands to insert the default schema:

cd /var/www/html/observium/
php ./discovery.php -u

Step 6. Create a user account.

Create a user account, use level of 10 for admin:

./adduser.php admin <your-password> 10

Step 7. Accessing Observium open source network monitoring.

Now you can access the Observium web install wizard in your browser by entering the domain name or http://yourdomain/ to continue your Observium installation.

Install Observium on Ubuntu 18.04

Congratulation’s! You have successfully install and configured Observium on your Ubuntu 18.04 server. Thanks for using this tutorial installing Observium open source network monitoring tool on Ubuntu 18.04 LTS (Bionic Beaver) system.

The Tags:

Leave a Comment

Comments are closed.