//下载、解压Weathermap到相应目录
(Weathermap下载
http://www.network-weathermap.com/download
)
[root@centos53 /]# cd /usr/local/src/
[root@centos53 src]# wget
http://www.network-weathermap.com/files/php-weathermap-0.96a.zip
[root@centos53 src]# unzip php-weathermap-0.96a.zip -d /var/www/cacti/plugins/
//激活Weathermap
进入[Console]-[Configuration]-[plug Management],可以见到weathermap的Status为:Old Plugin Architecture。说明weathermap还没有运行。
[root@centos53 /]# vi /var/www/cacti/include/global.php
.....
$plugins = array();
$plugins[] = 'weathermap';
.....
之后,再进入[Console]-[Configuration]-[plug Management],可以见到weathermap的Status为:Old Plugin Architecture-Running。说明weathermap已经运行。同时也可以见到[weathermap]的标签了,在[console]-[Utilities]-[User Management],admin用户的Realm Permissions中也多了Plugin -> Weathermap: Configure/Manage 和Plugin -> Weathermap: View 两项,并已经选定。
//配置
在[Weathermap]中,没有任何图,要进行一下配置。
进行[Console]-[Weathermaps],之后“ADD”,发现系统默认有两个“Available Weathermap Configuration Files”为.htaccess和simple.conf。
将simple.conf进行"ADD"操作,并确认期Active为:yes。之后“Recalculate All Maps Now”,YES解认。
再次回到[Weathermap]中,发现test中"this map hasn't been create yet.",等一会吧。
那么如何edit自己的图呢?在[weathermap]签中,点“Powered by
PHP Weathermap version 0.96a
---
Weathermap Management
|
Local Documentation
|
Editor
”中的Editor。
发现又出了问题。Editor窗口中提示:“ Required PHP extensions are not present in your mod_php/ISAPI PHP module. Please check your PHP setup to ensure you have the GD extension installed and enabled.” 说明GD没有安装等问题。
//安装GD
[root@centos53 /]# yum list | grep php-gd
php-gd.i386 5.1.6-23.2.el5_3 base
[root@centos53 /]# yum -y install php-gd
[root@centos53 /]# service httpd restart
之后,再刷新“http://xxx.xxx.xxx.xxx/cacti/plugins/weathmap/editor.php”窗口,可见Welcome的内容,可以Create A new Map、OR Create A New Map as a copy of an existing map、OR Open An Existing Map了。
但是还有关于权限的提示,进行以下操作后,再刷新一下,就一切OK了。
[root@centos53 plugins]# chmod 777 -R weathermap/
另:还可以安装一下支持更多图形等的包,如:
[root@centos53 plugins]# yum list | grep php
[root@centos53 plugins]# yum -y install php-jpgraph graphviz-php php-adodb php-mbstring php-xml
之后,重启动httpd。
//绘图
在editor(
http://xxx.xxx.xxx.xxx/cacti/plugins/weathmap/editor.php
窗口)中,就可以开绘制、设计自己的图了。
之后,在[console]M-[Management]-[weathermap]中“ADD”所绘制的图,并“Recalulate”。
本文来自ChinaUnix博客,如果查看原文请点: http://blog.chinaunix.net/u2/71257/showart_2097111.html