xywuyiba8 发表于 2019-1-10 09:10:10

yum安装cacti及集成个插件

  # yum-y install httpd php php-mysql php-ldap php-xml net-snmp-utils mysqlmysql-server net-snmp crond rrdtool lm_sensors
  gcc gcc-c++zlib-devellibpng-deve
  # yum -y install libart_lgpl libart_lgpl-devel
  # yum -y install freetype freetype-devel
  #mkdir /cacti
  # mv/root/Desktop/rrdtool-1.2.27.tar.gz /cacti/
  # cd/cacti/
  #tar -zxf rrdtool-1.2.27.tar.gz -C /usr/src
  #cd /usr/src
  #cd rrdtool-1.2.27/
  # ./configure --prefix=/usr/local
  # make && make install
  rrd------tab键可以补全rrdtool安装成功
  # cd /root/Desktop/
  # tar -zxf cacti-0.8.7g.tar.gz -C /usr/src/
  # cd /usr/src/
  #cp -r cacti-0.8.7g/ /var/www/html/
  # useradd cactiuser
   # cd /usr/src/ cacti-0.8.7g/
  # chown -R cactiuser:cactiuser rra/ log/
  # service mysqld start
  # mysql
  mysql> createdatabase cactidb default character set utf8;
  mysql> grantall on cactidb.* to 'cactiuser'@'localhost' identified by '123456';
  mysql> \q
  将cacti.sql数据库导入到cactidb中
  # mysql -ucactiuser -p123456 cactidb < cacti.sql
  -u用户名-p密码      
  数据库名是上面在msyql数据库中创建的
  用户名密码是数据库中授权的
  # service httpd restart;chkconfig httpd on
  #cd /var/www/html/cacti/include
  #vimconfig.php
http://blog.运维网.com/e/u261/themes/default/images/spacer.gif
  更改为在数据库中授权的用户名密码库名
# vim/etc/snmp/snmpd.conf
62 accessnotConfigGroup ""      any      noauth    exact all none none    //systemview改为all
  85 view all    included .1         80//取消注释
chkconfig snmpd on
  112 com2secnotConfigUser   192.168.10.10      public    //监控服务器的ip地址
  # service snmpd start;chkconfig snmpd on
  
  
  
  
  监控本机的配置192.168.10.10
  另一客户端的配置192.168.10.20
  #yum -y install net-snmp net-snmp-utils
  #vim /etc/snmp/snmpd.conf
  配置与上面一样
  #service snmpd restart;chkconfig snmpd on
  服务器端的配置操作 device--点击右上角的add
http://blog.运维网.com/e/u261/themes/default/images/spacer.gif
  完成以上点击右下角的 create
  
  Associated DataQueries添加以下的数据
http://blog.运维网.com/e/u261/themes/default/images/spacer.gif
  SNMP - Get MountedPartitions
  SNMP - GetProcessor Information
  SNMP - InterfaceStatistics
  添加完毕 save保存
  
  
  保存完成后,点击create graphs for this host
  创建图形
http://blog.运维网.com/e/u261/themes/default/images/spacer.gif
  
http://blog.运维网.com/e/u261/themes/default/images/spacer.gif
  点击右下角的创建,开始创建图形
http://blog.运维网.com/e/u261/themes/default/images/spacer.gif
  
http://blog.运维网.com/e/u261/themes/default/images/spacer.gif
  安装cacti-plugin-0.8.7g-PA-v2.9.tar.gz是插件
  # tar -xzf cacti-plugin-0.8.7g-PA-v2.9.tar.gz –C /var/www/html/cacti
  #cd /var/www/html/cacti
  #patch–p1 –N cacti-plugin-0.8.7b-PA-v2.1.diff
  #mysql –u root –p cactidb
页: [1]
查看完整版本: yum安装cacti及集成个插件