Did You Know?
Donate to TecMint

LFCS - Linux Foundation Certified SysAdmin - Exam Preparation Guide

Install Cacti (Network Monitoring) on RHEL/CentOS 6.3/5.8 and Fedora 17-12

Download Your Free eBooks NOW - 10 Free Linux eBooks for Administrators

Cacti tool is an open source web based network monitoring and system monitoring graphing solution for IT business. Cacti enables a user to poll services at regular intervals to create graphs on resulting data using RRDtool. Generally, it is used to graph time-series data of metrics such as network bandwidth utilization, CPU load, running processes, disk space etc.

Install Cacti in Linux

Install Cacti in RHEL / CentOS / Fedora

In this how-to we are going to show you how to install and setup complete network monitoring application called Cacti using Net-SNMP tool on RHEL 6.3/6.2/6.1/6/5.8, CentOS 6.3/6.2/6.1/6/5.8 and Fedora 17,16,15,14,13,12 systems using YUM package manager tool.

Cacti Required Packages

The Cacti required following packages to be installed on your Linux operating systems like RHEL / CentOS / Fedora.

  1. Apache : A Web server to display network graphs created by PHP and RRDTool.
  2. MySQL : A Database server to store cacti information.
  3. PHP : A script module to create graphs using RRDTool.
  4. PHP-SNMP : A PHP extension for SNMP to access data.
  5. NET-SNMP : A SNMP (Simple Network Management Protocol) is used to manage network.
  6. RRDTool : A database tool to manage and retrieve time series data like CPU load, Network Bandwidth etc.

Installing Cacti Required Packages on RHEL / CentOS / Fedora

First, we need to install following dependency packages one-by-one using YUM package manager tool.

Install Apache

# yum install httpd httpd-devel

Install MySQL

# yum install mysql mysql-server

Install PHP

# yum install php-mysql php-pear php-common php-gd php-devel php php-mbstring php-cli php-mysql

Install PHP-SNMP

# yum install php-snmp

Install NET-SNMP

# yum install net-snmp-utils p net-snmp-libs php-pear-Net-SMTP

Install RRDTool

# yum install rrdtool

Staring Apache, MySQL and SNMP Services

Once you’ve installed all the required software’s for Cacti installation, lets start them one-by-one using following commands.

Starting Apache
# /etc/init.d/httpd start
# service httpd start
Starting MySQL
# /etc/init.d/mysqld start
# service mysqld start
Starting SNMP
# /etc/init.d/snmpd start
# service snmpd start
Configure Start-up Links

Configuring Apache, MySQL and SNMP Services to start on boot.

# /sbin/chkconfig --levels 345 httpd on
# /sbin/chkconfig --levels 345 mysqld on
# /sbin/chkconfig --levels 345 snmpd on

Install Cacti on RHEL / CentOS / Fedora

Here, you need to install and enable EPEL Repository. Once you’ve enabled repository, type the following command to install Cacti application.

# yum install cacti

Sample Output:

Loaded plugins: fastestmirror, refresh-packagekit
Resolving Dependencies
--> Running transaction check
---> Package cacti.noarch 0:0.8.8a-2.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

 Package				Arch		Version				Repository		Size
 cacti                  noarch		0.8.8a-2.el6		epel            2.0 M

Transaction Summary
Install       1 Package(s)

Total download size: 2.0 M
Installed size: 5.4 M
Is this ok [y/N]: y
Downloading Packages:
cacti-0.8.8a-2.el6.noarch.rpm		                         | 2.0 MB     00:40
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : cacti-0.8.8a-2.el6.noarch						1/1
  Verifying  : cacti-0.8.8a-2.el6.noarch						1/1

  cacti.noarch 0:0.8.8a-2.el6


Configuring MySQL Server for Cacti Installation

We need to configure MySQL for Cacti, to do this we need to set password for our newly installed MySQL server and then we will create Cacti database with user Cacti. If you’re MySQL is already password protected, then don’t need to set it again.

Set MySQL Password

To set new password for MySQL server, use the following command. (Note : This is for new MySQL installation only).

# mysqladmin -u root password YOUR-PASSWORD-HERE

Create MySQL Cacti Database

Login into MySQL server with newly created password and create Cacti database with user Cacti and set the password for it.

