Install Cacti On Windows 7
Nonetheless, i think they will be very useful for anyone trying to install cacti on Windows Server 2008. I wanted to edit the wiki documentation. Cacti requires MySQL, PHP, RRDTool, net-snmp, and a webserver that supports. Please use the install guide for either Unix or Windows for information about.
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 Plugin
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 7.x/6.x/5.x, CentOS 7.x/6.x/5.x and Fedora 24-12 systems using YUM and DNF (Fedora 23 onwards) package manager tool.
Cacti Required Packages
The Cacti required following packages to be installed on your Linux operating systems like RHEL / CentOS / Fedora.
- Apache : A Web server to display network graphs created by PHP and RRDTool.
- MySQL : A Database server to store cacti information.
- PHP : A script module to create graphs using RRDTool.
- PHP-SNMP : A PHP extension for SNMP to access data.
- NET-SNMP : A SNMP (Simple Network Management Protocol) is used to manage network.
- 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
Apache Web Server Installation
Install MySQL
MariaDB is a community-developed fork of the MySQL database project, and provides a replacement for MySQL. Previously the official supported database was MySQl under RHEL/CentOS 6.x/5.x and Fedora.
Recently, RedHat makes a new transaction from MySQl to MariaDB, as MariaDB is the default implementation of MySQL in RHEL/CentOS 7.x and Fedora 19 onwards..
Installation of MariaDB Database
Install PHP
Install PHP-SNMP
SNMP Installation
Install NET-SNMP
Install RRDTool
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.
On RHEL/CentOS 6.x/5.x and Fedora 18-12
On RHEL/CentOS 7.x and Fedora 19 Onwards
Start Services Using systemctl
Configure System Start-up Links
Configuring Apache, MySQL and SNMP Services to start on boot.
On RHEL/CentOS 6.x/5.x and Fedora 18-12
On RHEL/CentOS 7.x and Fedora 19 Onwards

Enable Services at Boot Using systemctl
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.
Sample Output:
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).
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.
On RHEL/CentOS 6.x/5.x and Fedora 18-12
On RHEL/CentOS 7.x and Fedora 19 Onwards
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.
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.
Configure MySQL settings for Cacti
Open the file called /etc/cacti/db.php with any editor.
Make the following changes and save the file. Make sure you set password correctly.
Configuring Firewall for Cacti
On RHEL/CentOS 6.x/5.x and Fedora 18-12
On RHEL/CentOS 7.x and Fedora 19 Onwards
Configuring Apache Server for Cacti Installation
Open file called /etc/httpd/conf.d/cacti.conf with your choice of editor.
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 172.16.16.0/20. In your case, it would be different.
In latest version of Apache (ex: Apache 2.4), you may need to change according to the following settings.
Finally, restart the Apache service.
Setting Cron for Cacti
Open file /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.
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.
Please choose installation Type as 'New Install'.
Install Cacti On Windows
Select Cacti New Install
Make sure all the following values are correct before continuing. Click Finish button.
Cacti Login Screen, enter username as admin and password as admin.

