liti 发表于 2013-9-6 10:15:50

nagios安装脚本

wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.5.1.tar.gz
wget http://jaist.dl.sourceforge.net/project/nagios-cn/sourcecode/zh_CN%203.2.3/nagios-cn-3.2.3.tar.bz2
wget http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.16.tar.gz
yum -yinstallgccgcc*gd gd-devel libpng libpng-devel libjpeg libjpeg-devel zlib zlib-devel httpd php php-devel
yum install openssl*-y
useradd nagios
usermod -G nagios apache
tar zxvf nagios-3.5.1.tar.gz
cd nagios
./configure --prefix=/usr/local/nagios --with-nagios-user=nagios --with-nagios-group=nagios
make all
make install
make install-init
make install-commandmode
make install-config
make install-webconf
chkconfig nagios on
cd ..
tar zxvf nagios-plugins-1.4.16.tar.gz
cd nagios-plugins-1.4.16
./configure --prefix=/usr/local/nagios
make && make install
cd ..
tar jxvf nagios-cn-3.2.3.tar.bz2
cd nagios-cn-3.2.3
./configure --prefix=/usr/local/nagios/
make all
make install
cd ..
sed -i '1043 s/^/#/'/usr/local/nagios/etc/nagios.cfg
htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
/etc/init.d/nagios restart
/etc/init.d/httpd restart
wget http://prdownloads.sourceforge.net/sourceforge/nagios/nrpe-2.13.tar.gz
tar zxvf nrpe-2.13.tar.gz
cd nrpe-2.13
./configure --prefix= /usr/local/nagios
makeall &&   make install-plugin&& make install-daemon&& make install-daemon-config && make install-xinetd
cd ..
echo "nrpe                  5666/tcp               #nrpe">> /etc/services

dong5300 发表于 2013-9-7 05:14:07

我身在江湖,江湖里却没有我得传说。

寂寞大萝卜 发表于 2013-9-9 05:56:08

美女未抱身先走,常使色狼泪满襟。。。。。。

hhajhh 发表于 2013-9-9 23:11:24

一时的冲动,子孙的危机!

lichaoyue888 发表于 2013-9-10 10:12:48

脱了衣服我是禽兽,穿上衣服我是衣冠禽兽!

yanfangsheng123 发表于 2013-9-12 15:52:57

有道理。。。

sunfull 发表于 2013-9-14 16:48:28

小手一抖,钱钱到手!
页: [1]
查看完整版本: nagios安装脚本