Chinaunix首页 | 论坛 | 博客
  • 博客访问: 54992
  • 博文数量: 14
  • 博客积分: 1445
  • 博客等级: 上尉
  • 技术积分: 175
  • 用 户 组: 普通用户
  • 注册时间: 2010-09-14 22:30
文章分类

全部博文(14)

文章存档

2017年(5)

2011年(1)

2010年(8)

我的朋友

分类: LINUX

2010-09-15 14:07:01

 

源码安装cacti依赖关系多比较麻烦,今天试了下rpm安装步骤如下:
首先要安装EPEL
[root@localhost ~]# rpm -Uvh
[root@localhost ~]#yum repolist
Loading "skip-broken" plugin
Loading "fastestmirror" plugin
repo id repo name status
addons CentOS-5 - Addons enabled
base CentOS-5 - Base enabled
epel Extra Packages for Enterprise Linux 5 - enabled  (有这个说明EPEL安装成功)
extras CentOS-5 - Extras enabled
updates CentOS-5 - Updates enabled

安装依赖包
[root@localhost ~]#yum install mysql-server mysql php-mysql php-pear php-common php-gd php-devel php php-mbstring php-cli php-snmp php-pear-Net-SMTP php-mysql httpd

安装Cacti
[root@localhost ~]#yum install cacti

MySQL准备
[root@localhost ~]#mysqladmin -u root password NEWPASSWORD
[root@localhost ~]#mysql -u root -p -e 'create database cacti'
[root@localhost ~]#mysql -u root -p
mysql> GRANT ALL ON cacti.* TO cacti@localhost IDENTIFIED BY 'zYn95ph43zYtq';
mysql> FLUSH privileges;
mysql> \q
[root@localhost ~]#rpm -ql cacti | grep cacti.sql
/usr/share/doc/cacti-0.8.7d/cacti.sql
[root@localhost ~]#mysql -u cacti -p cacti < /usr/share/doc/cacti-0.8.7d/cacti.sql
[root@localhost ~]#vi /etc/cacti/db.php
/* make sure these values refect your actual database/host/user/password */ $database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cacti";
$database_password = "zYn95ph43zYtq";
$database_port = "3306";

配置Apache
[root@localhost ~]#vi /etc/httpd/conf.d/cacti.conf
[root@localhost ~]#Cacti: An rrd based graphing tool
[root@localhost ~]#Alias /cacti /usr/share/cacti  

 Order Deny,Allow Deny from all
 Allow from 192.168.1.0/24

[root@localhost ~]#service httpd restart
[root@localhost ~]#crontab -e
*/5 * * * * cacti /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1

安装配置SNMP
[root@localhost ~]#yum install net-snmp-utils php-snmp net-snmp-libs
[root@localhost ~]#vi /etc/snmp/snmpd.conf
com2sec notConfigUser  192.168.1.0/24       public
access  notConfigGroup ""      any       noauth    exact  all none none
view all included .1 80

安装

阅读(889) | 评论(0) | 转发(0) |
0

上一篇:Nginx启动脚本

下一篇:Awstats分析日志

给主人留下些什么吧!~~