Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6891924
  • 博文数量: 3857
  • 博客积分: 6409
  • 博客等级: 准将
  • 技术积分: 15948
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-02 16:48
个人简介

迷彩 潜伏 隐蔽 伪装

文章分类

全部博文(3857)

文章存档

2017年(5)

2016年(63)

2015年(927)

2014年(677)

2013年(807)

2012年(1241)

2011年(67)

2010年(7)

2009年(36)

2008年(28)

分类: 系统运维

2014-06-10 23:00:49

原文地址:Cacti搭建实例 作者:fly_cuilele

环境:
LAMP环境已搭建,可正常提供访问,如图:

配置监控端Server:
安装RRDtool

[root@cacti ~]#yum -y install cairo-devel libxml2-devel pango-devel  perl-devel perl-CPAN

[root@cacti ~]# tar zxvf rrdtool-1.4.5.tar.gz
[root@cacti ~]# cd rrdtool-1.4.5
[root@cacti rrdtool-1.4.5]# ./configure --prefix=/usr/local/rrdtool
[root@cacti rrdtool-1.4.5]# make && make install
[root@cacti rrdtool-1.4.5]# ln -s /usr/local/rrdtool/bin/* /usr/local/bin/

安装net-snmp

[root@cacti]# yum install net-snmp net-snmp-devel net-snmp-libs net-snmp-utils

 

Vi /etc/snmp/snmpd.conf

#41  com2sec notConfigUser   127.0.0.1      public

#62  access  notConfigGroup ""      any       noauth    exact  all  none none

#85  view all    included  .1    


[root@cacti ~]# chkconfig –level 35 snmpd on

[root@cacti ~]# service snmpd start


配置Cacti

[root@cacti ~]#useradd cacti

[root@cacti ~]#echo “123456” | passwd --stdin cacti

[root@cacti ~]# tar zxvf cacti-0.8.8b.tar.gz

[root@cacti ~]# mv cacti-0.8.8b  /usr/local/apache/htdocs/cacti

[root@cacti cacti]# chown cacti:cacti log -R

[root@cacti cacti]# chown cacti:cacti rra –R


[root@cacti ~]#mysql -uroot  -p

mysql> create database cacti;        

mysql> insert into mysql.user(host,user,password) values ('localhost','cacti',password('123456'));

mysql>flush privileges;

mysql> grant all on cacti.* to cacti@'localhost' identified by '123456';


[root@cacti cacti]# mysql -ucacti -p123456 cacti < cacti.sql       \\导入数据库
报错:


原因:数据库版本兼容性问题

解决方法:

vi /usr/local/apache/htdocs/cacti/cacti.sql



[root@cacti cacti]# mysql -ucacti -p123456 cacti < cacti.sql    \\在此导入


编辑vi /usr/local/apache/htdocs/cacti/include/config.php


编辑global.php文件,添加如下内容:

[root@cacti]# vi /usr/local/apache/htdocs/cacti/include/global.php


PSCacti安装完毕默认显示美国时刻



访问:














至此Cacti检测服务器已搭建完毕!!!



阅读(492) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~