Install Ubuntu 12.04, no encrypted home folder, no LVM, GRUB boot loader is okay.
sudo passwd
set root password
su - root
Set static IP address
cp /etc/network/interfaces interfaces.dhcp
pico /etc/network/interfaces
auto eth0
iface eth0 inet static
address <address>
netmask <netmask>
gateway <gateway>
Set DNS
apt-get install resolvconf
cd /etc/resolvconf/resolv.conf.d
cp -p head head.orig #backup copy, always do this
nano head
nameserver <ip_of_nameserver>
resolvconf -u
Set Hostname
pico /etc/hosts #add name of server
pico /etc/hostname #add name of server
hostname <FQDN of the server>
/etc/init.d/networking restart
hostname
hostname -f #verify name of server
shutdown -r now
Install Observium
#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
#mkdir -p /opt/observium && cd /opt
#wget http://www.observium.org/observium-community-latest.tar.gz
#tar zxvf observium-community-latest.tar.gz
#rm tar zxvf observium-community-latest.tar.gz
#cd observium
#cp config.php.default config.php
#pico config.php
Edit the username, password and email for the system.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
## Have a look in includes/defaults.inc.php for examples of settings you can set here. DO NOT EDIT defaults.inc.php!
// Database config
$config['db_host'] = 'localhost';
$config['db_user'] = 'root';
$config['db_pass'] = '<password>';
$config['db_name'] = 'observium';
// Location
$config['install_dir'] = "/opt/observium";
// Thie should *only* be set if you want to *force* a particular hostname/port
// It will prevent the web interface being usable form any other hostname
#$config['base_url'] = "http://observium.company.com";
// Default community list to use when adding/discovering
$config['snmp']['community'] = array("<communityname>");
// Authentication Model
$config['auth_mechanism'] = "mysql"; // default, other options: ldap, http-auth, please see documentation for config help
// Enable alerter
// $config['poller-wrapper']['alerter'] = TRUE;
// Set up a default alerter (email to a single address)
$config['alerts']['alerter']['default']['descr'] = "Default Email Alert";
$config['alerts']['alerter']['default']['type'] = "email";
$config['alerts']['alerter']['default']['contact'] = "<emailaddress>";
$config['alerts']['alerter']['default']['enable'] = TRUE;
// End config.php
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
mysql -u root -p
<mysql root password>
mysql> CREATE DATABASE observium;
mysql> GRANT ALL PRIVILEGES ON observium.* TO 'root'@'localhost' IDENTIFIED BY '<observium db password>';
mysql> exit
#php includes/update/update.php
# mkdir rrd
# chown www-data:www-data rrd
# cp /etc/apache2/sites-available/default /etc/apache2/sites-available/default.orig
# rm /etc/apache2/sites-available/default
# pico /etc/apache2/sites-available/default
/etc/apache2/sites-available/default
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /opt/observium/html
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /opt/observium/html/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
ServerSignature On
</VirtualHost>
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# cd /etc/apache2
# a2enmod rewrite
# apache2ctl restart
# cd /opt/observium
# ./adduser.php <username> <password> 10
# ./add_device.php <hostname> <community> v2c
# ./discovery.php -h all
# ./poller.php -h all
# pico /etc/cron.d/observium
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
33 */6 * * * root /opt/observium/discovery.php -h all >> /dev/null 2>&1
*/5 * * * * root /opt/observium/discovery.php -h new >> /dev/null 2>&1
*/5 * * * * root /opt/observium/poller-wrapper.py 1 >> /dev/null 2>&1
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Go to http://<server ip> and login with previously created credentials.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.