How to Install Wireshark on CentOS 6.3

Wireshark is a free and open-source network packet analyzer that will help to capture network packets and tries to display that packet data as detailed as possible. This post will covers the quick step to install wireshark on linux CentOS 6.3.

[root@centos63 ~]# yum install wireshark -y
[root@centos63 ~]# yum install wireshark -y
Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
 * base: mirrors.hostemo.com
 * extras: mirrors.hostemo.com
 * updates: mirrors.hostemo.com
CentOS6.3-Repository                                                         | 4.0 kB     00:00 ...
base                                                                         | 3.7 kB     00:00
extras                                                                       | 3.0 kB     00:00
updates                                                                      | 3.5 kB     00:00
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package wireshark.i686 0:1.2.15-2.el6_2.1 will be installed
--> Processing Dependency: libsmi.so.2 for package: wireshark-1.2.15-2.el6_2.1.i686
--> Processing Dependency: libpcap.so.1 for package: wireshark-1.2.15-2.el6_2.1.i686
--> Processing Dependency: libgnutls.so.26(GNUTLS_1_4) for package: wireshark-1.2.15-2.el6_2.1.i686
--> Processing Dependency: libgnutls.so.26 for package: wireshark-1.2.15-2.el6_2.1.i686
--> Running transaction check
---> Package gnutls.i686 0:2.8.5-4.el6_2.2 will be installed
--> Processing Dependency: libtasn1.so.3(LIBTASN1_0_3) for package: gnutls-2.8.5-4.el6_2.2.i686
--> Processing Dependency: libtasn1.so.3 for package: gnutls-2.8.5-4.el6_2.2.i686
---> Package libpcap.i686 14:1.0.0-6.20091201git117cb5.el6 will be installed
---> Package libsmi.i686 0:0.4.8-4.el6 will be installed
--> Running transaction check
---> Package libtasn1.i686 0:2.3-3.el6_2.1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package         Arch       Version                                Repository                  Size
====================================================================================================
Installing:
 wireshark       i686       1.2.15-2.el6_2.1                       CentOS6.3-Repository       9.9 M
Installing for dependencies:
 gnutls          i686       2.8.5-4.el6_2.2                        CentOS6.3-Repository       336 k
 libpcap         i686       14:1.0.0-6.20091201git117cb5.el6       CentOS6.3-Repository       125 k
 libsmi          i686       0.4.8-4.el6                            CentOS6.3-Repository       2.4 M
 libtasn1        i686       2.3-3.el6_2.1                          CentOS6.3-Repository       239 k

Transaction Summary
====================================================================================================
Install       5 Package(s)

Total download size: 13 M
Installed size: 64 M
Downloading Packages:
Setting up and reading Presto delta metadata
Processing delta metadata
Package(s) data still to download: 13 M
----------------------------------------------------------------------------------------------------
Total                                                                12 MB/s |  13 MB     00:01
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : libtasn1-2.3-3.el6_2.1.i686                                                      1/5
  Installing : gnutls-2.8.5-4.el6_2.2.i686                                                      2/5
  Installing : libsmi-0.4.8-4.el6.i686                                                          3/5
  Installing : 14:libpcap-1.0.0-6.20091201git117cb5.el6.i686                                    4/5
  Installing : wireshark-1.2.15-2.el6_2.1.i686                                                  5/5
  Verifying  : 14:libpcap-1.0.0-6.20091201git117cb5.el6.i686                                    1/5
  Verifying  : libsmi-0.4.8-4.el6.i686                                                          2/5
  Verifying  : gnutls-2.8.5-4.el6_2.2.i686                                                      3/5
  Verifying  : libtasn1-2.3-3.el6_2.1.i686                                                      4/5
  Verifying  : wireshark-1.2.15-2.el6_2.1.i686                                                  5/5

Installed:
  wireshark.i686 0:1.2.15-2.el6_2.1

Dependency Installed:
  gnutls.i686 0:2.8.5-4.el6_2.2            libpcap.i686 14:1.0.0-6.20091201git117cb5.el6
  libsmi.i686 0:0.4.8-4.el6                libtasn1.i686 0:2.3-3.el6_2.1

Complete!

How to Install Cacti on CentOS 6.2 using EPEL Repository

Cacti is a complete network graphing solution that useful for network administrator to monitor their network bandwidth. It collect SNMP data as well as other data such as system load, network link status, hard disk space and etc.

