sudo
apt-get install apache2
sudo
apt-get install libapache2-mod-php5
sudo apt-get install build-essential
sudo apt-get install libgd2-dev
sudo apt-get install
libgd2-xpm-dev
sudo –s
/usr/sbin/useradd
-m -s /bin/bash nagios
passwd
nagios
/usr/sbin/groupadd
nagios
/usr/sbin/usermod
-G nagios nagios
/usr/sbin/groupadd
nagcmd
/usr/sbin/usermod
-a -G nagcmd nagios
/usr/sbin/usermod
-a -G nagcmd www-data
mkdir
~/downloads
cd
~/downloads
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 ~/downloads
wget http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.15.tar.gz
cd ~/downloads
tar xzvf nagios-3.3.1.tar.gz
cd nagios
./configure --with-command-group=nagcmd
cd nagios
./configure --with-command-group=nagcmd
sed -i 's:for file in includes/rss/\*;:for file in includes/rss/\*.\*;:g' ./html/Makefile
sed -i 's:for file in includes/rss/extlib/\*;:for file in
includes/rss/extlib/\*.\*;:g' ./html/Makefile
make
all
make
install
make
install-init
make
install-config
make
install-commandmode
make
install-webconf
htpasswd
-c /usr/local/nagios/etc/htpasswd.users nagiosadmin
/etc/init.d/apache2
reload
cd
~/downloads
tar
xzvf 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
ln
-s /etc/init.d/nagios /etc/rcS.d/S99nagios
/usr/local/nagios/bin/nagios
-v /usr/local/nagios/etc/nagios.cfg
/etc/init.d/nagios
start
Finish:
http://localhost/nagios/
沒有留言:
張貼留言