cacti优点
容易安装、界面美观,其侧重点是--->图相化显示当前状况及流量变化
software download
前提环境linux+lamp
1.安装rrdtool
-
tar zxvf rrdtool-1.4.8.tar
-
./configure --profix=/usr/local/rrdtool
-
make && make install
2.安装net-snmp
-
tar zxvf net-snmp-5.4.4.pre2.tar.gz
-
./configure --profix=/usr/local/net-snmp
-
make && make install
3.安装spine
-
tar zxvf cacti-spine-0.8.8a.tar.gz
-
./configure --profix=/usr/local/spine --with-snmp=/usr/local/net-snmp/
-
make && make install
4.修改spine与mysql连接文件,账号密码可随意改动,但与后面的配置要对应
-
vi /usr/local/spine/etc/spine.conf.dist
-
DB_Host localhost
-
DB_Database cacti
-
DB_User cactiuser
-
DB_Pass 2013
-
DB_Port 3306
-
DB_PreG 0
mv /usr/local/spine/etc/spine.conf.dist /usr/local/spine/etc/spine.conf
5.创建cacti库,添加cacti账户
-
mysql> create database cacti;
-
Query OK, 1 row affected (0.03 sec)
-
mysql> grant all on cacti.* to 'cactiuser'@localhost identified by '2013';
-
Query OK, 0 rows affected (0.04 sec)
-
mysql> flush privileges;
-
Query OK, 0 rows affected (0.00 sec)
6.安装cacti
-
useradd cactiuser
-
tar zxvf cacti-0.8.8a.tar.gz
-
mv cacti-0.8.8a /var/www/html/cacti
-
chown -R root.root /var/www/html/cacti
-
cd /var/www/html/cacti
-
chown -R cactiuser ./rra ./log
7.导入cacti.sql到cacti库,修改对应配置文件
-
mysql cacti < cacti.sql
-
vi include/config.php
-
$database_password = "2013"
8.添加计划任务
-
crontab -e
-
*/5 * * * * cactiuser /usr/bin/php /var/www/html/cacti/poller.php > /dev/null 2>&1
9.启动apache,输入,
按照提示进行配置,进入cacti管理画面前,默认user:pass是admin:admin
阅读(2907) | 评论(0) | 转发(1) |