From Cacti official site :

Cacti is a complete network graphing solution designed to harness the power of RRDTool’s data storage and graphing functionality. Cacti provides a fast poller, advanced graph templating, multiple data acquisition methods, and user management features out of the box. All of this is wrapped in an intuitive, easy to use interface that makes sense for LAN-sized installations up to complex networks with hundreds of devices.

In this post, i will show you on how to install Cacti on linux CentOS 6.2 server. This tutorial assumed that you already installed LAMP (Linux CentOS 6.2 x86, Apache httpd server, Mysql server and PHP) server.

How to Install and Configure EPEL Repository on CentOS 6.2

Cacti is very easy to use and have the following features if it properly configured:

  • Graphs
  • Data Sources
  • Data Gathering
  • Graph Display
  • User Management

1. Login to your CentOS 6.2 server as a root and install the following packages :

[root@centos62 ~]# yum install cacti httpd mysql-server mysql php-common php-mysql php-pear net-snmp php-gd php-devel php php-mbstring php-cli net-snmp-utils php-snmp php-pear-Net-SMTP -y

2. Make sure all these software/packages has been installed :

Package cacti-0.8.7i-2.el6.noarch already installed and latest version
Package httpd-2.2.15-15.el6.centos.1.i686 already installed and latest version
Package mysql-server-5.1.61-1.el6_2.1.i686 already installed and latest version
Package mysql-5.1.61-1.el6_2.1.i686 already installed and latest version
Package php-common-5.3.3-3.el6_2.6.i686 already installed and latest version
Package php-mysql-5.3.3-3.el6_2.6.i686 already installed and latest version
Package 1:php-pear-1.9.4-4.el6.noarch already installed and latest version
Package 1:net-snmp-5.5-37.el6_2.1.i686 already installed and latest version
Package php-gd-5.3.3-3.el6_2.6.i686 already installed and latest version
Package php-devel-5.3.3-3.el6_2.6.i686 already installed and latest version
Package php-5.3.3-3.el6_2.6.i686 already installed and latest version
Package php-mbstring-5.3.3-3.el6_2.6.i686 already installed and latest version
Package php-cli-5.3.3-3.el6_2.6.i686 already installed and latest version
Package 1:net-snmp-utils-5.5-37.el6_2.1.i686 already installed and latest version
Package php-snmp-5.3.3-3.el6_2.6.i686 already installed and latest version
Package php-pear-Net-SMTP-1.6.1-1.el6.noarch already installed and latest version

3. Starting the database :

[root@centos62 ~]# service mysqld start
Starting mysqld:                                           [  OK  ]

4. Login to mysql server and create the following database and user :

Database’s Name : cactidb
Database’s User : cactiuser
Database’s Password : cactipassword

[root@centos62 ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.61 Source distribution

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> CREATE DATABASE cactidb;
Query OK, 1 row affected (0.00 sec)

mysql> CREATE USER 'cactiuser'@'localhost' IDENTIFIED BY 'cactipassword';
Query OK, 0 rows affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON cactidb.* to cactiuser@localhost;
Query OK, 0 rows affected (0.00 sec)

mysql> SHOW GRANTS FOR 'cactiuser'@'localhost';
+------------------------------------------------------------------------------------------------------------------+
| Grants for cactiuser@localhost                                                                                   |
+------------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'cactiuser'@'localhost' IDENTIFIED BY PASSWORD '*6FF226B3BB20712FB42564D21683F5A0173DDD16' |
| GRANT ALL PRIVILEGES ON `cactidb`.* TO 'cactiuser'@'localhost'                                                   |
+------------------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)

mysql> exit
Bye

5. Find out cacti.sql path using the following command :

[root@centos62 ~]# rpm -ql cacti | grep cacti.sql
/usr/share/doc/cacti-0.8.7i/cacti.sql

6. Populate and import the cacti database :

[root@centos62 ~]# /usr/bin/mysql cactidb -u cactiuser -p < /usr/share/doc/cacti-0.8.7i/cacti.sql
Enter password:

7. Configure cacti :

[root@centos62 ~]# vi /etc/cacti/db.php

Update the following details meet your configuration :

/* make sure these values refect your actual database/host/user/password */
$database_type = "mysql";
$database_default = "cactidb";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "cactipassword";
$database_port = "3306";
$database_ssl = false;

Original configuration

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

