Chinaunix首页 | 论坛 | 博客
  • 博客访问: 109843
  • 博文数量: 25
  • 博客积分: 1094
  • 博客等级: 少尉
  • 技术积分: 284
  • 用 户 组: 普通用户
  • 注册时间: 2009-05-25 16:36
文章分类

全部博文(25)

文章存档

2011年(14)

2010年(11)

分类: LINUX

2010-03-09 16:21:23

安装cacti之前需要一个php环境这里我就不写配置php环境了
cacti下载地址
thlod下载地址
使用最新的版本cacti-0.8.7e
安装thlod需要cacti-plugin和settings支持
下载后将所有文件cp到/var/www/html
[root@service html]#wget
[root@service html]#wget
[root@service html]#wget
[root@service html]#wget
[root@service html]#wget
安装cacti
[root@service html]# tar xzvf cacti-0.8.7e.tar.gz
[root@service html]# mv cacti-0.8.7e cacti //修改名字
[root@service html]# vim cacti/include/config.php //修改连接数据库
[root@service html]# vim cacti/include/global.php
建立cacti数据库并且导入数据库
[root@service html]# mysql
mysql> create database cacti;
Query OK, 1 row affected (0.00 sec)
mysql> use cacti
Database changed
mysql> source /var/www/html/cacti/cacti.sql;
nginx配置文件
server {
listen 80;
server_name cacti.test.com;
location / {
root /var/www/html/cacti/;
index index.php index.html index.htm;
#access_log logs/host.access.log main;
}
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/html/cacti/$fastcgi_script_name;
include fastcgi_params;
需要安装snmp 直接yum install net-snmp*
[root@service html]# rpm -qa|grep net-snmp
net-snmp-5.3.2.2-5.el5_3.1
net-snmp-perl-5.3.2.2-5.el5_3.1
net-snmp-devel-5.3.2.2-5.el5_3.1
net-snmp-libs-5.3.2.2-5.el5_3.1
net-snmp-utils-5.3.2.2-5.el5_3.1
修改snmp文件并且启动
[root@service html]# vim /etc/snmp/snmpd.conf
#com2sec notConfigUser default public //原
com2sec notConfigUser 127.0.0.1 public //修改后的
#access notConfigGroup "" any noauth exact systemview none none //原
access notConfigGroup "" any noauth exact all none none //修改后的
view all included .1 80 //去掉注释
[root@service html]# service snmpd start
Starting snmpd: [ OK ]
rrdtool 安装
[root@service html]#wget
[root@service html]#rpm -ivh rpmforge-release-0.3.6-1.el5.rf.i386.rpm
[root@service html]#yum install rrdtool
输入cacti.test.com 进行安装了 安装步骤直接下一步这里我就不输入了默认密码是admin
[root@service html]#cp -R files-0.8.7e/* /var/www/html/cacti/
[root@service html]#mkdir cacti/plugins settings
[root@service html]#mkdir cacti/plugins/settings
[root@service html]#mkdir cacti/plugins/thold
[root@service html]#mkdir cacti/plugins/monitor
[root@service html]#cp monitor-0.8.2.zip cacti/plugins/monitor/
[root@service html]#cp settings-0.5.zip cacti/plugins/settings/
[root@service html]#cp thold-0.4.1.zip cacti/plugins/thold/
[root@service html]#vim cacti/include/global.php 进入添加
$plugins[] = 'thold';
$plugins[] = 'settings';
$plugins[] = 'monitor';
[root@service html]#cd cacti/plugins
[root@service html]#cd monitor/
[root@service html]#unzip monitor-0.8.2.zip
[root@service plugins]#mysql cacti -u root -p < monitor.sql
[root@service plugins]#unzip thold-0.4.1.zip
[root@service plugins]#mysql cacti -u root -p < thold.sql
[root@service plugins]#unzip settings-0.5.zip
Plugin Management —->admin—–>Plugin Management //授权用户
阅读(2773) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~