电脑技术:cacti安装与配置下载

 一、安装包软件
这里有些必要的我在下面附上下载包,apache、mysql、php都可以通过yum安装。
RRDtool http://oss.oetiker.ch/rrdtool/
Net-snmp 
Cacti http://
二、安装配置
1、安装LAMP
[root@localhost]# yum -y install httpd mysql-server php php-mysql mysql-devel
[root@localhost]# chkconfig httpd on
[root@localhost]# chkconfig mysqld on
[root@localhost]# /etc/init.d/mysqld start
这里安装好通过IP,测试下phpinfo看是否正常,顺便看下sockets这个扩展有没有开启不然后知识兔期打开cacti会报错。
2、安装rrdtool
Rrdtool安装需要cairo、libxml2、pango库支持,可通过yum安装
[root@localhost]# yum -y install cairo-devel libxml2-devel pango-devel
[root@localhost]# tar zxvf rrdtool-1.4.7.tar.tar
[root@localhost]# cd rrdtool-1.4.7
[root@localhost]# ./configure –prefix=/usr/local/rrdtool
这里说下,可能会报错,需要安装gcc套件,直接yum安装gcc就可以了。
[root@localhost rrdtool-1.4.7]# make && make install
[root@localhost rrdtool-1.4.7]# ln -s /usr/local/rrdtool/bin/* /usr/local/bin/
3、安装snmp
[root@localhost ~]# tar zxvf net-snmp-5.6.1.1.tar.gz
[root@localhost ~]# cd net-snmp-5.6.1.1
[root@localhost net-snmp-5.6.1.1]# ./configure –prefix=/usr/local/net-snmp
[root@localhost net-snmp-5.6.1.1]# make && make install
[root@localhost net-snmp-5.6.1.1]# cp EXAMPLE.conf /etc/snmpd.conf
[root@localhost ~]# ln -s /usr/local/net-snmp/bin/* /usr/local/bin/
[root@localhost ~]# vim /etc/snmpd.conf
找到这一行: #rocommunity public localhost 去掉注释
[root@localhost ~]# /usr/local/net-snmp/sbin/snmpd -c /etc/snmpd.conf
加入开机启动
[root@localhost ~]# echo “/usr/local/net-snmp/sbin/snmpd -c /etc/snmpd.conf ” >>/etc/rc.local
 
4、安装cacti
[root@localhost ~]# tar zxvf cacti-0.8.7i-PIA-3.1.tar.gz
[root@localhost ~]# mv cacti-0.8.7i-PIA-3.1/* 

ar/www

ml/
将cacti的网站目录移到web目录
[root@localhost ~]# chown -R apache:apache 

ar/www

ml/
#连接到mysql创建数据库
mysql> create database cacti; 
#创建cacti数据库
mysql> insert into mysql.user(host,user,password) values ('localhost','cacti',password('123456'));
#建立用户cacti,密码123456
mysql> flush privileges;
重载mysql授权表
mysql> grant all on cacti.* to cacti@'localhost' identified by '123456';
把数据库cacti授权于用户cacti
[root@localhost ~]# cd 

ar/www

ml/
[root@localhost html]# mysql -ucacti -p123456 cacti修改网站配置文件,使用正确连接数据库参数
[root@localhost html]# vim include/config.php
$database_type = “mysql”;
$database_default = “cacti”;
$database_hostname = “localhost”;
$database_username = “cacti”;
$database_password = “123456”;
$database_port = “3306”;
使用浏览器打开http://192.168.0.33/install/ 就出现所安装界面了。 

电脑技术:cacti安装与配置

电脑技术:cacti安装与配置

做了个流量监控后期再完美下!

本文来自系统大全为您分享如需转载请注明!推荐win10下载

下载仅供下载体验和测试学习,不得商用和正当使用。

下载体验

请输入密码查看下载!

如何免费获取密码?

点击下载

评论