1. 下载cacti-spine,必须和自己的cacti版本相一致,我版本为0.8.7g

 
  
  1. wget http://www.cacti.net/downloads/spine/cacti-spine-0.8.7g.tar.gz -P /usr/local/src 

2. 解压,编译,安装

 
  
  1. tar zxvf /usr/local/src/cacti-spine-0.8.7g.tar.gz -C /usr/local/src  
  2. cd /usr/local/src/cacti-spine-0.8.7.g  
  3. ./configure --with-mysql=/usr/local/mysql  
  4. make  
  5. make install 

--with-mysql=/usr/local/mysql

我的mysql安装路径为/usr/local/mysql

默认的安装路径为/usr/local/spine

3. 添加配置文件

 
  
  1. cd /usr/local/spine/etc  
  2. cp spine.conf.dist spine.conf  
  3. vi spine.conf  
  4. DB_Host 192.168.1.10  
  5. DB_Database cacti  
  6. DB_User cacti  
  7. DB_Pass xxxxxx  
  8. DB_Port 3306  
  9. DB_PreG 0 

4. 测试spine

 
  
  1. /usr/local/spine/bin/spine  
  2. SPINE: Using spine config file [spine.conf]  
  3. SPINE: Version 0.8.7g starting  
  4. SPINE: Time: 2.1642 s, Threads: 1, Hosts: 6 

没有报错,进行配置cacti

5. cacti设置

a. 点击"console",选择"configuration"中的"Settings",选择Paths选项卡,对"Alternate Poller Path"设置spine的位置,如下图:设置为/usr/local/spine/bin/spine

点击"save"按钮保存。

b. 选择"Poller选项卡",修改"Poller Type"为"spine",如下图

点击"save"按钮保存。

6. 日志检查

 
  
  1. tail /data/www/cacti/log/cacti.log  
  2. ……  
  3. 07/28/2011 05:00:04 PM – SYSTEM STATS: Time:3.1515 Method:spine Processes:1 Threads:1 Hosts:6 HostsPerProcess:6 DataSources:44 RRDsProcessed:37 

通过以上可以看出spine正常运行。