cacti-0.8.7e.tar.gz install on centos7
客户端安装:1.被监控主机上安装snmp服务
yum install net-snmp-y
yum install net-snmp-utils -y
2.修改配置文件
vi/etc/snmp/snmpd.conf
com2sec notConfigUserdefault public #public为验证字符,可自定义修改,后cacti配置会用到
accessnotConfigGroup "" any noauth exactsystemview none none #systemview修改为all
view all included.1 80 #添加此行
view systemview included .1.3.6.1.2.1.1(配置文件已有行)
view systemview included .1.3.6.1.2.1.25.1.1(配置文件已有行)
view systemview included .1.3.6.1.2.1.2 (需要添加的行,注意位置)
3.在cacti服务端测试
snmpwalk -v 2c -c public 客户端IP if
服务器端安装:
1.安装mariadb
yuminstall mariadb mariadb-servermariadb-devel
2.安装php
yuminstallphpphp-mysql
3.安装库文件
yuminstallzlibzlib-develfreetype libjpegfontconfig gd gd-devel libxml2 php-gd php-clinet-snmp-utils rrdtool \
php-snmp gccnet-snmp-devel autoconf automake libtool dos2unix
4.安装cacti-0.8.7e.tar.gz软件包
cd /var/www/html
这里面6个安装包。分别是:
cacti-0.8.7e.tar.gz、cli_add_graph.patch、fix_icmp_on_windows_iis_servers.patch、snmp_invalid_response.patch、cross_site_fix.patch、template_duplication.patch
4.1.解压cacti。
tarzxvfcacti-0.8.7e.tar.gz
mv cacti-0.8.7e cacti
4.2.cacti打补丁
patch -p1 -N < cli_add_graph.patch
patch -p1 -N < snmp_invalid_response.patch
patch -p1 -N < template_duplication.patch
patch -p1 -N < fix_icmp_on_windows_iis_servers.patch
patch -p1 -N < cross_site_fix.patch
4.3.登陆数据库导入cacti.sql
mysql -p
create database cacti;
grant all privilegeson cacti.*tocacti@'localhost'identified by 'cacti';
flushprivileges;
usecacti;
source/var/www/html/cacti/cacti.sql;
4.4.修改cacti的配置文件
vi/var/www/html/cacti/include/config.php
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "127.0.0.1";
$database_username = "cacti";
$database_password = "cacti";
$database_port = "3306";
4.5.更改配置文件权限。
cd /var/www/html/cacti
chown -Rcacti.apache rralog
chmod755rralog
页:
[1]