nagios + snmp配置,自己配出来,才能有收获!

/*****************************system requirement********************/
Distributor ID: Ubuntu
Description:    Ubuntu 11.04
Release:        11.04
Codename:       natty
Linux entry 2.6.38-8-server #42-Ubuntu SMP Mon Apr 11 03:49:04 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
author          yellia
datetime        2012-03-15
/*****************************system requirement********************/


/********************install dependencies****************************/
apt-get install apache2
apt-get install libapache2-mod-php5
apt-get install build-essential
apt-get install libgd2-xpm-dev

/*******************install nagios***********************************/
useradd -m -s /bin/bash nagios
passwd nagios
groupadd nagcmd
usermod -a -G nagcmd nagios
usermod -a -G nagcmd www-data
tar xzvf nagios-3.3.1.tar.gz
cd nagios/
./configure --with-command-group=nagcmd
make all
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 install
make install-init
make install-config
make install-commandmode
vim /usr/local/nagios/etc/objects/contacts.cfg
make instal-webconf
htpasswd -c /usr/local/nagios/etc//htpassswd.users nagiosadmin
/etc/init.d/apache2 reload

/****************************install nagios plugins********************/
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

/****************************install nagios snmp-plugins***************/
perl -MCPAN -e shell
cpan> install Net::SNMP
mkdir /tmp/nagios
chmod 777 nagios
tar xzvf nagios-snmp-plugins.1.1.1.tgz
cd nagios_plugins/
./install.sh
/****************************install nagios init.d*********************/
ln -s /etc/init.d/nagios /etc/rcS.d/S99nagios
/etc/init.d/nagios restart


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值