In a Terminal window, enter this commands, and then press Enter:
ping samsclass.info
Make sure you are getting replies, and then press
Ctrl+C to stop the pings.
In a Terminal window, enter this commands, and then press Enter:
ifconfig
Find the interface that goes to the Internet and make a note of it.
In my case it is eth2, as shown below:
In a Terminal window, enter these commands, pressing Enter after each one:
apt-get install apache2
apt-get install build-essential
apt-get install libgd2-xpm-dev
/usr/sbin/useradd nagios
passwd nagios
When prompted to, enter the password nagios
twice. (This is a poor security practice, in
a real-world situation, use a strong pasword.)
In a Terminal window, enter these commands, pressing Enter after each one:
/usr/sbin/groupadd nagcmd
/usr/sbin/usermod -G nagcmd nagios
/usr/sbin/usermod -G nagcmd www-data
cd /tmp
wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.3.1.tar.gz
wget http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.15.tar.gz
cd /tmp
tar xzf nagios-3.3.1.tar.gz
cd nagios
./configure --with-command-group=nagcmd
make all
make install
make install-init
make install-config
make install-commandmode
Many screens of messages scroll by, ending with the message
"*** External command directory configured ***",
as shown below:
nano /usr/local/nagios/etc/objects/contacts.cfg
Change the email address to your own email address,
as shown below:
Save the file with Ctrl+X, Y, Enter.
make install-webconf
htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
Enter a password of nagios twice when you are
prompted to.
Again, this is highly insecure--on a real system, use a secure password!
You need to restart apache to use the new settings.
In a Terminal window, enter these commands, and then press Enter:
/etc/init.d/apache2 reload
/etc/init.d/apache2 start
cd /tmp
tar xzf nagios-plugins-1.4.15.tar.gz
cd nagios-plugins-1.4.15
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
make install
In a Terminal window, enter this command, and then press Enter:
ln -s /etc/init.d/nagios /etc/rcS.d/S99nagios
Verify the sample Nagios configuration files.
In a Terminal window, enter this command, and then press Enter:
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
If there are no errors, start Nagios.
In a Terminal window, enter this command, and then press Enter:
/etc/init.d/nagios start
Go to this URL:
http://localhost/nagios/
Log in with the username nagiosadmin and a password of nagios
You should see the Nagios web administration interface, as shown below:
Email the images to cnit.122sam@gmail.com with a subject of "Project 10 from YOUR NAME".
http://www.nagios.org/download/
Last modified 10-4-11 5 pm