ywg 发表于 2019-1-10 12:39:16

yum搭建cacti

yum install mysql mysql-server mysql-devel php-mysql httpdphp php-pdo lm-sensors net-snmp net-snmp-devel openssl-devel

vi /etc/snmp/snmpd.conf
  com2…default… 改为com2…..127.0.0.1….
  access not…..systemview…….. 改为access not…………all…….
  #view all ……1.8 去掉#
Service snmpd start
  Service httpd satart
  Service mysqld start
  

  Wget http://www.cacti.net/downloads/cacti-0.8.7h.tar.gz
  Tar –zxvf cacti-0.8.7h.tar.gz
  Mv cacti-0.8.7 /var/www/html/cacti
  

  Mysql –u root
  Mysql> create database cacti;
  Mysql>grant all privileges on cacti.* tocacti@localhost identified by ‘cacti’ with grant option;
  

  Mysql>grant all privileges on cacti.* tocacti@127.0.0.1 identified by ‘cacti’ with grant option;
  

  Mysql>use cacti;
  Mysql>source /var/www/html/cacti/cacti.sql;
  Mysql>exit;
  

  Vi /var/www/html/cacti/include/config.php
  

  添加用户
  Useradd cacti –d /var/www/html/cacti –s /bin/flase
  Chown –R cacti /var/www/html/cacti/rra/var/www/html/cacti/log
  

  计划任务
  Crontab –e
  */2 * * * * php /var/www/html/cacti/poller.php > /dev/null 2>&1
  

  IE下测试:
  http://localhost/cacti
  看到cacti登入界面。则表示已经安装成功,之后就把相应的目录添加完全,就完成搭建了。
  




页: [1]
查看完整版本: yum搭建cacti