Installation
Compatability
This guide works with Ubuntu 12.04, 13.04 and Debian 7.
Ubuntu 13.10
The new release of Saucy Salamander from Ubuntu has changed enough things that following the installation guide below will not leave you with a working installation. We currently recommend installing using 13.04.
Install the packages we need to run 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
If you want to be able to monitor libvirt virtual machines, install libvirt-bin (beware: this pulls in a whole bunch of dependencies you otherwise probably wouldn't need on your server):
apt-get install libvirt-bin
Create a directory for Observium to live in:
mkdir -p /opt/observium && cd /opt
Downloading
Observium Editions
Observium comes in two editions, an Community/Open Source edition, and a Subscription edition with additional features, rapid feature/fix release cycle and easy to use SVN-based release mechanism.
Observium Open Source Edition
If you would like to try out Observium using the Community/Open Source Edition, please install using the most recent .tar.gz release.
Download the latest .tar.gz of Observium and unpack:
wget http://www.observium.org/observium-community-latest.tar.gz
tar zxvf observium-community-latest.tar.gz
Observium Subscription
If you have a valid Observium [subscription], please use one of the automated SVN release repositories.
For the CURRENT revision:
svn co http://svn.observium.org/svn/observium/trunk observium
For the STABLE revision:
svn co http://svn.observium.org/svn/observium/branches/stable observium
Configuration
Change into the new install directory:
cd observium
Important!
Please read all the documentation before continuing. This includes the FAQ page.
If you're not satisfied with what you find, do not continue installation. "Clever tricks" that "fix" what is "broken" are not supported.
If you're not satisfied with what you find, do not continue installation. "Clever tricks" that "fix" what is "broken" are not supported.
Copy the default configuration file and edit it for your system:
cp config.php.default config.php
MySQL Authentication
You must change the MySQL username and password. Most other settings can be left as default.
Create the MySQL database:
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>';
Edit config.php. Change the options to reflect your installation.
Setup the MySQL database and insert the default schema:
php includes/update/update.php
It is OK to have some errors in the SQL revisions up to 006.
Create the directory to store RRDs in:
mkdir rrd
chown www-data:www-data rrd
If the server will be running *only* Observium, change /etc/apache2/sites-available/default to :
<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>
Alternatively you can create a vhost just for Observium (see the bottom of the page)
Enable mod_rewrite for Observium's cleaner URLs:
a2enmod rewrite
apache2ctl restart
Add a first user, use level of 10 for admin:
cd /opt/observium
./adduser.php <username> <password> <level>
Add a first device to monitor:
./add_device.php <hostname> <community> v2c
Do an initial discovery and polling run to populate the data for the new device:
./discovery.php -h all
./poller.php -h all
Add cron jobs, create a new file /etc/cron.d/observium with the following contents:
Important!
Please note that the below example includes a username, so will only work in /etc/crontab or /etc/cron.d/observium. It will NOT work in a user crontab edited with crontab -e.
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
service cron reload
Please note running only a single poller instance is good for initial testing, but do check the Performance tuning page for further performance enhancing options once you get going.
You should now be able to see <server ip>
Source : http://www.observium.org/wiki/Debian_Ubuntu_Installation
Tidak ada komentar:
Posting Komentar