温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

nagios安装脚本

发布时间:2020-06-04 06:04:59 来源:网络 阅读:297 作者:tianshuai369 栏目:移动开发

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

 

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI