Install Observium on Debian/Ubuntu 🌱

  1. Log into the Linux device
  2. Run the following commands in a terminal window
    # install prerequisites
    sudo apt install libapache2-mod-php7.3 php7.3-cli php7.3-mysql php7.3-gd php7.3-json php-pear snmp fping mariadb-server mariadb-client python-mysqldb rrdtool subversion whois mtr-tiny ipmitool graphviz imagemagick apache2 -y
    # create a directory for observium
    sudo mkdir -p /opt/observium
    # download latest observium release
    sudo wget http://www.observium.org/observium-community-latest.tar.gz
    sudo tar zxvf observium-community-latest.tar.gz --directory /opt
    # configure the MySQL database
    sudo su
    mysql_secure_installation
  3. Press Enter to login as root
  4. Type Y and press Enter to set a root password, type the password twice to confirm
  5. Type Y and press Enter to remove anonymous users
  6. Type Y and press Enter to disallow root login remotely
  7. Type Y and press Enter to remove the test database
  8. Type Y and press Enter to reload privilege tables
  9. Run the following command to login into MySQL:
    mysql -u root -p
  10. Authenticate with the root password set earlier
  11. Run the following commands to create the Observium database and database user
    CREATE DATABASE observium DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
    GRANT ALL ON observium.* to 'observium_rw'@'localhost' IDENTIFIED BY '0b5erv1um!!';
    FLUSH PRIVILEGES;
    EXIT;
    exit
  12. Continue with the following commands
    sudo cp /opt/observium/config.php.default /opt/observium/config.php
    sudo nano /opt/observium/config.php
  13. Update the MySQL connection information
  14. Press CTRL+O, Enter, CTRL+X to write the changes to config.php
  15. Continue with the following commands
    # create the database objects
    /opt/observium/discovery.php -u
    # create the logs directory
    sudo mkdir -p /opt/observium/logs
    # create RRDs directory
    sudo mkdir /opt/observium/rrd
    sudo chown www-data:www-data /opt/observium/rrd
    # create observium apache2 configuration
    sudo nano /etc/apache2/sites-available/observium.conf
  16. Paste the following configuration

    Listen 8001

    <VirtualHost *:8001>
        DocumentRoot /opt/observium/html
        <Directory />
            AllowOverride All
            Options FollowSymLinks MultiViews
            Require all granted
        </Directory>
    </VirtualHost>

  17. Press CTRL+O, Enter, CTRL+X to write the changes to observium.conf
  18. Continue with the following commands
    # enable required apache modules
    sudo a2enmod rewrite
    # enable the observium site
    sudo a2ensite observium
    # restart apache2 service
    sudo systemctl restart apache2
    # create an admin user account
    /opt/observium/adduser.php i12bretro supersecurepw 10
  19. Open a web browser and navigate to http://DNSorIP:8001
  20. Log into Observium with the user created above
  21. Welcome to Observium