# mysql -u root -p
mysql> create database cacti;
mysql> GRANT ALL ON cacti.* TO cacti@localhost IDENTIFIED BY 'your-password-here';
mysql> FLUSH privileges;
mysql> quit;

Install Cacti Tables to MySQL

Find out the database file path using RPM command, to install cacti tables into newly created Cacti database, use the following command.

# rpm -ql cacti | grep cacti.sql
Sample Output:

Now we’ve of the location of Cacti.sql file, type the following command to install tables, here you need to type the Cacti user password.

mysql -u cacti -p cacti < /usr/share/doc/cacti-0.8.8a/cacti.sql

Configure MySQL settings for Cacti

Open the file called /etc/cacti/db.php with any editor.

# vi /etc/cacti/db.php

Make the following changes and save the file. Make sure you set password correctly.

/* make sure these values reflect your actual database/host/user/password */
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cacti";
$database_password = "your-password-here";
$database_port = "3306";
$database_ssl = false;

Configuring Apache Server for Cacti Installation

Open file called /etc/httpd/conf.d/cacti.conf with your choice of editor.

# vi /etc/httpd/conf.d/cacti.conf

You need to enabled access to Cacti application for your local network or per IP level. For example we’ve enabled access to our local LAN network In your case, it would be different.

Alias /cacti    /usr/share/cacti
<Directory /usr/share/cacti/>
        Order Deny,Allow
        Deny from all
        Allow from

Finally, restart the Apache service.

# /etc/init.d/httpd restart
# service httpd restart

Setting Cron for Cacti

Open file /etc/cron.d/cacti.

# vi /etc/cron.d/cacti

Uncomment the following line. The poller.php script runs every 5mins and collects data of known host which is used by Cacti application to display graphs.

#*/5 * * * *    cacti   /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1

Running Cacti Installer Setup

Finally, Cacti is ready, just go to http://YOUR-IP-HERE/cacti/ & follow the installer instruction through the following screens. Click Next button.

Cacti Installer Screen

Cacti Setup Screen

Please choose installation Type as “New Install“.

Cacti New Install Setup

Select Cacti New Install

Make sure all the following values are correct before continuing. Click Finish button.

Cacti Installation

Cacti Installation Directories

Cacti Login Screen, enter username as admin and password as admin.

Cacti Login Screen

Cacti Login Screen

Once you’ve entered username and password, it will ask you to enter a new password for cacti.

Set Cacti Password

Cacti Force Password Screen

Cacti Console Screen.

Cacti Console

Cacti Console Screen

How to Create New Graphs

To create graphs, Click on New Graphs –> Select Host –> Select SNMPInterface Statistics and Select a graph type In/Out Bits. Click on Create button. Please refer screen below.

Create Graphs in Cacti

How to Create Graphs in Cacti

For more information and usage please visit the Cacti Page.

Ravi Saive

Owner at TecMint.com
Simple Word a Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux.

Your name can also be listed here. Work as a Paid freelancer/writer at TecMint.
Download Free eBooks
Advanced Bash-Scripting Guide
Linux Bible
A Newbie's Getting Started Guide to Linux
Ubuntu Linux Toolbox: 1000+ Commands

