今天刚装的ubuntu server7.10 去nagios看到有新版本,就决定装一下`第一次在ubuntu里面装`便把 他记录下来,nagios很强大的,可以与很多软件整合的,以后这篇文章慢慢修改!在这里谢谢 http://nagios-cn.sourceforge.net/的作者,让很多菜鸟飞起了!废话不多说!开始操作
1。首先到 www.nagios.org下载
nagios-3.0.3.tar.gz
nagios-plugins-1.4.12.tar.gz
2。安装所需要的库
apt-get install apache2 php5-gd build-essential libgd2-xpm-dev php5 mysql-server libmysqlclient15-dev libssl-dev perl
3.useradd nagios
passwd nagios
groupadd nagcmd
usermod -G nagcmd nagios
usermod -G nagcmd www-data
4。tar zxvf nagios-3.0.3.tar.gz
cd nagios-3.0.3
./configure --with-command-group=nagcmd
make all
make install
make install-init
make install-config
make install-commandmode
vi /usr/local/nagios/etc/objects/contacts.cfg
make install-webconf
htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
/etc/init.d/apache2 reload
5.tar zxvf nagios-plugins-1.4.12.tar.gz
cd nagios-plugins-1.4.12
./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
apt-get install mailx