Agenda: observium-install.htm

File observium-install.htm, 7.6 KB (added by admin, 5 years ago)
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
2<html xmlns="">
4  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5  <meta http-equiv="Content-Style-Type" content="text/css" />
6  <meta name="generator" content="pandoc" />
7  <title>Observium</title>
8  <style type="text/css">code{white-space: pre;}</style>
9  <link rel="stylesheet" href="../../style.css" type="text/css" />
12<div id="header">
13<h1 class="title">Observium</h1>
14<h3 class="date">Installation</h3>
16<div id="TOC">
18<li><a href="#introduction"><span class="toc-section-number">1</span> Introduction</a><ul>
19<li><a href="#goals"><span class="toc-section-number">1.1</span> Goals</a></li>
20<li><a href="#notes"><span class="toc-section-number">1.2</span> Notes</a></li>
22<li><a href="#observium-installation"><span class="toc-section-number">2</span> Observium installation</a><ul>
23<li><a href="#installation-based-on-offical-instructions"><span class="toc-section-number">2.1</span> 1. Installation based on offical instructions</a></li>
24<li><a href="#configure-your-virtualhost-for-observium"><span class="toc-section-number">2.2</span> 2. Configure your virtualhost for Observium</a></li>
26<li><a href="#enable-your-new-virtual-host"><span class="toc-section-number">3</span> 2. Enable your new virtual host</a></li>
29<h1 id="introduction"><a href="#introduction"><span class="header-section-number">1</span> Introduction</a></h1>
30<h2 id="goals"><a href="#goals"><span class="header-section-number">1.1</span> Goals</a></h2>
32<li>Learn how to install observium</li>
34<h2 id="notes"><a href="#notes"><span class="header-section-number">1.2</span> Notes</a></h2>
36<li>Commands preceded with &quot;$&quot; imply that you should execute the command as a general user - not as root.</li>
37<li>Commands preceded with &quot;#&quot; imply that you should be working as root.</li>
38<li>Commands with more specific command lines (e.g. &quot;rtrX&gt;&quot; or &quot;mysql&gt;&quot;) imply that you are executing commands on remote equipment, or within another program.</li>
40<h1 id="observium-installation"><a href="#observium-installation"><span class="header-section-number">2</span> Observium installation</a></h1>
41<h2 id="installation-based-on-offical-instructions"><a href="#installation-based-on-offical-instructions"><span class="header-section-number">2.1</span> 1. Installation based on offical instructions</a></h2>
42<p>Do note that you will need to run the commands that require you to install packages using <code>sudo</code>, or temporarily switch to using a root shell with <code>sudo -s</code></p>
43<p>The instructions below are take from:</p>
45<p>We have made a couple of minor changes, but the URL above is the authoritative source of how to install Observium.</p>
46<p>We will do this installation as the root user. Connect to your virtual machine as user sysadm and then do:</p>
47<pre><code>$ sudo -s
48# apt-get update
49# apt-get install libapache2-mod-php5 php5-cli php5-mysql php5-gd php5-snmp php-pear snmp graphviz \
50                  php5-mcrypt php5-json subversion mysql-server mysql-client rrdtool fping \
51                  imagemagick whois mtr-tiny nmap ipmitool python-mysqldb</code></pre>
52<p>This will take some time.</p>
53<p>When or if prompted for the mysql root password this should be your <CLASS PASSWORD>.</p>
54<p>Once packages finish installing we do:</p>
55<pre><code># mkdir -p /opt/observium &amp;&amp; cd /opt
56# wget
57# tar zxvf observium-community-latest.tar.gz
58# cd observium
59# cp config.php.default config.php
60# editor config.php</code></pre>
61<p>Find these two lines:</p>
62<pre><code>$config[&#39;db_user&#39;] = &#39;USERNAME&#39;;
63$config[&#39;db_pass&#39;] = &#39;PASSWORD&#39;;</code></pre>
64<p>and change them to be:</p>
65<pre><code>$config[&#39;db_user&#39;] = &#39;observium&#39;;
66$config[&#39;db_pass&#39;] = &#39;&lt;CLASS PASSWORD&gt;&#39;;</code></pre>
67<p>Exit and save the file.</p>
68<p>Now we need to create an Observium database and set the password for the observium user as well as set privileges for the user. When asked &quot;Enter password&quot; below, enter be your <CLASS PASSWORD>:</p>
69<pre><code># mysql -u root -p
70Enter password:</code></pre>
71<p>You should then be presented with the mysql command linep prompt:</p>
73<p>Enter the following commands:</p>
74<pre><code>mysql&gt; CREATE DATABASE observium;
75mysql&gt; GRANT ALL PRIVILEGES ON observium.* TO &#39;observium&#39;@&#39;localhost&#39; IDENTIFIED BY &#39;&lt;observium db password&gt;&#39;;
76mysql&gt; exit</code></pre>
77<p>Now we populate the database and create a couple of directories:</p>
78<pre><code># cd /opt/observium
79# php includes/update/update.php
80# mkdir rrd
81# chown www-data:www-data rrd
82# mkdir logs
83# chown www-data logs</code></pre>
84<p>Now we create an observium user named &quot;admin&quot; with privileges to update/add/delete entries via the observium web interface:</p>
85<pre><code># ./adduser.php admin &lt;CLASS_PASSWORD&gt; 10</code></pre>
86<h2 id="configure-your-virtualhost-for-observium"><a href="#configure-your-virtualhost-for-observium"><span class="header-section-number">2.2</span> 2. Configure your virtualhost for Observium</a></h2>
87<p>Make sure that the name &quot;;, where X is the number of your machine, works:</p>
88<pre><code># ping
89PING ( 56(84) bytes of data.
9064 bytes from ( icmp_req=1 ttl=64 time=0.014 ms
9164 bytes from ( icmp_req=2 ttl=64 time=0.059 ms
93<p>(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).</p>
94<pre><code># cd /etc/apache2/sites-available
95# editor observium.conf</code></pre>
96<p>In this file add the following:</p>
97<pre><code>&lt;VirtualHost *:80&gt;
98  DocumentRoot /opt/observium/html/
99  ServerName
100  CustomLog /opt/observium/logs/access_log combined
101  ErrorLog /opt/observium/logs/error_log
102  &lt;Directory &quot;/opt/observium/html/&quot;&gt;
103    AllowOverride All
104    Options FollowSymLinks MultiViews
105    Require all granted
106  &lt;/Directory&gt;
108<p>Note the line that reads:</p>
109<pre><code>    ServerName</code></pre>
110<p>... and replace &quot;X&quot; with the number of your virtual machine.</p>
111<p>Save the file and exit.</p>
112<h1 id="enable-your-new-virtual-host"><a href="#enable-your-new-virtual-host"><span class="header-section-number">3</span> 2. Enable your new virtual host</a></h1>
113<pre><code># a2enmod rewrite
114# php5enmod mcrypt
115# a2ensite observium
116# service apache2 restart</code></pre>
117<p>Now let's go back to being the sysadm user:</p>
118<pre><code># exit
120<p>Observium has now been installed and initially configured on your virutal machine. In the next lab you will do the following:</p>
122<li>Connect to Observium via a web browser</li>
123<li>Configure Observium to auto-discover devices</li>
124<li>Add a device manually s via the web interface</li>
125<li>Use the command line to add multiple devices</li>
126<li>Automate the discovery and update process of devices</li>
127<li>Update your router with contact and location information</li>
128<li>Update your Observium location map</li>
129<li>Disable some ports on a device</li>
130<li>Use the Observium interface to search for specific information</li>