Change the configuration to :

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

8. Start the apache httpd service if you haven't start :

[root@centos62 ~]# /etc/rc.d/init.d/httpd start
Starting httpd:                                            [  OK  ]

or just reload to update it:

[root@centos62 ~]# /etc/rc.d/init.d/httpd reload
Reloading httpd:

9. Make httpd and mysql service auto start at boot :

[root@centos62 ~]# chkconfig httpd on
[root@centos62 ~]# chkconfig mysqld on

10. Setting up the crontab :

Check where is poller.php :

[root@centos62 ~]# ls /usr/share/cacti/
about.php                graph_image.php             host_templates.php   rra
auth_changepassword.php  graph.php                   images               rra.php
auth_login.php           graph_settings.php          include              scripts
cdef.php                 graphs_items.php            index.php            script_server.php
cli                      graphs_new.php              install              settings.php
cmd.php                  graphs.php                  lib                  templates_export.php
color.php                graph_templates_inputs.php  log                  templates_import.php
data_input.php           graph_templates_items.php   logout.php           tree.php
data_queries.php         graph_templates.php         poller_commands.php  user_admin.php
data_sources.php         graph_view.php              poller_export.php    utilities.php
data_templates.php       graph_xport.php             poller.php
gprint_presets.php       host.php                    resource
[root@centos62 ~]# crontab -e
# Used to update Cacti
*/5 * * * * /usr/share/cacti/poller.php >> /var/log/cacti 2>&1

How to Setup and Configure Cacti on CentOS 6.2

How to use tcpdump Command With Examples on Linux CentOS 5/CentOS 6/RHEL 5/RHEL 6

Tcpdump is a tool to dump the traffic on a network. It’s a packet sniffer that able to capture traffic that passes through a machine. It operates on a packet level, meaning that it captures the actual packets that fly in and out of your computer. If your linux server haven’t installed with tcpdump package, you can refer to the previous post on the quick step to install tcpdump. This tcpdump¬†command with examples steps has been tested on Linux CentOS 5/CentOS 6/CentOS 7/RHEL 5/RHEL 6 / RHEL 7.

tcpdump Command With Examples

How to use Tcpdump Command with Examples on Linux

There are a few tcpdump command with examples that i will share with you. -w option will writes the packets into .pcap file. The extension should be always .pcap as it can be read by any network protocol analyzer.

1. To see any available network interface that can be monitor using option -D :

# tcpdump -D
1.eth0
2.usbmon1 (USB bus number 1)
3.usbmon2 (USB bus number 2)
4.any (Pseudo-device that captures on all interfaces)
5.lo

2. View the incoming packets on port 80 in real-time for apache web server, then save it to port80-apache1.pcap. By using this command, you can analyze where packets were coming from or being sent to :

# tcpdump -w port80-apache1.pcap -i eth0 tcp port 80

3. Execute tcpdump command without any additional option, it will capture all the packets flowing through all the interfaces. Just run -i option with tcpdump command as below :

# tcpdump -w filename.pcap -i eth0

4. Capture only N number of packets. This can be done using tcpdump -c command. This example will only capture 3 packet :

# tcpdump -c 3 -i eth0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
21:22:18.777243 IP centos62.ehowstuff.local.ssh > 192.168.1.52.pq-lic-mgmt: Flags [.], ack 4148066988, win 17688, options [nop,nop,TS val 790832 ecr 135264], length 0
21:22:18.783396 IP centos62.ehowstuff.local.ssh > 192.168.1.52.pq-lic-mgmt: Flags [P.], seq 0:196, ack 1, win 17688, options [nop,nop,TS val 790838 ecr 135264], length 196
21:22:18.785458 ARP, Request who-has 192.168.1.1 tell centos62.ehowstuff.local, length 28
3 packets captured
15 packets received by filter
0 packets dropped by kernel

5. Read the packets using tcpdump -r for the saved file as per example below :

Capture 3 packet and save it to test.pcap

# tcpdump -w test.pcap -c 3 -i eth0
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
3 packets captured
3 packets received by filter
0 packets dropped by kernel

Try to read test.pcap using tcpdump -r command :

