温馨提示×

温馨提示×

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

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

ubuntu安装nrpe无法安装问题

发布时间:2020-07-30 23:09:07 来源:网络 阅读:698 作者:libao2235 栏目:移动开发

ubuntu无法安装nrpe的原因:

1,没有安装libssl-dev 请使用apt-get install libssl-dev 来安装

2. 没有安装openssl 请使用apt-get install openssl 来安装

3,安装nrpe时请到http://sourceforge.net/projects/nrpe/?source=directory 国内有可能下载不了,这个可能屏蔽了,http://sourceforge.net/projects/nagios/files/nrpe-2.x/nrpe-2.14/nrpe-2.14.tar.gz/download  

放到/usr/src/目录下,tar-zxvf nrpe-2.14.tar.gz 解压缩,

运行./configure --with-ssl=/usr/bin/openssl --with-ssl-lib=/usr/lib/x86_64-linux-gnu(64位)

运行./configure --with-ssl=/usr/bin/openssl --with-ssl-lib=/usr/lib/i386-linux-gnu(32位)

查看软件是否安装 dpkg -l 软件名称

查看软件安装路径 dpkg -L 软件名称

安装nrpe服务使之能够通信
#tar zxvf nagios-nrpe_2.8.1.orig.tar.gz
#cd nagios-nrpe_2.8.1
#./configure --enable-ssl --with-ssl-lib=/usr/lib/
#make all
#make install-plugin
#make install-daemon
#make install-daemon-config

#make install-xinetd
4、配置nrpe信息
#vim /usr/local/nagios/etc/nrpe.cfg
allowed_host=192.168.85.207,127.0.0.1   //允许192.168.85.207服务器端对其监控
#/usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg –d
//检测nrep配置文件的正确性
#netstat -an | grep 5666    //是否监听5666用于nrpe通信的端口
//在服务端执行检测工作站nrpe信息
#/usr/local/nagios/libexec/check_nrpe -H 192.168.85.208
NRPE v2.8.1
//在工作站执行检测自己的nrpe信息
#/usr/local/nagios/libexec/check_nrpe -H 127.0.0.1
NRPE v2.8.1



nagios-plugins无法安装原因

In file included from localcharset.c:28:0:

./stdio.h:456:1: error: ‘gets’ undeclared here (not in a function)
make[4]: *** [localcharset.o] Error 1
make[4]:Leaving directory `/root/nagios-plugins-1.4.16/gl'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/root/nagios-plugins-1.4.16/gl'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/root/nagios-plugins-1.4.16/gl'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/nagios-plugins-1.4.16'

make: *** [all] Error 2

解决办法:

在gl目下执行:sed -i -e '/gets is a security/d' ./stdio.in.h就搞定了


启动NRPE守护进程
/usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d

设置随机启动

/etc/rc.local里添加如下:

/usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg –d


准备工作:
apt-get install openssl
apt-get install libcurl4-openssl-dev
apt-get install xinetd

apt-get install libssl-dev

apt-get install libssl0.9.8

下载:

只能在linux下载

wget http://prdownloads.sourceforge.net/sourceforge/nagios/nrpe-2.13.tar.gz







向AI问一下细节

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

AI