Posted by: kezhong | July 15, 2011

Installing Cacti on Fedora 14

Cacti is an open source, web-based graphing tool designed as a frontend to RRDtool’s data storage and graphing functionality. It is generally used to graph time-series data of metrics such as CPU load and network bandwidth utilization. A common usage is to monitor network traffic by polling a network switch or router interface via SNMP.

I want to use it to display bandwidth statistics for my customers.

Install http, php, and mysql
I had installed Fedora 14 as LAMP on my server, so I don’t need to install them.
# yum -y install httpd php mysql mysql-server php-mysql

Install cacti package
# yum install cacti

Create database cacti
# mysql -uroot -p
mysql> create database cacti;
mysql> grant all on cacti.* to root;
mysql> grant all on cacti.* to root@localhost;
mysql> quit

Import cacti.sql to mysql
# mysql -uroot -p123456 cacti < /usr/share/doc/cacti-0.8.7g/cacti.sql

Modify the Configuration files
# vi /etc/cacti/db.php
Then edit and types like below
$database_default = “cacti”;
$database_hostname = “localhost”;
$database_username = “root”;
$database_password = “123456”;

# vi /etc/httpd/conf.d/cacti.conf
comment on “Deny from all”, and change “Allow from” to “Allow from all”

Restart service httpd
# service httpd restart

Configuration via browser
Open the Firefox, input









Click “Next”






Click “Next”











Click “Finish”







Input the default user name (admin) and password (admin), and then click “Login”








Input the password you will use








Then I can enjoy the cacti



Installing Cacti MRTG on Fedora



  1. Add cron job as below, or you will find the status is always “Unknown” after you create a new device.
    # crontab -e
    */5 * * * * php /usr/share/cacti/poller.php > /dev/null

  2. need net-snmp-utils package

  3. […] […]

  4. sorry i am newbie here would you please also include how to add network devices. like for example cisco product like switch or router do i have add any configuration to them?

    sorry for my english

  5. […] […]

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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s


%d bloggers like this: