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 -y  install  gcc  gcc*  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
make  all &&   make install-plugin  && make install-daemon  && make install-daemon-config && make install-xinetd
cd ..
echo "nrpe                    5666/tcp                 #nrpe"  >> /etc/services

 

nrpe -c   /etc/nrpe.cfg -d

给TA打赏
共{{data.count}}人
人已打赏
安全技术安全运维

Windows服务器如何发现被黑

2018-5-20 12:24:31

安全技术

网站制作需要素材的实用网站

2021-12-21 16:36:11

个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索