加入收藏 | 设为首页 | 会员中心 | 我要投稿 应用网_丽江站长网 (http://www.0888zz.com/)- 科技、建站、数据工具、云上网络、机器学习!
当前位置: 首页 > 服务器 > 搭建环境 > Linux > 正文

Cacti+Nagios应用详解(二)整合cacti与nagios安装部署

发布时间:2016-05-19 08:39:53 所属栏目:Linux 来源:网络整理
导读:Nagios简介 Nagios是一个用来监视系统和网络的开源应用软件,它通常运行于一个主服务器上,这个服务器运行 Liunx 或 Unix 操作系统。Nagios 利用其众多的插件实

nagios-plugins插件安装

[root@cacti-qmail soft]#wget

http://kent.dl.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.14.tar.gz

[root@cacti-qmail soft]# tar -zxvf nagios-plugins-1.4.14.tar.gz

[root@cacti-qmail nagios-plugins-1.4.14]#./configure --prefix=/usr/local/nagios/

(注意:安装目录是nagios而不是nagios-plugins的原因是直接把libexec目录的插件覆盖到nagios里面去的)

[root@cacti-qmail nagios-plugins-1.4.14]#make;make install

[root@cacti-qmail nagios-plugins-1.4.14]# grep ^User /etc/httpd/conf/httpd.conf

将apache的运行用户加到nagios组里面,从httpd.conf中过滤出当前的apache运行用户

我这里过滤出的用户无,如有用户需要运行以下命令

usermod -G nagios 用户名

PHP支持JSON扩展

PHP必须安装PDO 和 JSON扩展。由于NPC使用了Ext JS,如果没有JSON扩展,NPC的界面不会出来,只能看到一个空白页面。初始化PHP环境 需要用phpize命令,所以也要安装 php-devel。

root@cacti-qmail soft]#wget http://www.aurore.net/projects/php-json/php-json-ext-1.2.1.tar.bz2

root@cacti-qmail soft]# tar jxvf php-json-ext-1.2.1.tar.bz2

[root@cacti-qmail soft]# cd php-json-ext-1.2.1

[root@cacti-qmail php-json-ext-1.2.1]# phpize

-bash: phpize: command not found

[root@cacti-qmail php-json-ext-1.2.1]# cd /misc/Server/

[root@cacti-qmail Server]# rpm -ivh php-devel-5.1.6-23.2.el5_3.i386.rpm

warning: php-devel-5.1.6-23.2.el5_3.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186

Preparing...                ########################################### [100%]

1:php-devel              ########################################### [100%]

[root@cacti-qmail Server]# cd /root/soft/php-json-ext-1.2.1

[root@cacti-qmail php-json-ext-1.2.1]# phpize

Configuring for:

PHP Api Version:         20041225

Zend Module Api No:      20050922

Zend Extension Api No:   220051025

[root@cacti-qmail php-json-ext-1.2.1]# ./configure

===================================================================

如果遇到报以下错误,请直接yum install gcc-c++

a.configure: error: no acceptable C compiler found in $PATH

See `config.log' for more details.  请直接yum install gcc

b.configure: error: C++ preprocessor "/lib/cpp" fails sanity check

====================================================================

[root@cacti-qmail php-json-ext-1.2.1]# make;make install

[root@cacti-qmail php-json-ext-1.2.1]# find / -name *json.so

/usr/lib/php/modules/json.so

/root/soft/php-json-ext-1.2.1/modules/json.so

/root/soft/php-json-ext-1.2.1/.libs/json.so

[root@cacti-qmail php-json-ext-1.2.1]# vi /etc/php.d/json.ini

添加以下内容

extension=json.so

保存退出

[root@cacti-qmail php-json-ext-1.2.1]# service httpd restart

测试PHP是否支持json扩展

[root@cacti-qmail php-json-ext-1.2.1]#vi /var/www/html/test.php

添加以下内容

<?php

phpinfo();

phpinfo(INFO_GENERAL);

phpinfo(1);

?>

保存退出

在IE输入http://192.168.15.73/test.php   看到以下信息

Cacti+Nagios应用详解(二)整合cacti与nagios安装部署

URL:http://www.bianceng.cn/OS/Linux/201410/46045.htm

(编辑:应用网_丽江站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

热点阅读