一、下载需要的安装包
下载有两种方法:
1、下载到本地,通过挂载安装:
主下载页面:http://docs.cacti.net/
php-weathermap-0.97a.zip
settings-v0.71-1.tgz
thold-0.4.1.tar.gz
monitor-v1.3-1.tgz
2、直接在centos里面通过wget命令下载安装:
wget http://docs.cacti.net/plugin:settings/settings-v0.71-1.tar.gz
wget http://www.network-weathermap.com/files/php-weathermap-0.97a.zip
wget http://docs.cacti.net/plugin:monitor/monitor-v1.3-1.tgz
两种方法都可以正常运行,根据个人爱好,下面以wget下载为例来安装。
二、安装插件
友情提示:安装settings与thold插件时,先安装settings插件,后安装thold插件。因为settings插件提供email的相关设置,后期通过对setting的设置来发送邮件。
1、进入cacti目录下,下载所需安装包
[root@localhost cacti]# cd /usr/share/cacti/
[root@localhost cacti]# wget http://docs.cacti.net/plugin:monitor/monitor-v1.3-1.tgz
[root@localhost cacti]# wget http://docs.cacti.net/plugin:settings/settings-v0.71-1.tar.gz
[root@localhost cacti]# wget http://www.network-weathermap.com/files/php-weathermap-0.97a.zip
2、解压安装包,将解压文件移动到cacti/plugins/目录下
[root@localhost cacti]# tar zxvf settings-v0.71-1.tar.gz
[root@localhost cacti]# mv settin~1.tgz /usr/share/cacti/
[root@localhost cacti]# tar zxvf thold-0.4.1.tar.gz
[root@localhost cacti]# mv thold /usr/share/cacti/plugins/
[root@localhost cacti]# unzip php-weathermap-0.97a.zip
[root@localhost cacti]# mv weathermap /usr/share/cacti/plugins/
[root@localhost cacti]# cd plugins/
[root@localhost plugins]# ls
index.php monitor settings simple.conf thold weathermap
3、配置settings与thold,修改配置文件:
[root@localhost /]# vi /usr/share/cacti/include/config.php
/* make sure these values refect your actual database/host/user/password */
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "321321";
$database_port = "3306";
$database_ssl = false;
/*load up old style plugins here */
$cacti_session_name = "Cacti";
$plugins = array();
$plugins[] = ‘settings‘;
//$plugins[] = ‘thold‘;安装setting时先将thold注释掉
$plugins[] = ‘weathermap‘;
/*
Edit this to point to the default URL of your Cacti install
ex: if your cacti install as at http://serverip/cacti/ this
would be set to /cacti/
*/
//$url_path = "/cacti/";
/* Default session name - Session name must contain alpha characters */
//$cacti_session_name = "Cacti";
?>
4、然后进入cacti的Plugin Management上的页面,Thold前面有个蓝色向下的箭头,将鼠标放在上面会出现手形状,单击如图:
点击绿色箭头使能(enbale),变成一个矩形框了,你会发现图中的"Status”变为“active”。
然后修改include/config.php文件,将其注释,然后在web页里进行安装,参照第3步。
5、配置monitor
cacti新版本无需进行如下配置文件设置,老版本可能需要(旧版本还需要导入各自的sql文件):
激活monitor插件,修改cacti配置文件(cacti目录下的include/config.php)。在配置中
$plugins = array();,在此行下面加入:
$plugins[] = ‘monitor‘;
$plugins[] = ‘settings‘;
$plugins[] = ‘thold‘;
然后进入cacti的Plugin Management上的页面,monitor前面有个蓝色向下的箭头,将鼠标放在上面会出现手形状,安装激活,如下图:
到这插件就安装完毕了,下来就是具体的操作了,都比较简单,这里就不详细说了。
本文出自 “诺克” 博客,请务必保留此出处http://9840752.blog.51cto.com/9830752/1837495
centos下cacti之monitor、thold、setting安装
原文地址:http://9840752.blog.51cto.com/9830752/1837495