Nagios 3 on Ubuntu

Environment
  • Ubuntu 8.04
Procedures
Preparing needed applications
#apt-get install apache2
#apt-get install build-essential
#apt-get install libgd2-xpm-dev
Add new user account for Nagios
#useradd -m nagios
#passwd nagios
Add new group for external command
#groupadd nagcmd
#usermod -G nagcmd nagios
#usermod -G nagcmd www-data
Download Nagios and Nagios Plugins, just visit www.nagios.org to get the newest one

Install Nagios
#tar zxvf nagios-{version}.tar.gz
#tar zxvf nagios-plugins-{version}.tar.gz
#./nagios-{version}/configure --with-command-group=nagcmd
#./nagios-{version}/make all
#./nagios-{version}/make install
#./nagios-{version}/make install-init
#./nagios-{version}/make install-config
#./nagios-{version}/make install-commandmode
Change the contact email
#vim /usr/local/nagios/etc/contacts.cfg
Install web configation to Apache2
#./nagios-{version}/make install-webconf
Set password for logging in
#htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
Install plugins of Nagios to get more check script
#./nagios-plugins-{version}/configure --with-nagios-user=nagios --with-nagios-group=nagcmd
#make
#make install