1 Introduction

1.1 Goals

1.2 Notes

2 Observium installation

2.1 1. Installation based on offical instructions

Do note that you will need to run the commands that require you to install packages using sudo, or temporarily switch to using a root shell with sudo -s

The instructions below are take from:

http://www.observium.org/wiki/Debian_Ubuntu_Installation

We have made a couple of minor changes, but the URL above is the authoritative source of how to install Observium.

We will do this installation as the root user. Connect to your virtual machine as user sysadm and then do:

$ sudo -s
# apt-get update
# apt-get install libapache2-mod-php5 php5-cli php5-mysql php5-gd php5-snmp php-pear snmp graphviz \
                  php5-mcrypt php5-json subversion mysql-server mysql-client rrdtool fping \
                  imagemagick whois mtr-tiny nmap ipmitool python-mysqldb

This will take some time.

When or if prompted for the mysql root password this should be your .

Once packages finish installing we do:

# mkdir -p /opt/observium && cd /opt
# wget http://noc.ws.nsrc.org/downloads/observium/observium-community-latest.tar.gz
# tar zxvf observium-community-latest.tar.gz
# cd observium
# cp config.php.default config.php
# editor config.php

Find these two lines:

$config['db_user'] = 'USERNAME';
$config['db_pass'] = 'PASSWORD';

and change them to be:

$config['db_user'] = 'observium';
$config['db_pass'] = '<CLASS PASSWORD>';

Exit and save the file.

Now we need to create an Observium database and set the password for the observium user as well as set privileges for the user. The "mysql root password" noted below should be your :

# mysql -u root -p  <mysql root password>
mysql> CREATE DATABASE observium;
mysql> GRANT ALL PRIVILEGES ON observium.* TO 'observium'@'localhost' IDENTIFIED BY '<observium db password>';
mysql> exit

Now we populate the database and create a couple of directories:

# cd /opt/observium
# php includes/update/update.php
# mkdir rrd
# chown www-data:www-data rrd
# mkdir logs
# chown www-data logs

Now we create an observium user named "admin" with privileges to update/add/delete entries via the observium web interface:

# ./adduser.php admin <CLASS_PASSWORD> 10

2.2 2. Configure your virtualhost for Observium

Make sure that the name "observiumX.ws.nsrc.org", where X is the number of your machine, works:

# ping observiumX.ws.nsrc.org
PING observiumX.ws.nsrc.org (10.10.9.34) 56(84) bytes of data.
64 bytes from pcX.ws.nsrc.org (10.10.9.34): icmp_req=1 ttl=64 time=0.014 ms
64 bytes from pcX.ws.nsrc.org (10.10.9.34): icmp_req=2 ttl=64 time=0.059 ms
^C

(Of course this will only work if the DNS for your class has been set up with entries for your Observium virtual hosts, which your instructors should have done).

# cd /etc/apache2/sites-available
# editor observium

In this file add the following:

<VirtualHost *:80>
  DocumentRoot /opt/observium/html/
  ServerName  observiumX.ws.nsrc.org
  CustomLog /opt/observium/logs/access_log combined
  ErrorLog /opt/observium/logs/error_log
  <Directory "/opt/observium/html/">
    AllowOverride All
    Options FollowSymLinks MultiViews
  </Directory>
</VirtualHost>

Note the line that reads:

    ServerName observiumX.ws.nsrc.org

... and replace "X" with the number of your virtual machine.

Save the file and exit.

3 2. Enable your new virtual host

# a2enmod rewrite
# a2ensite observium
# service apache2 restart

Now let's go back to being the sysadm user:

# exit
$

Observium has now been installed and initially configured on your virutal machine. In the next lab you will do the following: