nagios 部署与配置方法

一, Nagios部署与配置方法:
Nagios服务端安装
Nagios插件安装
https://www.cnblogs.com/Richardzhu/p/3340638.html

Apache安装
https://www.cnblogs.com/Anker/p/3355573.html

php安装

 

/*****************************************************************************/
遇到问题:
1. 使用chkconfig --add 添加服务时提示“在nagios服务中读取信息时出错:没有那个文件或目录”
参考网址:http://blog.chinaunix.net/uid-28597757-id-3503976.html

2. 安装apatche时,./configure --prefix=/usr/local/apache2
报错:configure: error: APR not found. Please read the documentation.

3.安装apr,
报错:rm: cannot remove 'libtoolT': No such file or directory
https://jingyan.baidu.com/article/b907e627611f6b46e7891cb6.html

4.安装apr,
报错:xml/apr_xml.c:35:19: 致命错误:expat.h:没有那个文件或目录
yum install -y expat-devel 即可

5.安装pcre
报错:configure: error: Invalid C++ compiler or C++ compiler flags
yum install -y gcc gcc-c++

6.安装apache
/usr/local/web/apr-util/lib/libaprutil-1.so: undefined reference to `XML_GetErrorCode'
应该讲apt-util改为1.5的版本
https://www.cnblogs.com/zyos/p/7663717.html

7.安装php
源码安装php时出现configure: error: xml2-config not found. Please check your libxml2 installation...
https://blog.csdn.net/weixin_33759269/article/details/86231617

8.启动apach
解决apache启动错误"httpd:Could not reliably determine..."
https://blog.csdn.net/zhaomininternational/article/details/42293511

9. linux主机无法访问虚拟机Linux的apache
https://blog.csdn.net/zymx14/article/details/51440722

10. linux启动nagios无法通过web访问
需要关闭防火墙,centos关闭防火墙命令;
firewall-cmd --state
systemctl stop firewalld.service
systemctl disable firewalld.service //禁止开机启动

二,安装mysql方法:
https://www.cnblogs.com/yizitrd/p/5363068.html


/*****************************************************************************/

 


nagios运行调试:
启动apach命令:
/usr/local/apache/bin/apachectl restart

service httpd restart

chkconfig添加服务
chkconfig --add nagios
chkconfig --level 35 nagios on
chkconfig --list nagios

1. 检查配置文件是否正确
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

2. 启动nagios
a.初始化脚本启动
# /etc/init.d/nagios start
or
# service nagios start

b./usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg

如何配置linux开机自启动?

 

转载于:https://www.cnblogs.com/longzhiwen/p/11487688.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值