云上的天涯

导航

zatree的安装

zatree的安装有2种

一种是支持2.x的用以下方法安装

zabbix安装zatree 实现图形树状化

官网:https://github.com/spide4k/zatree

[root@SERVER-ZABBIX ~]# yum install git
[root@SERVER-ZABBIX ~]# git clone https://github.com/spide4k/zatree.git zatree
[root@SERVER-ZABBIX ~]# ZABBIX_PATH=/var/www/html/zabbix
[root@SERVER-ZABBIX ~]# cp -rf zatree/zabbix-2.2.x $ZABBIX_PATH/zatree
[root@SERVER-ZABBIX ~]# cd $ZABBIX_PATH/zatree/addfile
[root@SERVER-ZABBIX addfile]# cp -f CLineGraphDraw_Zabbix.php CGraphDraw_Zabbix.php CImageTextTable_Zabbix.php $ZABBIX_PATH/include/classes/graphdraw/
[root@SERVER-ZABBIX addfile]# cp -f zabbix.php zabbix_chart.php $ZABBIX_PATH/
[root@SERVER-ZABBIX addfile]# cp -f CItemValue.php $ZABBIX_PATH/api/classes/
[root@SERVER-ZABBIX addfile]# cp -f menu.inc.php $ZABBIX_PATH/include/
cp:是否覆盖"/var/www/html/zabbix/include/menu.inc.php"? y
[root@SERVER-ZABBIX addfile]# cp -f main.js $ZABBIX_PATH/js/
cp:是否覆盖"/var/www/html/zabbix/js/main.js"? y
[root@SERVER-ZABBIX addfile]# cp -f API.php $ZABBIX_PATH/include/classes/api/
cp:是否覆盖"/var/www/html/zabbix/include/classes/api/API.php"? y
[root@SERVER-ZABBIX addfile]#vi  $ZABBIX_PATH/zatree/zabbix_config.php
<?php
global $zabbix_api_config;

$zabbix_api_config=array(
 'api_url'=>'api_jsonrpc.php',
 'user'=>'admin', //web登陆的用户名
 'passowrd'=>'zabbix', //web登陆的密码
 'graph_url'=>'zabbix_chart.php',
);

?>

以前上内容出自

http://skykws8023.blog.51cto.com/4514277/1547146 感谢作者

3.x安装如下

git clone https://github.com/BillWang139967/zatree.git

执行过程中需要输入zabbix admin的账号和密码【zatree3.0.x 实现原理】假如zabbix web目录位置在/data/web/zabbix,定义zabbix目录

然后执行安装脚本即可,注意需要定义安装目录,即zabbix的web目录,脚本执行过程中注意输入用户名密码。

posted on 2017-11-09 16:55  云上的天涯  阅读(254)  评论(0编辑  收藏  举报