1、搭建lamp环境
yum -y install httpd mariadb mariadb-server mariadb-devel php php-mysql php-gd php-pear gd gd-devel
systemctl start httpd && systemctl enable httpd
systemctl start mariadb && systemctl enable mariadb
2、安装绘图工具和snmp组件
yum -y install rrdtool rrdtool-devel rrdtool-perl rrdtool-php net-snmp-*
systemctl start snmpd && systemctl enable snmpd
3、数据库创建cacti用户及库
mysql -uroot -p
> create database cacti character set utf8 collate utf8_bin;
> grant all on cacti.* to cacti@localhost identified by "1234";
> flush privileges;