147 Responses

  1. Before step “Running Cacti Installer Setup” you need to open for HTTP in IPTABLES firewall….

    nano /etc/sysconfig/iptables

    Add the following:

    -A INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT

    and restart IPTABLES:

    service iptables restart

  2. jon says:

    thanks for the tutorial bro ; )

  3. g3 says:

    Great Instructions!!!! Do you have anyting on adding plugins like routerconfigs or realtime

  4. Venkat says:


    I have installed cacti in CentOS. Currently, the installation was successful, but it is not allowing me to go to the next screen after login. After I give admin/admin, the page is getting refreshed and its not moving to the next screen, where we can see the “force password change” page. Please help in giving some solution to it.

    • Ravi Saive says:


      I think you have login session problem, set 777 writes to /tmp folder and /var/lib/php/session. it should work.

      • 0mar says:

        Hi Ravi excellent tutorial very good I came all excellent
        ravi I have only one question?

        What I have to use user and password for logging
        please help I want to implement that service
        in my work.





      • 0mar says:

        my friend thanks I’ll try it and I confirm.

        my friend nothing more I would like to do a how-to
        openvpn with linux and windows clients interested me much
        know how to configure it.

        Thanks agains ….

      • 0mar says:

        My thanks everything ok the problem was me that not read good the document.

        all ok.

        thanks, my friend very very good good how to.

    • Sahil says:

      Dear Venkat,

      Please give the new password and confirm password for cacti use.
      Hope this will be solve your issue.

  5. Ehsan says:

    Thank you Very much . I have configured Cacti with out any error.

  6. robert says:

    Can anyone help me in setting up a cacti for monitor only my network devices. Please if any one could be me with the commands and the interface also. Console screen

  7. Abbas says:

    Hey , Really great instruction installing cacti.However I am facing a little problem.
    When I reach to the point of Running cacti installer set up I get the following error:


    You don’t have permission to access /cacti on this server.
    Apache/2.2.15 (CentOS) Server at localhost Port 80

    P.S : I am new at unix

    • Ravi Saive says:


      Did you added Allow from in /etc/httpd/conf.d/cacti.conf file to allow access to localhost?

      Alias /cacti /usr/share/cacti
      <Directory /usr/share/cacti/>
      Order Deny,Allow
      Deny from all
      Allow from PC_IP_Address

      After that, restart httpd service. It will fix the problem.

      service httpd start 
  8. Abbas says:

    I have tried that this moment, but still the same error
    is there any service that should be restarted upon this config ?

  9. Abbas says:

    Ravi,its done,
    I was using localhost/cacti so I changed to use my-local-IP/cacti and edited my proxy settings

    1 more question for now
    which username and password I must use

  10. Abbas says:

    Well, I did not notice the default ones
    Thanks man :)
    I have logged in

  11. Abbas says:

    I have only two options regarding Graph types :
    *Graph templated base
    *Unix-Get mounted partitions

    • kuman says:

      at the console, under management section, click devices. then click localhost. change host template from local linux machine to ucd/net snmp host. click save at the bottom of screen. only after that snmp – interface statistics option available.

  12. simon says:

    please use this default user name admin and password admin. it works

  13. safa says:

    Please help me!

    Alias /cacti /usr/share/cacti

    # httpd 2.4
    Require host localhost

    # httpd 2.2
    Order deny,allow
    Deny from all
    Allow from
    in this section , when I restart apache it didn’t start and give me a error that Reqire or Order or Deny or Allow not allowed here

  14. Marius says:

    Did nobody got this error message:

    Error: Package: php-devel-5.3.3-14.el6_3.i686 (updates)
    Requires: php = 5.3.3-14.el6_3
    Installed: php-5.4.10-1.el6.remi.i686 (@remi)
    php = 5.4.10-1.el6.remi
    Available: php-5.3.3-3.el6_2.8.i686 (base)
    php = 5.3.3-3.el6_2.8
    Available: php-5.3.3-14.el6_3.i686 (updates)
    php = 5.3.3-14.el6_3
    You could try using –skip-broken to work around the problem
    You could try running: rpm -Va –nofiles –nodigest

    So I did, someone knows how to resolve this ?


    • Ravi Saive says:

      You have older version php which is conflicting with php 5.4, first remove the older php with the following commands.

      # yum -y erase php php-devel php-common

      and then try again…

      • Marius says:

        Thanks Ravi for your quick response,

        That is going well so far, but when I try to startup the cacti install webinterface I got the following error message:

        FATAL: Cannot connect to MYsql server on myhostname, Please make sure you have specified a valid mysql databasename in ‘/include/config.php’

        • Ravi Saive says:

          Please put correct database name, localhost and user details in config.php.

          • Scott says:

            I am receiving the same error,

            Fatal: Cannot connect to MySql Server on my hostname, Please make sure you have specified a valid mysql database name in ‘/include/config.php’

            I understand I need to vi to config.php and apply the correct parameters; however can someone tell me where to find this file.

            I assume it was under /var/www/html/cacti but the path mention is not a valid path

          • Ravi Saive says:

            use the /etc/cacti/db.php file and add the correct mysql parameters.

  15. safa says:

    I configure httpd and mysql and cron but when i type in browser ,i just view a empty page

  16. Johnny says:

    Hey i’ve tried this 3 times, and each time Cacti works but no graphs show, like no image at all, not even a broken image link just no graph image, Any ideas?

    • Johnny says:

      Poller shows this when i run it:SYSTEM STATS: Time:0.5038 Method:cmd.php Processes:1 Threads:N/A Hosts:3 HostsPerProcess:3 DataSources:1 RRDsProcessed:0

      Is there some permissions or something that needs to be set for this to work?

  17. Asking questions are in fact nice thing if you are
    not understanding anything fully, but this piece of writing presents nice understanding even.

  18. duonghelio says:

    help me !
    I don’n log on to Cacti

  19. duonghelio says:

    Thank so much

  20. Thomas says:

    am getting an error on the web browser:

    You don’t have permission to access /cacti/ on this server.
    Apache/2.2.3 (CentOS) Server at Port 80

    My cacti.conf looks like this:

    Alias /cacti /var/www/html/cacti/

    Order Deny,Allow
    Deny from all
    Allow from

  21. Thomas says:

    Hi Ravi,
    Sorry about the first post, i have made corrections:

    My cacti.conf looks like this:
    Alias /cacti /var/www/html/cacti/
    Order Deny,Allow
    Deny from all
    Allow from

    but still:

    You don’t have permission to access /cacti/ on this server.
    Apache/2.2.3 (CentOS) Server at Port 80

    both mysqld and httpd services are running.

    • Ravi Saive says:

      After making corrections, have you restarted Apache? If yes, then you must define proper IP address in Allow section. Have you tried from the localhost?

      • Thomas says:

        Yes i did the needful, both localhost and my IP are tripping. if i type my IP or localhost in the browser the apache test web page opens nicely.

      • Thasleem says:

        me too having same problem. tried using the ip and localhost both with no luck.restarted the HTTPD service too

  22. Andy says:


    All installed as per these excellent instructions however I do not get any graph images showing – just a broken link where the image should be showing.

    It looks like a possible permissions issue but can not see where it could be. The yum install cacti placed the website directory structure /usr/share/cacti as with root permissions and everything else appears to work fine.

    Cent OS 6.3 clean and minimal install then installed as per your instructions.

    Any ideas?



  23. Daniel says:


    You don’t have permission to access /cacti on this server.

    Don’t Work

  24. Shinobi says:

    Why this tutorial not including configure snmp for cacti. I think cacti is 100% useful if it configure using snmp for trap any statistic interface both from the host and remote host :)

  25. Ariel Chiong says:

    Do You have any tutorial regarding on plugins, like the “monitor tab maybe”


  26. Gopi says:

    Thanks Ravi for your excellent instructions …
    I am still getting “FATAL: Cannot connect to MySQL server on ‘localhost’. Please make sure you have specified a valid MySQL database name in ‘include/config.php’ ”

    I am sure i have configured db.php properly as per the right credentials…
    $database_type = “mysql”;
    $database_default = “cacti”;
    $database_hostname = “localhost”;
    $database_username = “cacti”;
    $database_password = “titan#12″;
    $database_port = “3306”;
    $database_ssl = false;

    Ravi, Please help me in this case…

    • Ravi Saive says:

      Is MySQL service is started? and port is open on firewall? can you post the output of the following command.

      telnet localhost 3306
      • Gopi says:

        Thank you Ravi for the prompt response.

        Below is the output of the given command.
        o/p: -bash: telnet: command not found

        in my box , the db.php is residing in “/var/www/cacti”

        Thanks in advance…

        • Ravi Saive says:

          telnet package is not installed, install it tbis way.

          yum install telnet

          And then again post the output command.

          • Gopi says:

            Yeah! i will try and update the status…


          • Gopi says:

            Ravi, installed telnet and below is the output…
            [root@XXXXXXXXX~]# telnet localhost 3306
            Connected to localhost.
            Escape character is ‘^]’.
            5.0.95?.7i+:~/l,S=rLc/^m)!jrConnection closed by foreign host.
            [root@sbcloudlymem02 ~]#

          • Gopi says:

            Below is the output after install

            [root@machineName ~]# yum install telnet
            Loaded plugins: fastestmirror
            Loading mirror speeds from cached hostfile
            * addons: centos.mirror.nac.net
            * base: centos.mirror.nac.net
            * extras: centos.vipernetworksystems.com
            * rpmforge: mirror.hmc.edu
            * updates: mirror.wiredtree.com
            Setting up Install Process
            Resolving Dependencies
            –> Running transaction check
            —> Package telnet.i386 1:0.17-41.el5 set to be updated
            –> Finished Dependency Resolution

            Dependencies Resolved

            Package Arch Version Repository Size
            telnet i386 1:0.17-41.el5 base 57 k

            Transaction Summary
            Install 1 Package(s)
            Update 0 Package(s)
            Remove 0 Package(s)

            Total download size: 57 k
            Is this ok [y/N]: y
            Downloading Packages:
            telnet-0.17-41.el5.i386.rpm | 57 kB 00:00
            Running rpm_check_debug
            Running Transaction Test
            Finished Transaction Test
            Transaction Test Succeeded
            Running Transaction
            Installing : telnet 1/1

            telnet.i386 1:0.17-41.el5

            [root@machineName ~]# telnet localhost 3306
            Connected to localhost.
            Escape character is ‘^]’.
            5.0.95?.7i+:~/l,S=rLc/^m)!jrConnection closed by foreign host.
            [root@machineName ~]#

          • Ravi Saive says:

            Everything seems to be fine, I don’t know why you getting such error. If you don’t mind can I have your server IP address to check from the browser. Or create a testdb.php file under your website root directory and add the following lines and replace MySQL settings as per your needs and browse the file and post the output.

            $conn = mysql_pconnect(server_name,user_name,user_password);
            echo "Connection establish<br>";
            echo "Connection Failed<br>".mysql_error();
            $db = mysql_select_db(dbname,$conn);
            echo "DB establish<br>";
            echo "DB Failed<br>".mysql_error();
  27. sheltjo6 says:

    Great instructions. Finally was able to install and run Cacti on a CentOS linux box.

    I ran into a problem when installing Cacti tables to MySQL.
    I had to change the permissions on the cacti.sql file inorder to install the tables.

    Other than that, this recipe works great.
    Thanks for sharing.

  28. Ariel Chiong says:


    Do you know where to configure about email notifications? for example the system is up or down, you’ll be notified something like that.

    thanks in advanced.

  29. jaswant says:


    I have follow all steps but i am getting error


    You don’t have permission to access /cacti on this server.

    please help me

    please reply in my email id

  30. Rich says:

    Hi Ravi,

    Great instructions/notes.

    I’ve gotten up to the point of running cacti in my browser – getting the ole 403 Forbidden message.

    I’m running Fedora 18 in a VM. My host OS is Windows 7; and I’m running VirtualBox (in case this makes a difference)

    Anyway, I’ve specified my guest/Fedora IP in …/cacti.conf; restarted httpd.service. I’ve changed it back to and restarted httpd.service… I’m also running Firewall and selected http and https as trusted for the current zone and added 3306 to “ports”.
    Still no luck. Iptables.service is not running.

    Any suggestions?

  31. Hossein says:

    [root@test ~]# yum install cacti
    Loaded plugins: fastestmirror, security
    Loading mirror speeds from cached hostfile
    * base: less.cogeco.net
    * extras: less.cogeco.net
    * updates: centos.bhs.mirrors.ovh.net
    Excluding Packages in global exclude list
    Setting up Install Process
    No package cacti available.
    Nothing to do
    [root@test ~]#

  32. Xu says:

    I follow every step. But no images shows on the screen, even no warning, I wonder why?

  33. Ariel Chiong says:

    Hi, is Cacti capable of monitoring storage? monitor your hard disk and it will send a email that if it is near full?

  34. ww says:

    I follow every step. But no images shows on the screen, even no warning, I wonder why?

  35. David says:

    Hi Ravi,

    Thanks for you post !!! i did all the stepes one by one and i got the next error

    Starting httpd: httpd: apr_sockaddr_info_get() failed for Cacti
    httpd: Could not reliably determine the server’s fully qualified domain name, using for ServerName

    Can you help with this error in addition I didn’t get the login screen.


    • Ravi Saive says:

      To fix this error, just open your /etc/hosts file and add correct machine hostname. To get machine hostname use command.

      # hostname

      So, add correct hostname along with your IP address to your /etc/hosts file. Like yourhostname

      Restart Apache again. that’s it all set go.

  36. David says:

    Hi Ravi,

    the error is gone but still not working i am get The website cannot display the page error 500

    Thanks for help


  37. Gujjarr says:

    Hi everyone,

    I’m struggling with the following error with my server…

    can any one get me out of this issue.

    PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 523800 bytes) in /usr/share/cacti/lib/adodb/adodb.inc.php on line 833

    thank you… in advance…
    Raghavendra Gujjar…

    • Ravi Saive says:

      To fix this error, you need to increase the memory in your php.ini and restart the web server.

      • Trev says:

        This error is displayed if you forget to load the initial database. I increased the memory up to 1G and still got the error. Once I loaded the /usr/share/doc/cacti/cacti.sql file into MySQL the error went away and the install page displayed.

  38. shaun says:

    Thanx very much. works well on centos 6.4 with epel. Thank you for the info

  39. bikash says:

    HI i am new to rhel and was configuring Cacti.. but when i try to install the packages.. i get the follwing error;

    [root@localhost ~]# yum install cacti
    Setting up Install Process
    No package cacti available.
    Nothing to do
    [root@localhost ~]# yum install rrdtool
    Setting up Install Process
    No package rrdtool available.
    Nothing to do

    Please help

  40. manoj gupta says:

    Hi Ravi,

    Thanks for providing great article. I am trying to configure cacti on my localsystem , which have centos 6.4. After follow complet instruction, when i browse this, it’s showing blank page. I have added ip in conf file and also restart httpd service. But did not get sucess.

    Can you please help me regarding this ?



    • bikash says:


      I was able to install the cacti…but i cant get any graph now.. but the graph was bale to extract when i manually poll the data …

      So please help me how to get graph for traffic and all in cacti..


  41. bikash says:

    I checked all the possible things related prob.. still couldn’t find any solution… I have configured all the steps and also able to browse cacti login page.. but no graph generated even for local host…

    I tried to see the tcpdump of my host… was seen tht there is SNMP processing… but still unable to find graph..

    Please help.

  42. bikash says:

    while doing tcpdum host MYIP(x.x.x.x).. i get only following message :

    tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
    listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
    15:39:13.660448 IP > GetRequest(28) system.sysDescr.0
    15:39:13.663583 IP > GetResponse(185) system.sysDescr.0=[|snmp]
    15:39:13.664026 IP > GetRequest(28) system.sysUpTime.0
    15:39:13.666679 IP > GetResponse(32) system.sysUpTime.0=813142904
    15:39:13.666881 IP > GetRequest(28) system.sysName.0
    15:39:13.669512 IP > GetResponse(35) system.sysName.0=”KAT122B”
    15:39:13.669662 IP > GetRequest(28) system.sysLocation.0
    15:39:13.672405 IP > GetResponse(81) system.sysLocation.0=[|snmp]
    15:39:13.672607 IP > GetRequest(28) system.sysContact.0
    15:39:13.675827 IP > GetResponse(43) system.sysContact.0=[|snmp]


    Only name , location , and other general information is being pulled..

    what can i do..??

  43. bikash says:

    Hi Ravi,

    SElinux disabled… found no any changes..

    What should be done now..

    Please help.

  44. ICT says:

    Getting 500:internal server Error any idea….

  45. ICT says:

    There is an error

  46. Dimitris says:

    You should edit this example of cron job
    #*/5 * * * * cacti /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1

    remove # sign in front
    some people like me can just copy this as is and then will have troubles with device status unknown in cacti


  47. David says:

    Dear Ravi,

    I have trouble with ICMP protocol, from the server can ping this device but from Cati, it show that can not ping ( ICMP ping Timed out ) when I choose ICMP at Ping method.

    Ping Method
    The type of ping packet to sent.
    NOTE: ICMP on Linux/UNIX requires root privileges.

    I dont know how to fix it, I set 777 permission at ( chmod 777 /usr/bin/php ) , ( chmod 777 /usr/share/cacti/ ) and stop IP tables.

    Many thanks,

  48. Hossein says:

    plz helpe me Forbidden

    You don’t have permission to access /cacti/ on this server.
    Apache/2.2.15 (CentOS) Server at Port 80

  49. MrBlack says:

    Hi, i want to add other host to monitor, please give me instruction !
    Thanks !

  50. MrBlack says:

    when i added other host, report on cacti “SNMP errors”

  51. Kalim says:

    My graph are not loading.

  52. satyanarayana says:

    I am able to generate the graphs for localhost but we i try to create device for remote machine, i am getting the SMTP error.

    Below are the cacti logs

    CMDPHP: Poller[0] WARNING: SNMP Get Timeout for Host:’x.x.x.x’, and OID:’.′

    Please revert back asap

  53. Kizmo says:

    Pls. help, i follow everything but i’m not able to successfully work it out. if I type the address/cacti/install its only returning a blank page. I know that apache is working.. Thank you.

  54. kk says:

    Hi Ravi,

    I followed each and every step and installed successfully but I am unable to see any graphs, please help me.


  55. satish says:

    i install cacti on fedora 14 . install successfully . add 3 advices but status not changing. status showing unknown.

  56. satish says:

    hiiii ravi sir ,

    i install cacti ..for my mpls network router …i have to create monthly device availability report from cacti … how to create availability report …can u help me for that…

  57. sylvia says:

    installed cacti successfully but have one prob, inbound line is overshadowed by outbound, any idea on how they can be shown concurrently?

  58. bent says:

    We got a support dep. that need to run the graf on a wall monitor without login… any ideas ?

  59. Biswajit says:

    Why runlevel 4 is used in /sbin/chkconfig –levels 345 httpd on ???

  60. shaiful says:

    hi Ravi

    I running on fedora 20, everything is fine, but i only can access the cacti using http://localhost/cacti. but when i use http://myIP/cacti, its forbidden with error ‘You don’t have permission to access /cacti on this server.’ i already add my IP in allow list as per below;

    # httpd 2.2
    Order Deny,Allow,
    Deny from all
    Allow from

    i need to allow my LAN user to access the cacti.

  61. Kartheek says:

    Hello Ravi,

    Thanks a lot for the steps on Cacti installation.

    I followed the same steps and successfully installed cacti, but i am unable to view the graphs. All my graphs shows me 0 load.

  62. Rajesh says:

    Hi All,

    When i try to install this got this error. i am using CentOS 4 version.

    yum install php-mysql php-pear php-common php-gd php-devel php php-mbstring php-cli php-mysql

    Error Downloading Packages:
    php-mbstring-5.3.3-22.el6.x86_64: failure: Packages/php-mbstring-5.3.3-22.el6.x86_64.rpm from centos: [Errno 256] No more mirrors to try.

    Could you please suggest on this.

    • Ravi Saive says:

      The error related to repo server or your network connection, try to run the following serious of command.

      # yum clean all 
      # yum clean metadata 
      # yum clean dbcache 
      # yum makecache 
      # yum update -y
  63. Mohammed Sayed says:

    Hi All,

    My cacti become a sometimes does not draw a traffic data on graphs.
    And when I do restart the Server then it’s runs well and draws traffic data for a period of about 12 hours has been suspended from the drawing again and so.

    Please advise

  64. Ehsan says:

    Hi, Tnx for tutorial,
    How we can access cacti with domain name instead of IP address, like this:
    domainname.com/cacti instead of IP-add/cacti?


  65. Rupesh says:

    Hi Ravi,

    excellent article, but after installation. I have no problem with the localhost graphs , but when i import hosttemplates liek apache. They are not showing data. connectivity is fine between cacti server and client. Even the selinux is disabled. The main problem is graphs showing no data, i suppose this is due to cacti unable to pull the data..any suggestions on this helps a lot. Thanks in advance

  66. Mohan says:

    Hi Ravi,

    I have installed cacti successfully, while creating new graph getting below error from rrd. Please help

    “rrd ERROR: opening ‘/usr/local/cacti/rra/test_pc_proc_33.rrd': No such file or directory “

  67. antz says:

    Hello Ravi, please share me a tutorial to setting snmpd in linux client for this cacti

  68. katal2hod says:

    Hi, first of all i want to thank you for putting up this helpful tutorial and I really want you to know that your website really helped me a lot.

    BTW, I just want to ask some questions about cacti. Whenever I tried to add a device to a custom Graph Tree it always throws an error “Validation Error”

    Please help me :)

    PS: If you can also put some tutorials how to add/configure device/monitor it and also the network basic and advance :) It will be an early birthday gift for me.

    Thank you so much!

  69. Peter says:

    Hi done installation logged in ok. But when I want to add device I get “SNMP error” on the GUI and I have this error in the Cacti log
    10/12/2014 12:19:51 PM – CMDPHP: Poller[0] WARNING: SNMP Get Timeout for Host:’′, and OID:’.′
    will appreciate your help.

  70. sandeep says:

    Dear Sir,

    Please tell me that it will show system by system usages or a complete internet usages by network. and I want to some server status like apache, mysql, etc.

    Sandeep Rawat

  71. katal2hod says:

    Hi, just want to ask if you know how to solve “Valiadation Error” whenever I tried to add device to a tree graph.

    Thanks! :)

  72. George says:

    Hi, sorry for my bad english.

    Just want to ask how can i deal with this error

    [root@cacti ~]# mysqladmin -u root password cacti
    mysqladmin: connect to server at ‘localhost’ failed
    error: ‘Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)’
    Check that mysqld is running and that the socket: ‘/var/lib/mysql/mysql.sock’ exists!
    [root@cacti ~]# mysqldadmin -u root password cacti
    bash: mysqldadmin: command not found

    I’m just newbie in linux platform and I saw your website tutorial very useful. Hope you anyone can help me with this one.

    Thanks in advance.

    • Ravi Saive says:

      The error indicates that your mysqld service is not yet strated, you need to start or restart it using below command.

      # service mysqld start
      # service mysqld restart

      After restarting, run the following command to connect to mysql shell.

      # mysqladmin -u root password cacti
  73. C says:

    Hi, thanks for the how-to on getting cacti installed. I currently have it on Fedora 20 with cacti 0.8.8b. Having set the file to “Allow from all”, I’m still not able to access it from another computer using the IP/cacti. It is still giving me the “You don’t have permission to access /cacti on this server.”

    I’m also having different time for my logs and graphs that is different from the system time. I have 11:30am on the system and the log would show 3:30am. Graph shows correct time on the axis but log time for “From date time to date time”.

    Lastly, I’m having all my data show as nan. The “Log File” under utilities is green and doesn’t appear to be any error. The devices I’m testing with is a cisco swtich and a Windows 7 computer both using snmp. The device recognizes the information but yet I’m still getting nan.

    Any idea on how to resolve this? Thank you!

    • Ravi Saive says:

      Are you able to access cacti interface from localhost? like http://localhost/cacti? If yes, then you must add your IP address from where you accessing it to the cacti.conf file and restart the apache service..

      About logs timing, you need to check logs and cacti configuration files and specify time if there needed…

      • C says:

        Thanks for the reply, I am able to access the interface through localhost/cacti. I’ve tried using both allow from all and allow from the specific ip address, both will still not allow me to access through another computer. I’ve even tried turning the firewall off for testing.

        My graphs are also still getting NaN instead of actual values.

  74. jim says:

    The current 8.8b release has a broken graphs.php. It appears to have been broken fixing a security issue. You’ll hit it when you try to add a graph to a tree. this is the one you want to replace it with http://svn.cacti.net/viewvc/cacti/branches/0.8.8/graphs.php?view=markup&pathrev=7458

    • C says:

      I somehow got my graphs to show, I’m not sure what made it show. I have updated the graphs.php as per the link afterwards but am not seeing any difference.

      However, I still cannot get the timezone correct, it is still using UTC even though php.ini is set to a different timezone. My General information in Cacti is showing UTC time while date section shows default timezone as UTC and local/master value of date.timezone Asia/Hong_Kong

      Data are not being recorded to the graph until the next day. The graph appears with NaN values until the next day. This is a test machine that is turned off daily. I’ve tried restarting and turning the machine off after adding a new device and graph and it always needs a night before values show. I’m not sure where to change the time or why it is taking so long for data to be valid on the graph.

  75. Ravi says:

    I have a query regarding cacti. Cacti is network monitoring tool. So I have installed it on centos-5-64bit server. Its working fine with localhost.

    Now I have added another server in it. But graphs are not getting generated for it.

    Is there any configuration required for the newly added server end? Like nagios, we have to setup client end.

Leave a Reply

This work is licensed under a (cc) BY-NC | TecMint uses cookies. By using our services, you comply to use of our cookies. More info: Privacy Policy.
© 2012-2014 All Rights Reserved.