CentOS 7 - Configuring Cacti
Install Required Dependencies
yum -y install mariadb-server php php-cli php-mysql net-snmp-utils rrdtool php-snmp gcc mariadb-devel net-snmp-devel autoconf automake libtool dos2unix
Enable Required Services for Cacti
chkconfig httpd on
chkconfig mariadb on
chkconfig crond on
Download and Extract Cacti
cd /var/www/html
wget http://www.cacti.net/downloads/cacti-0.8.8c.tar.gz
tar -xzvf cacti-0.8.8c.tar.gz
Setting Up Cacti for Apache
Add Cacti User & Enable Cron Jobs
adduser cacti
echo "*/5 * * * * cacti php /var/www/html/cacti/poller.php &>/dev/null" >> /etc/cron.d/cacti
Fix Cacti Directory Permission
cd /var/www/html/cacti
chown -R cacti.apache rra log
chmod 775 rra log
Set Up Cacti Database
mysql -p cacti < /var/www/html/cacti/cacti.sql
GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'MyV3ryStr0ngPassword';
flush privileges;
exit
cd /var/www/html/cacti/include/
vi config.php (and change $database_* configuration and $url_path)
Open Firewall Ports to HTTP and HTTPS
firewall-cmd --permanent --zone=public --add-service=https
firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --reload
Login to cacti using admin:admin and go to “Console -> System Utilities” and click on “Rebuild Poller Cache” after the first login!
No Comments