# tcpdump -r test.pcap
reading from file test.pcap, link-type EN10MB (Ethernet)
21:24:51.199237 IP centos62.ehowstuff.local.ssh > 192.168.1.52.pq-lic-mgmt: Flags [P.], seq 693745553:693745685, ack 4148082568, win 17688, options [nop,nop,TS val 943254 ecr 136793], length 132
21:24:51.201339 IP 192.168.1.52.pq-lic-mgmt > centos62.ehowstuff.local.ssh: Flags [P.], seq 1:53, ack 132, win 17232, options [nop,nop,TS val 136793 ecr 943254], length 52
21:24:51.241386 IP centos62.ehowstuff.local.ssh > 192.168.1.52.pq-lic-mgmt: Flags [.], ack 53, win 17688, options [nop,nop,TS val 943296 ecr 136793], length 0

6. tcpdump allows you to define port range as bellow for capturing packets based on a range of tcp port. Examples below will capture the packet from port 21 until 80.

# tcpdump tcp portrange 21-80

I hope this article gives you some ideas and essential guidance on how to use tcpdump Command with Examples on Linux CentOS 5/CentOS 6/CentOS 7/RHEL 5/RHEL 6 / RHEL 7

 

How to Install tcpdump on CentOS 5/CentOS 6/RHEL 5/RHEL 6

Tcpdump is a packet sniffer that able to capture traffic that passes through a machine. It operates on a packet level, meaning that it captures the actual packets that fly in and out of your computer. It can save the packets into a file. In this post, i will show how to install tcpdump on CentOS 5/CentOS 6/ CentOS 7/RHEL 5/RHEL 6/ RHEL 7 server. You can proceed to read the example usage of tcpdump in this article.

Install tcpdump on CentOS

How to Install tcpdump on CentOS / RHEL

1. Run any tcpdump command to check whether tcpdump installed or not :

[root@centos62 ~]# tcpdump -D
-bash: tcpdump: command not found

2. To install tcpdump, simply run the following command :

[root@centos62 ~]# yum install tcpdump -y

3. Show available interface that can be monitor :

# tcpdump -D
1.eth0
2.usbmon1 (USB bus number 1)
3.usbmon2 (USB bus number 2)
4.any (Pseudo-device that captures on all interfaces)
5.lo

4. Check tcpdump version in CentOS 6.7

# tcpdump --version
tcpdump version 4.1-PRE-CVS_2015_07_23
libpcap version 1.4.0
Usage: tcpdump [-aAdDefhIJKlLnNOpqRStuUvxX] [ -B size ] [ -c count ]
                [ -C file_size ] [ -E algo:secret ] [ -F file ] [ -G seconds ]
                [ -i interface ] [ -j tstamptype ] [ -M secret ]
                [ -P in|out|inout ]
                [ -r file ] [ -s snaplen ] [ -T type ] [ -w file ]
                [ -W filecount ] [ -y datalinktype ] [ -z command ]
                [ -Z user ] [ expression ]

5. Check tcpdump version in CentOS 7.1

# tcpdump --version
tcpdump: invalid option -- '-'
tcpdump version 4.5.1
libpcap version 1.5.3
Usage: tcpdump [-aAbdDefhHIJKlLnNOpqRStuUvxX] [ -B size ] [ -c count ]
                [ -C file_size ] [ -E algo:secret ] [ -F file ] [ -G seconds ]
                [ -i interface ] [ -j tstamptype ] [ -M secret ]
                [ -P in|out|inout ]
                [ -r file ] [ -s snaplen ] [ -T type ] [ -V file ] [ -w file ]
                [ -W filecount ] [ -y datalinktype ] [ -z command ]
                [ -Z user ] [ expression ]

I hope this article gives you some ideas and essential guidance on how to install tcpdump on CentOS 5/CentOS 6/ CentOS 7/RHEL 5/RHEL 6/ RHEL 7.

 

How to Setup and Configure Cacti on CentOS 6.2

Cacti is a complete network graphing solution that useful for network administrator to monitor their network bandwidth. It collect SNMP data as well as other data such as system load, network link status, hard disk space and etc.

From Cacti official site :

Cacti is a complete network graphing solution designed to harness the power of RRDTool’s data storage and graphing functionality. Cacti provides a fast poller, advanced graph templating, multiple data acquisition methods, and user management features out of the box. All of this is wrapped in an intuitive, easy to use interface that makes sense for LAN-sized installations up to complex networks with hundreds of devices.

In this post, i will show you on how to setup and configure Cacti on linux CentOS 6.2 server. This tutorial assumed that you already installed LAMP (Linux CentOS 6.2 x86, Apache httpd server, Mysql server and PHP) server and install cacti as per documented on this post(How to Install Cacti on CentOS 6.2 using EPEL Repository).

Other prerequisites :

How to Install and Configure EPEL Repository on CentOS 6.2

1. Navigate to the following URL. Assumed that the server ip is 192.168.1.44 :
http://192.168.1.44/cacti/install/

2. Click Next to proceed :
cacti

3. Select the type of installation. In this case, we should select “New Install” :
CentOS 6.2

4. Just make sure all these value are correct. Most of the time, the default values always correct, unless not properly installed :
CentOS 6.2

5. Congratulation! You have successfully setup your cacti server. Login to your new Cacti installation from http://192.168.1.44/cacti/ with default user (admin) and the default password (admin) :
CentOS 6.2

6. For security reason, cacti will forced you to reset original admin password :
CentOS 6.2

7. Start to configure your device :
CentOS 6.2

How to Install Wireshark on CentOS 6.2

In this post, i will show on how to install Wireshark on CentOS 6.2 server. Wireshark is a free and open-source network packet analyzer that will help to capture network packets and tries to display that packet data as detailed as possible. This post assumed that you have set up local yum repository using your DVDROM. If you haven’t set up the local yum repository, please proceed to this steps :
How to Setup Local Yum Repository from CD-ROM/DVD-ROM image on RHEL 6

Simply run this command to install Wireshark :

[root@centos62 ~]# yum install wireshark
[root@centos62 ~]# yum install wireshark
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.maulvi.net
 * extras: centos.maulvi.net
 * updates: centos.maulvi.net
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package wireshark.i686 0:1.2.15-2.el6 will be installed
--> Processing Dependency: libpcap.so.1 for package: wireshark-1.2.15-2.el6.i686
--> Processing Dependency: libsmi.so.2 for package: wireshark-1.2.15-2.el6.i686
--> Processing Dependency: libgnutls.so.26 for package: wireshark-1.2.15-2.el6.i686
--> Processing Dependency: libgnutls.so.26(GNUTLS_1_4) for package: wireshark-1.2.15-2.el6.i686
--> Running transaction check
---> Package gnutls.i686 0:2.8.5-4.el6 will be installed
--> Processing Dependency: libtasn1.so.3(LIBTASN1_0_3) for package: gnutls-2.8.5-4.el6.i686
--> Processing Dependency: libtasn1.so.3 for package: gnutls-2.8.5-4.el6.i686
---> Package libpcap.i686 14:1.0.0-6.20091201git117cb5.el6 will be installed
---> Package libsmi.i686 0:0.4.8-4.el6 will be installed
--> Running transaction check
---> Package libtasn1.i686 0:2.3-3.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package         Arch       Version                                Repository                  Size
====================================================================================================
Installing:
 wireshark       i686       1.2.15-2.el6                           CentOS6.2-Repository       9.9 M
Installing for dependencies:
 gnutls          i686       2.8.5-4.el6                            CentOS6.2-Repository       336 k
 libpcap         i686       14:1.0.0-6.20091201git117cb5.el6       CentOS6.2-Repository       125 k
 libsmi          i686       0.4.8-4.el6                            CentOS6.2-Repository       2.4 M
 libtasn1        i686       2.3-3.el6                              CentOS6.2-Repository       239 k

Transaction Summary
====================================================================================================
Install       5 Package(s)

Total download size: 13 M
Installed size: 64 M
Is this ok [y/N]: y
Downloading Packages:
----------------------------------------------------------------------------------------------------
Total                                                                30 MB/s |  13 MB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : libtasn1-2.3-3.el6.i686                                                          1/5
  Installing : gnutls-2.8.5-4.el6.i686                                                          2/5
  Installing : libsmi-0.4.8-4.el6.i686                                                          3/5
  Installing : 14:libpcap-1.0.0-6.20091201git117cb5.el6.i686                                    4/5
  Installing : wireshark-1.2.15-2.el6.i686                                                      5/5

Installed:
  wireshark.i686 0:1.2.15-2.el6

Dependency Installed:
  gnutls.i686 0:2.8.5-4.el6 libpcap.i686 14:1.0.0-6.20091201git117cb5.el6 libsmi.i686 0:0.4.8-4.el6
  libtasn1.i686 0:2.3-3.el6

Complete!

How to Install Cacti on CentOS 5.5

Cacti is a complete network graphing solution that usefull for network administrator to monitor their network bandwidth. It is very easy to use and have the following features:

  • Graphs
  • Data Sources
  • Data Gathering
  • Graph Display
  • User Management

In this tutorial, i will guide you on how to install Cacti on CentOS 5.5 server. This tutorial assume that you already installed LAMP (Linux CentOS, Apache, Mysql and PHP) server.

How to Prepare Other Yum Repositories For RHEL/CentOS 5

1. Download and install the rpmforge repository.

For x86 (32-bit) systems

    [root@server ~]# rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.5.2-2.el5.rf.i386.rpm
    

For x64 (64-bit) systems

    [root@server ~]# rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
    

2. Install Cacti and dependencies with below command:

    [root@server ~]# yum -y --enablerepo=rpmforge install cacti mysql-server mysql php-common php-mysql net-snmp net-snmp-utils php-snmp liberation-fonts
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    * addons: centos.maulvi.net
    * base: centos.maulvi.net
    * epel: ftp.cuhk.edu.hk
    * extras: centos.maulvi.net
    * rpmforge: fr2.rpmfind.net
    * updates: mirror.yourconnect.com
    Setting up Install Process
    Package matching php-mysql-5.1.6-27.el5_5.3.i386 already installed. Checking for update.
    Package liberation-fonts-1.0-1.el5.noarch already installed and latest version
    Resolving Dependencies
    --> Running transaction check
    ---> Package cacti.noarch 0:0.8.7g-2.el5.rf set to be updated
    --> Processing Dependency: rrdtool for package: cacti
    ---> Package mysql.i386 0:5.0.77-4.el5_5.5 set to be updated
    ---> Package mysql-server.i386 0:5.0.77-4.el5_5.5 set to be updated
    ---> Package net-snmp.i386 1:5.3.2.2-9.el5_5.1 set to be updated
    --> Processing Dependency: net-snmp-libs = 1:5.3.2.2-9.el5_5.1 for package: net-snmp
    ---> Package net-snmp-utils.i386 1:5.3.2.2-9.el5_5.1 set to be updated
    ---> Package php-common.i386 0:5.1.6-27.el5_5.3 set to be updated
    ---> Package php-snmp.i386 0:5.1.6-27.el5_5.3 set to be updated
    --> Running transaction check
    ---> Package net-snmp-libs.i386 1:5.3.2.2-9.el5_5.1 set to be updated
    ---> Package rrdtool.i386 0:1.4.4-1.el5.rf set to be updated
    --> Processing Dependency: ruby for package: rrdtool
    --> Processing Dependency: lua for package: rrdtool
    --> Processing Dependency: xorg-x11-fonts-Type1 for package: rrdtool
    --> Processing Dependency: perl(RRDs) for package: rrdtool
    --> Processing Dependency: perl(RRDp) for package: rrdtool
    --> Processing Dependency: libdbi.so.0 for package: rrdtool
    --> Running transaction check
    ---> Package libdbi.i386 0:0.8.1-2.1 set to be updated
    ---> Package lua.i386 0:5.1.4-4.el5 set to be updated
    ---> Package perl-rrdtool.i386 0:1.4.4-1.el5.rf set to be updated
    ---> Package ruby.i386 0:1.8.5-5.el5_4.8 set to be updated
    --> Processing Dependency: ruby-libs = 1.8.5-5.el5_4.8 for package: ruby
    --> Processing Dependency: libruby.so.1.8 for package: ruby
    ---> Package xorg-x11-fonts-Type1.noarch 0:7.1-2.1.el5 set to be updated
    --> Processing Dependency: chkfontpath for package: xorg-x11-fonts-Type1
    --> Running transaction check
    ---> Package chkfontpath.i386 0:1.10.1-1.1 set to be updated
    --> Processing Dependency: xfs for package: chkfontpath
    ---> Package ruby-libs.i386 0:1.8.5-5.el5_4.8 set to be updated
    --> Running transaction check
    ---> Package xorg-x11-xfs.i386 1:1.0.2-5.el5_6.1 set to be updated
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    =====================================================================================
    Package                   Arch        Version                   Repository     Size
    =====================================================================================
    Installing:
    cacti                     noarch      0.8.7g-2.el5.rf           rpmforge      2.2 M
    net-snmp                  i386        1:5.3.2.2-9.el5_5.1       base          697 k
    net-snmp-utils            i386        1:5.3.2.2-9.el5_5.1       base          186 k
    php-common                i386        5.1.6-27.el5_5.3          base          153 k
    php-snmp                  i386        5.1.6-27.el5_5.3          base           30 k
    Updating:
    mysql                     i386        5.0.77-4.el5_5.5          updates       4.8 M
    mysql-server              i386        5.0.77-4.el5_5.5          updates       9.8 M
    Installing for dependencies:
    chkfontpath               i386        1.10.1-1.1                base           15 k
    libdbi                    i386        0.8.1-2.1                 base           35 k
    lua                       i386        5.1.4-4.el5               epel          228 k
    perl-rrdtool              i386        1.4.4-1.el5.rf            rpmforge       52 k
    rrdtool                   i386        1.4.4-1.el5.rf            rpmforge      895 k
    ruby                      i386        1.8.5-5.el5_4.8           base          274 k
    ruby-libs                 i386        1.8.5-5.el5_4.8           base          1.6 M
    xorg-x11-fonts-Type1      noarch      7.1-2.1.el5               base          1.5 M
    xorg-x11-xfs              i386        1:1.0.2-5.el5_6.1         updates        69 k
    Updating for dependencies:
    net-snmp-libs             i386        1:5.3.2.2-9.el5_5.1       base          1.3 M
    
    Transaction Summary
    =====================================================================================
    Install      14 Package(s)
    Upgrade       3 Package(s)
    
    Total download size: 24 M
    Downloading Packages:
    (1/17): chkfontpath-1.10.1-1.1.i386.rpm                       |  15 kB     00:00
    (2/17): php-snmp-5.1.6-27.el5_5.3.i386.rpm                    |  30 kB     00:01
    (3/17): libdbi-0.8.1-2.1.i386.rpm                             |  35 kB     00:01
    (4/17): perl-rrdtool-1.4.4-1.el5.rf.i386.rpm                  |  52 kB     00:02
    (5/17): xorg-x11-xfs-1.0.2-5.el5_6.1.i386.rpm                 |  69 kB     00:02
    (6/17): php-common-5.1.6-27.el5_5.3.i386.rpm                  | 153 kB     00:12
    (7/17): net-snmp-utils-5.3.2.2-9.el5_5.1.i386.rpm             | 186 kB     00:12
    (8/17): lua-5.1.4-4.el5.i386.rpm                              | 228 kB     00:20
    (9/17): ruby-1.8.5-5.el5_4.8.i386.rpm                         | 274 kB     00:10
    (10/17): net-snmp-5.3.2.2-9.el5_5.1.i386.rpm                  | 697 kB     00:25
    (11/17): rrdtool-1.4.4-1.el5.rf.i386.rpm                      | 895 kB     01:03
    (12/17): net-snmp-libs-5.3.2.2-9.el5_5.1.i386.rpm             | 1.3 MB     01:11
    (13/17): xorg-x11-fonts-Type1-7.1-2.1.el5.noarch.rpm          | 1.5 MB     01:38
    (14/17): ruby-libs-1.8.5-5.el5_4.8.i386.rpm                   | 1.6 MB     01:43
    (15/17): cacti-0.8.7g-2.el5.rf.noarch.rpm                     | 2.2 MB     02:23
    (16/17): mysql-5.0.77-4.el5_5.5.i386.rpm                      | 4.8 MB     03:32
    (17/17): mysql-server-5.0.77-4.el5_5.5.i386.rpm               | 9.8 MB     07:06
    -------------------------------------------------------------------------------------
    Total                                                 19 kB/s |  24 MB     21:11
    Running rpm_check_debug
    Running Transaction Test
    Finished Transaction Test
    Transaction Test Succeeded
    Running Transaction
    Updating       : net-snmp-libs                                                1/20
    Updating       : mysql                                                        2/20
    Installing     : net-snmp                                                     3/20
    Installing     : net-snmp-utils                                               4/20
    Installing     : libdbi                                                       5/20
    Installing     : php-common                                                   6/20
    Installing     : php-snmp                                                     7/20
    Installing     : ruby-libs                                                    8/20
    Installing     : ruby                                                         9/20
    Installing     : lua                                                         10/20
    Updating       : mysql-server                                                11/20
    Installing     : chkfontpath                                                 12/20
    Installing     : xorg-x11-xfs                                                13/20
    Installing     : xorg-x11-fonts-Type1                                        14/20
    Installing     : rrdtool                                                     15/20
    Installing     : cacti                                                       16/20
    Installing     : perl-rrdtool                                                17/20
    Cleanup        : mysql-server                                                18/20
    Cleanup        : mysql                                                       19/20
    Cleanup        : net-snmp-libs                                               20/20
    
    Installed:
    cacti.noarch 0:0.8.7g-2.el5.rf              net-snmp.i386 1:5.3.2.2-9.el5_5.1
    net-snmp-utils.i386 1:5.3.2.2-9.el5_5.1     php-common.i386 0:5.1.6-27.el5_5.3
    php-snmp.i386 0:5.1.6-27.el5_5.3
    
    Dependency Installed:
    chkfontpath.i386 0:1.10.1-1.1          libdbi.i386 0:0.8.1-2.1
    lua.i386 0:5.1.4-4.el5                 perl-rrdtool.i386 0:1.4.4-1.el5.rf
    rrdtool.i386 0:1.4.4-1.el5.rf          ruby.i386 0:1.8.5-5.el5_4.8
    ruby-libs.i386 0:1.8.5-5.el5_4.8       xorg-x11-fonts-Type1.noarch 0:7.1-2.1.el5
    xorg-x11-xfs.i386 1:1.0.2-5.el5_6.1
    
    Updated:
    mysql.i386 0:5.0.77-4.el5_5.5         mysql-server.i386 0:5.0.77-4.el5_5.5
    
    Dependency Updated:
    net-snmp-libs.i386 1:5.3.2.2-9.el5_5.1
    
    Complete!
    

