您的位置:首页 > 运维架构 > Linux

linux nagios 安装 nagios-plugins-1.4.15 、nrpe以及 遇到的报错的解决方法

2016-05-23 09:29 477 查看
解压并进入  tar zvxf nagios-plugins-1.4.15.tar.gz && cd nagios-plugins-1.4.15

编译安装

./configure --with-nagios-user=nagios --with-nagios-group=nagios

make 

### 遇到错误

### show 

### In file included from localcharset.c:26:0:

### ./stdio.h:456:1: 错误:‘gets’未声明(不在函数内)

###  _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");

###  ^

### make[4]: *** [localcharset.o] 错误 1

### make[4]: 离开目录“/nagios/nagios-plugins-1.4.15/gl”

### make[3]: *** [all-recursive] 错误 1

### make[3]: 离开目录“/nagios/nagios-plugins-1.4.15/gl”

### make[2]: *** [all] 错误 2

### make[2]: 离开目录“/nagios/nagios-plugins-1.4.15/gl”

### make[1]: *** [all-recursive] 错误 1

### make[1]: 离开目录“/nagios/nagios-plugins-1.4.15”

### make: *** [all] 错误 2  

### 解决方法

### cd /nagios/nagios-plugins-1.4.15/gl

### sed -i -e '/gets is a security/d' ./stdio.in.h

### 然后重新make

make install

chown -R nagios:nagios /usr/local/nagios && cd ..

tar -zxvf nrpe-2.13.tar.gz && cd nrpe-2.13

./configure --enable-ssl --with-ssl-lib 

make all && make install-plugin && make install-daemon && make install-daemon-config

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

/usr/local/nagios/libexec/check_nrpe -H localhost
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: