码迷,mamicode.com
首页 > 其他好文 > 详细

cacti (不可以利用yum安装cacti的配置)

时间:2016-04-19 17:09:54      阅读:184      评论:0      收藏:0      [点我收藏+]

标签:

我们如果用yum不可以安装cacti,我们则可以利用tar包来安装!!!

//cacti的配置准备
[root@localhost ~]# yum install -y epel-release 
[root@localhost ~]# yum install -y httpd php php-mysql mysql mysql-server mysql-devel php-gd  libjpeg libjpeg-devel libpng libpng-devel 
a
[root@localhost ~]# yum install -y net-snmp  net-snmp-utils  rrdtool
[root@localhost ~]# /etc/init.d/mysqld start
[root@localhost ~]# /etc/init.d/httpd  start
[root@localhost ~]# /etc/init.d/snmpd start


//安装cacti并配置
[root@localhost ~]# cd /usr/local/src
[root@localhost src]# wget http://www.cacti.net/downloads/cacti-0.8.7e.tar.gz
[root@localhost src]# tar -zxvf cacti-0.8.7e.tar.gz
[root@localhost src]# mv cacti-0.87e /var/www/html/cacti

//创建cacti数据库
[root@localhost src]# mysql -uroot
...
...
mysql>create database cacti;
mysql>grant all on cacti.* to cacti@localhost identified by ‘cacti’;
mysql>flush privileges;
mysql> exit
Bye

//导入cacti.sql
[root@localhost src]# mysql -u root  cacti < /var/www/html/cacti/cacti.sql

//修改配置文件
[root@localhost src]# cd /var/www/html
[root@localhost html]# vim cacti/include/config.php
//change
$database_type = “mysql”;
$database_default = “cacti”;
$database_name = "cacti" ;
$database_hostname = “127.0.0.1" ;
$database_username = “cacti”;
$database_password = “cacti”;
$database_port = “3306″;

//更改属组
[root@localhost html]# useradd cacti
[root@localhost html]# chgrp -R cacti /var/www/html/cacti
[root@localhost html]# chown -R cacti /var/www/html/cacti/rra
[root@localhost html]# chown -R cacti /var/www/html/cacti/log
[root@localhost html]# chown -R cacti /var/www/html/cacti/poller.php

//web安装cacti

http://ip/cacti
(这里如果出现“403 forbidden”的错误,请把selinux关闭)
点两下“next” 和一次”Finish“ 即可
输入admin   admin 登录,重新设置新的密码

 

//使cacti生成图表
[root@localhost html]# /usr/bin/php /var/www/html/cacti/poller.php
[root@localhost html]# crontab -e 
//ADD
*/5 * * * * /usr/bin/php /var/www/html/cacti/poller.php



//剩下步骤与之前的cacti配置一致 ,可前往查看

 

cacti (不可以利用yum安装cacti的配置)

标签:

原文地址:http://www.cnblogs.com/frankielf0921/p/5408461.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!