Install and configure Cacti on IIS
Cacti is an open source PHP/MySQL based graphing and monitoring solution designed to utilise the very powerful RRDTool data logging tool by Tobias Oetiker. Using RRDTool, Cacti is capable of graphing and monitoring everything from network interface usage to temperature. Basically anything that can log data in a format RRDTool can read can be graphed and monitored by Cacti. In this guide we'll look at the steps necessary to install Cacti into your IIS environment.
Install PHP and MySQL
Being a PHP/MySQL based application you will need to first ensure that you have PHP and MySQL installed and configured. If you have not done so yet, then you can use my guide on installing PHP 5 on IIS in 5 simple steps and my guide on how to install and configure MySQL 5 on Windows.
The only additional steps you'll need to take to prepare your PHP environment for Cacti is to enable the following PHP extensions;
php_snmp.dll
php_sockets.dllIf you don't know how to enable these extensions, then have a look at my guide on enabling PHP PECL extensions for Windows.
Configure Cacti & RRDTool
Next step is to download Cacti and RRDTool then extract them to where you plan to install them. Cacti itself would usually reside inside your webroot unless you plan to connect to via a virtual directory, and RRDTool can go anywhere really as long as PHP has access to it. This is particularly relevant if you use the open_basedir directive in php.ini
Once you have done this you will need to grant the IUSR_COMPUTERNAME user account and the IIS_WPG group read and execute permissions on cmd.exe. To do this open a command prompt and type in the following commands;
cacls %COMSPEC% /E /G %COMPUTERNAME%\IUSR_%COMPUTERNAME%:Rcacls %COMSPEC% /E /G %COMPUTERNAME%\IIS_WPG:RIf you need further information please have a look at this article I wrote on giving IIS access to cmd.exe. Please be aware this is a potential security risk, so do so at your own risk. You'll also need to give the IUSR_COMPUTERNAME user account and the IIS_WPG group NTFS read permissions to your Cacti installation directory, and NTFS write permissions to the log and rra directories inside your Cacti installation directory.
Finally, you'll need to set the values in your Cacti configuration file. This file is called config.php and is located in the include directory in your Cacti directory. In this file you'll need to specify the details which cacti will use to connect to your MySQL database, and will look something like;
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "cacti";
$database_port = "3306";Change these values to suite your environment.
- 881 reads









Other PHP Apps
Hi, I've installed Cacti on Win 2003, it is working fine, I have few other php apps installed on the server therefore i had php/mysql preinstalled, once I got cacti working, the other php apps don't work now, I get cannot modify header error. anyideas.
R.N
That is a bit weird if those
That is a bit weird if those other apps were working to begin with. My first thought would be to ensure the output_buffering option in your php.ini is set to on, although PHP should work with it turned off. My other suggestion would be to do a search for "IIS" in your php.ini and ensure you have all the IIS specific directives set correctly as advised in the php.ini comments.
----------------
Dominic Ryan
4 x Microsoft IIS MVP, MCSE, MCSA
IIS Aid owner/webmaster
Post new comment