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
编译安装
./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
相关文章推荐
- 基于VMware的虚拟Linux集群搭建-lvs+keepalived
- Linux -atime、mtime、ctime
- Linux上系统上安装JDK
- linux查看主板型号及内存硬件信息
- 提交 git 项目 到 github 在 centos 7
- 每天一个Linux命令(25)chgrp命令
- Linux的进程优先级
- Linux的IO调度
- Linux下的文件查找命令——find
- linux的main的参数传递
- Linux 之 利用Google Authenticator实现用户双因素认证
- linux的链接工具secure设置字体大小和颜色
- 读书笔记 ------ 重构 -> 在对象之间搬移特性
- linux时间同步
- Linux Object-C 编译环境安装
- Linux实践:模块
- 20135323符运锦----LINUX第二次实践:内核模块编译
- CentOS7 安装MATE Desktop
- CentOs 7.0实现定时任务(定时访问网页)
- Linux08--Shell程序设计03 shell script