3. Create the database, user for cacti:

    mysql> CREATE DATABASE cactidb;
    Query OK, 1 row affected (0.00 sec)
    
    mysql> CREATE USER 'cactiuser'@'localhost' IDENTIFIED BY 'cactipassword';
    Query OK, 0 rows affected (0.00 sec)
    
    mysql> GRANT ALL PRIVILEGES ON cactidb.* to cactiuser@localhost;
    Query OK, 0 rows affected (0.00 sec)
    
    mysql> SHOW GRANTS FOR 'cactiuser'@'localhost';
    +-----------------------------------------------------------------------------------------+
    | Grants for cactiuser@localhost                                                          |
    +-----------------------------------------------------------------------------------------+
    | GRANT USAGE ON *.* TO 'cactiuser'@'localhost' IDENTIFIED BY PASSWORD '368d8a955a5a0bad' |
    | GRANT ALL PRIVILEGES ON `cactidb`.* TO 'cactiuser'@'localhost'                          |
    +-----------------------------------------------------------------------------------------+
    2 rows in set (0.00 sec)
    

4. Populate the cacti database (Note: You will use the password you created for cactiuser here)

    [root@server ~]# /usr/bin/mysql cactidb -u cactiuser -p < /var/www/cacti/cacti.sql
    Enter password:
    
    [root@server ~]# vi /var/www/cacti/include/config.php
    

