Cacti Installation in Windows

Cacti Installation in Windows

 

Cacti is a complete network graphing solution which is frontend tool to RRDTool.
Cacti frontend is completely PHP driven.
It maintains the graphs as well as handles the data gathering.

Install and configure Cacti :

  1. Install cacti from the zip distribution and install in the web root or your choice. May choose to install into a “Cacti” sub folder.
  2. RRDTool – Install from the Cacti website. Install it into the c:\cacti directory.
  3. PHP 5.x – Install into the c:\php folder. If you choose to install into c:\Program Files\php, you will have to use 8.3 filenames to reference it’s binaries in Cacti.
  4. Install the MySQL.

 

  • Configure PHP

 

– Add the following directory to the existing Windows System PATH environment variable: c:\php. The Windows path can be accessed via the Control Panel at: System | Advanced | Environment Variables | System Variables.
– Add the following directory to a new Windows System environment variable called PHPRC: c:\php.
– Add a new Windows System environment variable called MIBDIRS set it to c:\php\extras\mibs
– Rename the file c:\php\php.ini.dist to php.ini, and make the following changes to it:

Uncomment the following lines.

extension_dir = c:\php\ext
extension=php_mysql.dll
extension=php_snmp.dll
extension=php_sockets.dll
cgi.force_redirect = 0

 

  • Configure the Webserver (Apache)

– Make sure you have stopped any IIS web servers before you proceed with Apache installation, or make sure Apache is configured on an alternate port.
– If using Apache 2.x and PHP 5, then add the following lines.

LoadModule php5_module c:\php\php5apache2.dll
AddType application/x-httpd-php .php
DirectoryIndex index.html index.htm index.php

 

  • Follow the Next Steps :
  1. Create the MySQL database:

shell> mysqladmin –user=root create cacti

2. Import the default cacti database:

shell> mysql cacti < cacti.sql

For Ex.

mysql.exe -u root -p cacti<C:\Apache2\htdocs\cacti\cacti.sql

3. Create a MySQL username and password for Cacti.

shell> mysql –user=root mysql
mysql> GRANT ALL ON cacti.* TO [email protected] IDENTIFIED BY ‘somepassword’;

For Ex.

mysql> GRANT ALL ON cacti.* TO [email protected] IDENTIFIED BY ‘cactipw’;

mysql> flush privileges;

 

  • Configure Cacti

1. Edit (cacti/include/config.php) and specify the database type, name, host, user and password,database port for your Cacti configuration.

$database_type = “mysql”;
$database_default = “cacti”;
$database_hostname = “localhost”;
$database_username = “cactiuser”;
$database_password = “cactipw”;
$database_port = “3306”;

2. Point your web browser to:

http://your-server/cacti/

3. Open cacti in browser : “localhost/cacti” which will ask you to Install cacti as
cacti1

4.Click on Next, it will check all dependant path you can set if any path is different in your case.
cacti2

5.Click on Finish ,after that it will gives you a login windows.
6.Login using the username and password of admin/admin.
7.Next it will be required to change this password immediately so set the New password.
cacti3

Now You can use the cacti to create the graphs.

Thanks,
Sayali Mahale.