Observium is an open-source network monitoring and management platform that can be used to monitor a wide range of devices on your network. It provides real-time information about the health and performance of your network, as well as historical data that can be used for analysis and trend analysis.
In this article, we will show you how to install Observium on Debian 11 (also known as “Bullseye”). We will be using the command line for this tutorial, so you will need to have a basic understanding of how to use the Linux command line.
Before we begin, there are a few prerequisites that you will need to have in place in order to install Observium on your system:
- A server running Debian 11
- A user account with sudo privileges
- The apt package manager installed
Once you have these prerequisites in place, you can proceed with the installation.
- Update your system
Before you begin the installation, it is always a good idea to update your system to ensure that you have the latest security updates and bug fixes. To do this, log in to your server and run the following command:
sudo apt update
sudo apt upgrade
This will update the package list on your system and then upgrade any outdated packages to their latest versions.
- Install the necessary packages
Observium requires a number of dependencies in order to run, including the Apache web server, PHP, and the PHP GD library. To install these dependencies, run the following command:
sudo apt install apache2 php7.3-cli php7.3-mysql php7.3-gd php7.3-json php-pear snmp fping mariadb-server mariadb-client
This will install the Apache web server, PHP, and all of the other necessary packages.
- Create a database for Observium
Next, you will need to create a database for Observium to use. To do this, log in to the MariaDB database server using the following command:
mysql -u root -p
Enter your MariaDB root password when prompted, and then run the following SQL commands to create a database for Observium:
CREATE DATABASE observium;
GRANT ALL PRIVILEGES ON observium.* TO 'observium'@'localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
Replace “password” in the above commands with a strong password for the observium database user.
Step 4: Download and extract Observium
Now that the database is set up, you can download the latest version of Observium from their website. At the time of writing, the latest version is Observium Community Edition 19.12.7. To download it, run the following command:
wget <https://www.observium.org/observium-community-latest.tar.gz>
This will download the Observium package to your server. Once the download is complete, extract the package using the following command:
tar xvzf observium-community-latest.tar.gz
This will extract the Observium files into a directory named “observium”.
- Configure Observium
Before you can start using Observium, you will need to configure it with your database details and other settings.
To do this, copy the example configuration file to a new file called “config.php” using the following command:
cd observium
cp config.php.default config.php
Next, open the “config.php” file in a text editor and update the following settings:
$config['db_host'] = 'localhost';
$config['db_user'] = 'observium';
$config['db_pass'] = 'password';
$config['db_name'] = 'observium';
Be sure to replace “password” with the password you chose for the observium database user in Step 3.
Save the file and exit the text editor.
- Run the installation script
Next, you will need to run the installation script to set up the Observium database and populate it with the necessary data. To do this, run the following command:
./discovery.php -u
This will run the installation script, which will take a few minutes to complete. Once it is finished, you should see a message that says “Discovering devices, this will take a while…”.
- Create an Apache virtual host
In order to access Observium from a web browser, you will need to create an Apache virtual host for it. To do this, create a new virtual host configuration file using the following command:
sudo nano /etc/apache2/sites-available/observium.conf
Paste the following configuration into the file, making sure to update the “ServerName” and “DocumentRoot” values to match your own server:
<VirtualHost *:80>
ServerName observium.example.com
DocumentRoot /opt/observium/html
<Directory /opt/observium/html>
Options FollowSymlinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Save the file and exit the text editor.
Next, enable the virtual host using the following command:
sudo a2ensite observium
Finally, restart Apache using the following command:
sudo systemctl restart apache2
- Access Observium
At this point, Observium should be installed and configured on your server. To access it, open a web browser and navigate to the URL you specified in the Apache virtual host configuration file (e.g. http://observium.example.com/).
You should see the Observium login page. Use the default username “admin” and password “password” to log in to the system.
Once you are logged in, you can begin adding devices to Observium and monitoring them.
Conclusion
In this article, we showed you how to install Observium on Debian 11. We covered all of the necessary steps, including installing dependencies, setting up a database, configuring Observium, and creating an Apache virtual host. With Observium installed and configured, you can now begin monitoring your network devices in real-time.