5. Please make sure these values reflect your actual database/host/user/password:

    $database_type = "mysql";
    $database_default = "cactidb";
    $database_hostname = "localhost";
    $database_username = "cactiuser";
    $database_password = "cactipassword"; $database_port = "3306";
    

6. Setting up the crontab:

     [root@server ~]# crontab -e
    
    # Used to update Cacti
    */5 * * * * /usr/bin/php /var/www/cacti/poller.php >> /var/log/cacti 2>&1
    

7. Configure cacti.conf as below:

    [root@server ~]# vi /etc/httpd/conf.d/cacti.conf
    
    Alias /cacti/ /var/www/cacti/
    <Directory /var/www/cacti/>
    DirectoryIndex index.php
    Options -Indexes
    AllowOverride all
    order deny,allow
    allow from all
    AddType application/x-httpd-php .php
    php_flag magic_quotes_gpc on
    php_flag track_vars on
    </Directory>
    

8. Restart Apache to take effect on the changes:

    [root@server ~]# /etc/init.d/httpd restart
    Stopping httpd:                                            [  OK  ]
    Starting httpd:                                            [  OK  ]
    [root@server ~]#
    

9. Navigate your browser to http://servername/cacti

10. Login to your new Cacti installation from http://servername/cacti/ with default user (admin) and the default password (admin).