Cacti Login Screen
Once you've entered username and password, it will ask you to enter a new password for cacti.
Cacti Console Screen.
Cacti Console Screen
How to Create New Graphs
To create graphs, Click on New Graphs --> Select Host --> Select SNMP - Interface Statistics and Select a graph type In/Out Bits. Click on Create button. Please refer screen below.
Cacti Monitoring Graphs
For more information and usage please visit the Cacti Page.
by Ruslan Yakushev
Introduction
While Microsoft® SQL Server® 2008 is the recommended database to use when hosting PHP applications on an Internet Information Services 7 (IIS 7) and above Web server, you can also use MySQL as the database. Currently, many popular PHP applications use MySQL Server for data storage. Using MySQL requires hosting providers to include MySQL database support with the hosting packages.
MySQL cannot currently be installed with the Microsoft® Web Platform Installer (Web PI). This article provides guidance for installing MySQL manually.
Install MySQL Server on Windows Server 2008 or Windows Server 2008 R2
It is recommended that you install MySQL on a dedicated server rather than installing MySQL on the same server that is running IIS. The separation of database server and Web server makes overall installation more secure and manageable and avoids resource contentions between the database and Web server processes.
- Download MySQL Community Server. We recommend downloading Windows® Installer.
- Start Windows Installer, or extract all the files from the archive, and then start Setup.exe.
- You can use a Typical Setup or customize the installation to suit your needs.
- Once the installation wizard is completed, it is recommended that you leave the Configure the MySQL Server now check box selected.
Configure a MySQL Instance
Run the MySQL Server Instance Configuration Wizard, and then choose the configurations options that most closely match your environment.
For more information, see the Server Instance Configuration Wizard.
Best practice recommendations are as follows:- Click Next in the Instance Configuration Wizard.
- Select Detailed Configuration, and then click Next.
- Select a server type that best suits your environment. It is recommended to set up a separate MySQL server; when prompted to select a server type, select Dedicated MySQL Server Machine, and then click Next.
Select a database option, and then click Next.
- Select either the Multifunctional Database or Transactional Database Only options if you are using the InnoDB storage engine or the high-speed MyISAM storage engine (for example, if the Web applications on your server require multi-statement transactions, advanced isolation levels and row-level locking, foreign key constraints, or atomic, consistent, isolated, and durable [ACID] features). These options provides fully ACID transactional capabilities, but at the cost of more aggressive usage of disk space and memory.
- Otherwise, use the Non-Transactional Database Only option, which is optimized for high-performance SELECT operations. It has low overhead, in terms of memory usage and disk utilization, but at the cost of not supporting transactions.
Choose the option that sets the number of concurrent connections you need.
Note
Connections require memory; if the number you choose is too big, your server may not have enough memory.
- You may adjust networking settings to suit your environment or accept defaults, and then click Next.
- Select the default character set that best suits you, and then click Next.
- We recommend enabling both Windows options here. Select both check boxes, and then click Next.
- Type the password you want to use for the root account, and then click Next.
- Click Execute to apply your settings.
- Click Finish to close the wizard.
For PHP to work with MySQL, it is necessary to perform the following modifications to the Php.ini file:
- Confirm that the extension_dir points to the folder where all PHP loadable extensions are located, frequently in the Ext folder (for example, extension_dir='.ext').
- Enable dynamic extension for MySQL by uncommenting the corresponding line for the MySQL extension: extension=php_mysql.dll
- c. Save and close the Php.ini file.
Secure MySQL
- Remove the anonymous database account (if it exists). Open the MySQL command prompt by clicking Start -> All Programs -> MySQL -> MySQL Server 5.1 -> MySQL Command Line Client:
- Enter the password for the root account.
Once logged on to MySQL, use the following sequence of commands:
Next, restrict the root account to log on only from localhost. Open a MySQL command prompt, and use the following sequence of commands:
Change the name of the root user with the following sequence of commands from the command prompt:
Provision the User and Database
To provision a new user, type the following command from the MySQL command prompt:
The newly created user does not have any privileges on the MySQL server by default. To create a new database, type the following command:
To grant access to this database for a particular user, type the following command:
Configure PHP to Access MySQL
- Open the
c:phpphp.ini
file with your favorite text editor. Uncomment the following lines by removing the semicolon:
- Restart the IIS service by clicking on Start, selecting the Search Field, typing iisreset, and then pressing ENTER.
If all went well, you should see the mysqli section on the PHP information page created earlier
http://localhost/phpinfo.php
.Figure 1: The mysqli section on the PHP information page
Best Practices for MySQL

- Enable TCP/IP Networking — This is the default. Keep the TCP port that MySQL uses to listen at 3306. If the database will be running on a separate system from the Web server, select the Add firewall exception for this port check box.
- Include Bin Directory in Windows PATH — This makes the MySQL utilities available from the command prompt or from Windows PowerShell™.
- Create an Anonymous Account — The default is to keep this disabled. Adding anonymous user support may create a security risk for the database; additionally, enabling anonymous users causes the GRANT statements used to set up database to be unreliable.