linux cacti安装教程,Linux下Cacti安装与配置

这个是Nagios和Cacti安装与配置的第三个步骤,就是给cacti打补丁和安装weathermap插件,建立在之前的实验平台上,此文章主要介绍安装。

第一部分:

装cati-plugin的解决方案

需要的套件 cacti-plugin-0.8.7h-PA-v3.0.tar.gz

[root@localhost ~]# tar zxvf cacti-plugin-0.8.7h-PA-v3.0.tar.gz

[root@localhost ~]# cd cacti-plugin-arch/

[root@localhost cacti-plugin-arch]# cp -rf files/* /var/www/cacti/

[root@localhost cacti-plugin-arch]# cd /var/www/cacti/

[root@localhost cacti]# mysql -u root cacti < ~/cacti-plugin-arch/pa.sql

[root@localhost cacti]# cd include/

[root@localhost include]# vi global.php   //修改以下的字段即可

$database_username = "cactiuser";

$database_password = "721wyzj";

if (! isset($url_path)) {

$url_path = "/cacti/";

}

之后登陆http://192.168.1.192/cacti/index.php    User Management-->admin-->Plugin Management (添加上这个即可)

实验总结

之前一直采用类似以下的方式补丁步骤

patch -p1 -N < cacti-plugin-0.8.7g-PA-v2.8.diff

之后再修改vi /var/www/cacti/include/global.php

$database_username = "cactiuser";

$database_password = "721wyzj";

$config['url_path'] = '/cacti/';

但是很无奈登陆时一直出现Call to undefined function api_plugin_hook() 的错误提示,谷歌了好多解决方案,都不奏效,后来发现解开压缩包所在的目录下有files的目录,再结合网络的搜索得知,还有另外一种方案--覆盖,于是就尝试的去做也就是以上成功的案例,终于问题解决,深吸一口气啊!

第二部分:weathermap插件的安装

[root@localhost ~]# ll php-weathermap-0.97a.zip

-rw-r--r-- 1 root root 2927302 Oct 16  2011 php-weathermap-0.97a.zip

[root@localhost ~]# unzip php-weathermap-0.97a.zip

[root@localhost ~]# mv weathermap/ /var/www/cacti/plugins

[root@localhost ~]# cd /var/www/cacti/plugins/weathermap/

[root@localhost weathermap]# chown -R cactiuser output/

[root@localhost weathermap]# chown -R apache configs/

[root@localhost weathermap]# chmod -R u+w configs/

[root@localhost weathermap]# cp editor-config.php-dist editor-config.php

[root@localhost weathermap]# vi editor-config.php

$cacti_base = "/var/www/cacti";

$cacti_url = "http://192.168.1.192/cacti/";

$mapdir= $cacti_base.'/plugins/weathermap/configs';

[root@localhost weathermap]# vi editor.php   //从false修改成ture

$ENABLED=ture;

这样就设置成功了,接着就是web的操作,为了安装这个软件耗费很久的时间,最后解决的办法是修改global.php里的url_path为/cacti/,之前不需要修改的这个,没想到在插件里用到了,这是出其不意啊!0b1331709591d260c1c78e86d0c51c18.png

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值