0% found this document useful (0 votes)
318 views13 pages

Cacti Installation Manual

This document provides instructions for installing and configuring the Cacti monitoring server on a CentOS 5.x system. It outlines installing required software like Apache, MySQL, SNMP and RRDTool. It describes configuring Cacti by extracting the files, creating the MySQL database, editing configuration files. The document also explains adding devices to monitor, creating graphs, and configuring the Weathermap plugin to visualize network status on maps.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
318 views13 pages

Cacti Installation Manual

This document provides instructions for installing and configuring the Cacti monitoring server on a CentOS 5.x system. It outlines installing required software like Apache, MySQL, SNMP and RRDTool. It describes configuring Cacti by extracting the files, creating the MySQL database, editing configuration files. The document also explains adding devices to monitor, creating graphs, and configuring the Weathermap plugin to visualize network status on maps.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Cacti Monitoring Server

Cacti Installation Manual Guide

Linux OS

a. Centos 5.x Final

I. Software Requirement for Cacti

b. Cacti
c. Apache
d. Mysqld
e. Snmp
f. RRDTool

II. Install and Configure plugins Weathermap

1|Page
Cacti Monitoring Server
I. Software Requirement for Cacti

1. Update yum Package

# yum update

2. Install Software Package such Apache, mysql, snmp, rrdtool.

+ Install apche, mysql, snmp

#yum install -y mysql mysql-server httpd mod_ssl php php-snmp php-mysql net-snmp net-snmp-utils

+ Install rrdtool

Create a file dag.repo under /etc/yum.repos.d by adding the following lines:

#vim /etc/yum.repos.d/dag.repo

[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
gpgkey=http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
enabled=1

# yum install perl-rrdtool rrdtool

3. Download and extract Cacti. Then, rename folder name and move to/var/www/html/cacti

# tar xzvf cacti-0.8.7i.tar.gz


# mv cacti-0.8.7i cacti
# mv cacti /var/www/html/

4. Create database and put any password for Cacti Webserver, in here I just password “123456”
as example only.

#service mysqld restart


# mysqladmin -u root -p password 123456
# mysqladmin -u root -p123456 create cacti
# mysql -u root -p123456

mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY '123456';


Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;


Query OK, 0 rows affected (0.00 sec)
mysql> exit
# mysql -u root –p123456 cacti < /var/www/html/cacti/cacti.sql

2|Page
Cacti Monitoring Server
5. Edit include/config.php and specify the MySQL user, password and database for your Cacti
configuration.

# vim /var/www/html/cacti/include/config.php

$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cacti";
$database_password = "123456";
$database_port = "3306";
$database_ssl = false;

6. Set the appropriate permissions on cacti's directories to user “apache”.

# chown -R apache:apache /var/www/html/cacti/

7. Add a line to your /etc/crontab file similar to:

# vim /etc/cron.d/cacti

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

Then save & close.

8. Restart the following service httpd, snmpd, mysqld and crond

# /etc/init.d/httpd restart
# /etc/init.d/mysqld restart
# /etc/init.d/snmpd restart
# /etc/init.d/crond restart

9. Opent web browser and point your web browser to, then follow the screen:

http://yourcactiserver/cacti

- Click next to “continue” installation

3|Page
Cacti Monitoring Server
- Select new” installation” then click “next”

- Finally, click “Finish” to complete installation

4|Page
Cacti Monitoring Server
- Username & password to login is “admin”, then the server will ask to change the password

- After changing password successfully, it will direct us to Cacti Server Console

- This step shows how to add new device to Cacti Server. Go to “Devices” then click “Add”

5|Page
Cacti Monitoring Server
- Fill some info look like sample screen below, then click “Create”

- To verify the SNMP protocol get the right info from device, via checking the sample highlight
screen below

6|Page
Cacti Monitoring Server
- To make monitor the data statistic of the device, we need to add “SNMP – Interface Statistic”
then create graph and select the interface which we want to monitor

7|Page
Cacti Monitoring Server
- Select “Create Graph for the host” then selects the interface of the device to monitor the interface
statistic.

8|Page
Cacti Monitoring Server
- Now the way of creating graph completed, we need to place the device to graph tree.

9|Page
Cacti Monitoring Server
II. Weathermap Tools in Cacti System

[root@localhost monitor] # cd /var/www/html/cacti/plugins


[root@localhost plugins] # wget http://www.Network-weathermap.com/files/php-weathermap-0.97a.zip
[root@localhost plugins] # unzip php-weathermap-0.97a.zip
[root@localhost plugins] # rm –f php-weathermap-0.97a.zip
[root@localhost plugins] # cd weathermap

[root@localhost weathermap] # chown -R cacti.cacti ./weathermap


[root@localhost weathermap] # chmod –R 777 ./configs
[root@localhost weathermap] # chown apache configs
[root@localhost weathermap] # cp editor-config.php-dist editor-config
[root@localhost weathermap] # vi editor-config

//$cacti_base = 'C:/httpd-.2_x64/htdocs/cacti';
$cacti_base = “/var/www/html/cacti”;

//$cacti_url = http://Support.company.net/cacti/;
$cacti_url = http://Server-IP/cacti;

// $mapdir= $cacti_base.'/plugins/weathermap/configs';
$mapdir= “/var/www/html/cacti/plugins/wethermap/configs”;

[root@localhost weathermap] # vi editor.php


~
// $ENABLED=false;
$ENABLED=true;

~
// sensible defaults
$mapdir= “/var/www/html/cacti/plugins/wethermap/configs”;
$cacti_base = “/var/www/html/cacti/”;
$cacti_url = "http://Server-IP/cacti/";

[root@localhost weathermap] # vi weathermap

// THIS IS THE ONE LINE IN HERE YOU MIGHT HAVE TO CHANGE!


$rrdtool="/usr/bin/rrdtool";

10 | P a g e
Cacti Monitoring Server
[root@localhost weathermap] # vi /etc/crontab
~
# Cacti
*/5 * * * * cacti php /var/www/html/cacti/poller.php > /dev/null 2>&1

# Cacti - Weathermap
*/5 * * * * cacti php /var/www/html/cacti/plugins/weathermap/weathermap-cacti-rebuild.php

[root@localhost weathermap] # vi /var/www/html/cacti/include/global.php

/* Default session name - Session name must contain alpha characters */


$cacti_session_name = "Cacti";

$plugins = array();
$plugins[] = 'Update';
$plugins[] = 'loginmod';
$plugins[] = 'hostinfo';
$plugins[] = 'docs';
$plugins[] = 'tools';
$plugins[] = 'settings';
$plugins[] = 'watermark';
$plugins[] = 'realtime';
$plugins[] = 'monitor';
$plugins[] = 'weathermap';

[root@localhost weathermap] # php weathermap

[root@localhost weathermap] # chown -R cacti.cacti /var/www/html/cacti/plugins/weathermap

11 | P a g e
Cacti Monitoring Server

12 | P a g e
Cacti Monitoring Server

13 | P a g e

You might also like