How to Install Observium on AlmaLinux, Rocky Linux, Debian, and Ubuntu

Observium is a network monitoring platform that provides automatic discovery of devices and supports a wide range of device types. In this guide, we’ll show you how to install Observium on AlmaLinux, Rocky Linux, Debian, and Ubuntu.


Prerequisites:

Before starting the installation, ensure the following:

  • A server running AlmaLinux, Rocky Linux, Debian, or Ubuntu.
  • Root or sudo access to your server.
  • A LAMP stack (Linux, Apache, MySQL/MariaDB, PHP) installed.
  • A domain or subdomain pointing to your server.

Step 1: Update the System

Make sure all system packages are up-to-date.

  • For Ubuntu/Debian:
 
sudo apt update && sudo apt upgrade -y
  • For AlmaLinux/Rocky Linux:
 
sudo dnf update -y

Step 2: Install Required Software

Observium requires Apache, MySQL/MariaDB, PHP, and SNMP. You’ll need to install these dependencies.

  1. Install Apache, MySQL/MariaDB, PHP, SNMP, and required PHP extensions:
  • For Ubuntu/Debian:
 
sudo apt install apache2 mariadb-server php php-cli php-mbstring php-mysql php-snmp snmp snmpd libapache2-mod-php -y
  • For AlmaLinux/Rocky Linux:
 
sudo dnf install httpd mariadb-server php php-cli php-mbstring php-mysqlnd php-snmp snmp snmpd libapache2-mod-php -y

Step 3: Configure the Database

Observium requires a database to store its data. Let’s create a database for Observium.

  1. Log in to MariaDB:
 
sudo mysql -u root -p
  1. Create a database and user for Observium:
sql
 
CREATE DATABASE observium; CREATE USER 'observium'@'localhost' IDENTIFIED BY 'your_password'; GRANT ALL PRIVILEGES ON observium.* TO 'observium'@'localhost'; FLUSH PRIVILEGES; EXIT;

Step 4: Install Observium

  1. Navigate to the web directory:
 
cd /var/www/html
  1. Download and install Observium:
 
sudo wget https://github.com/observium/observium/archive/refs/tags/22.10.0.tar.gz -O observium.tar.gz sudo tar -zxvf observium.tar.gz sudo mv observium-22.10.0 observium
  1. Set the correct permissions for Observium:
 
sudo chown -R www-data:www-data /var/www/html/observium # For Ubuntu/Debian sudo chown -R apache:apache /var/www/html/observium # For AlmaLinux/Rocky Linux

Step 5: Configure Apache (for AlmaLinux/Rocky Linux)

  1. Create a new Apache configuration file for Observium:
 
sudo nano /etc/httpd/conf.d/observium.conf
  1. Add the following content:
apache
 
<VirtualHost *:80> ServerAdmin [email protected] DocumentRoot /var/www/html/observium ServerName yourdomain.com ErrorLog /var/log/httpd/error_log CustomLog /var/log/httpd/access_log combined <Directory /var/www/html/observium> AllowOverride All Require all granted </Directory> </VirtualHost>
  1. Restart Apache:
 
sudo systemctl restart httpd

Step 6: Configure Apache (for Ubuntu/Debian)

  1. Create a new Apache site configuration file for Observium:
 
sudo nano /etc/apache2/sites-available/observium.conf
  1. Add the following content:
apache
 
<VirtualHost *:80> ServerAdmin [email protected] DocumentRoot /var/www/html/observium ServerName yourdomain.com ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined <Directory /var/www/html/observium> AllowOverride All Require all granted </Directory> </VirtualHost>
  1. Enable the new site and rewrite module:
 
sudo a2ensite observium.conf sudo a2enmod rewrite
  1. Restart Apache:
 
sudo systemctl restart apache2

Step 7: Set Up Observium Database

  1. Navigate to the Observium directory:
 
cd /var/www/html/observium
  1. Set up the Observium database:
 
sudo ./discovery.php -u
  1. Set the correct file permissions for the config.php and other required directories:
 
sudo chmod 775 config.php sudo chmod -R 775 logs/ rrd/ html/

Step 8: Access Observium Web Interface

  1. Open your browser and navigate to your domain (e.g., http://yourdomain.com).

  2. You should see the Observium web interface. Log in with the default admin credentials.

  3. Set up your admin user and configure your devices for monitoring.


Step 9: Secure the Installation (Optional)

For production environments, it’s recommended to secure your Observium installation with SSL and strong credentials.

  1. Install Certbot:
  • For Ubuntu/Debian:
 
sudo apt install certbot python3-certbot-apache -y
  • For AlmaLinux/Rocky Linux:
 
sudo dnf install certbot python3-certbot-apache -y
  1. Obtain an SSL certificate:
 
sudo certbot --apache -d yourdomain.com

Conclusion

You have successfully installed Observium on your AlmaLinux, Rocky Linux, Debian, or Ubuntu server. You can now access your Observium dashboard and start monitoring your network.

Răspunsul a fost util? 0 utilizatori au considerat informația utilă (0 Voturi)

Powered by WHMCompleteSolution