Cacti Install/Configuration on CentOS Or Fedora

After a basic install of CentOS or Fedora (no GUI preferred)

Commands To Run:

yum update -y
yum install postfix vixie-cron crontabs screen mlocate man which logrotate php-devl*

RPM setup for DAG

rpm -Uhv

Install Cacti and dependencies

yum install cacti* cacti-spine mysql-server net-snmp-utils
for A in httpd mysqld ; do chkconfig $A on ; service $A start ; done
useradd cactiuser
cd /var/www/cacti
chown -R cactiuser rra/ log/

Add to /var/crontab

*/5 * * * * cactiuser php /var/www/html/cacti/poller.php > /dev/null 2>&1

Install Webmin. See how to do this elsewhere in this document.

Configure MySQL

cd /var/www/cacti
mysqladmin --user=root password all4one
mysqladmin --user=root --password=all4one create cacti
mysql --user=root --password=all4one  cacti <cacti.sql
vi include/config.php (modify to meet db connection settings)

Configure Apache

vi /etc/httpd/conf.d/cacti.conf
service httpd restart

Update The Heartbeat of all templates to ensure no blank spots in graphs:

UPDATE `data_template_rrd` SET rrd_heartbeat=9600

Cacti Installation Notes

If you want to access the Cacti files you can use SMB (aka windows explorer) to connect.  You’ll first need to do a few things for it work properly.

Create a unix/linux user with the same logon/password that you’re using in the domain:

adduser <username>
passwd <username>

Then add the user to SMB (aka Samba):

smbpasswd –a –n <username>

Then change the users password:

smbpasswd –a <username>

Next you’ll need to add the share.

Edit the /etc/samba/smb.conf file and add the share info. It’ll be similar to this:

path = /var/www/cacti
read only = no
browseable = yes
guest ok = yes

This will add a share called cacti that goes to the base of the cacti website.

Restart samba after you’re done and you should have access to the cacti files.

Other Possible Dependencies

yum install popt-* (used by wmic extension for gathering stats)
yum install ntp (network time protocol for updating system clock)


If the user account/password that is used for WMI data collection is changed you must update this in the data_input_data table directly. For example:

UPDATE data_input_data
set value = 'password-here'
where value like 'nUnZ3gb6wry9oPNj1NLi'

Author: Helicopter Jeff

I'm a vinyl decal cutting and designing, Astrophotography and general photography capturing, RC helicopter/quad copter pilot, Arduino and Raspberry Pi hardware/software developer, network, scripting and troubleshooting ninja living in the metro NY area. I am passionate about my hobbies so much I do them for a living. There's nothing better than getting paid to do what you love.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s