cacti安装

1.首先安装 AMP  (apache,mysql,php)

2.然后安装rrdtool

  Rrdtool需要一些库文件的支持,我们使用yum方式安装
  yum install cairo-devel libxml2-devel pango-devel pango libpng-devel freetype freetype-devel libart_lgpl-devel intltool

  #tar zxvf rrdtool-1.3.8.tar.gz
  #cd rrdtool-1.3.8
  # ./configure --prefix=/usr/local/rrdtool --disable-tcl
  #make && make install
  #ln -s /usr/local/rrdtool/bin/* /usr/local/bin/

3.安装net-snmp

  # tar zxvf net-snmp-5.3.0.1.tar.gz
  #cd net-snmp-5.3.0.1
  # ./configure --prefix=/usr/local/net-snmp --enable-developer
  # cp EXAMPLE.conf /usr/local/net-snmp/share/snmp/snmpd.conf
  #vi /usr/local/net-snmp/share/snmpd.conf修改可以访问SNMP的网段和community
  
  # ln -s /usr/local/net-snmp/bin/* /usr/local/bin/
  #/usr/local/net-snmp/sbin/snmpd -c /usr/local/net-snmp/share/snmp/snmpd.conf     //启动SNMP

  # echo "/usr/local/net-snmp/sbin/snmpd -c /usr/local/net-snmp/share/snmp/snmpd.conf">>/etc/rc.loca   //加入开机启动
4.安装cacti
 #tar zxvf cacti-0.8.7e.tar.gz
  #mv cacti-0.8.7e/* /usr/local/apache/htdocs/
  #useradd cacti
  #chown -R cacti /usr/local/apache/htdocs/rra
  #chown -R cacti /usr/local/apache/htdocs
  #chgrp -R cacti /usr/local/apache/htdocs/

登录MySQL,新建数据,并授权

  #/usr/local/mysql/bin/mysql –uroot –p123456

  Mysql>create database cacti;
  Mysql>grant all on cacti.* to cacti@'localhost' identified by 'cacti';
  Mysql>flush privileges;

导入cacti数据库

  #cd /usr/local/apache/htdocs
  #/usr/local/mysql/bin/mysql -uroot -p123456 cacti < cacti.sql

修改cacti安装配置文件

  #vi /usr/local/apache/htdocs/include/config.php
  
  
   http://XXX.XXX.XXX.XXX/install

你可能感兴趣的:(职场,cacti,休闲)