Install PHP
Extract PHP to c:\ and rename the new directory to 'php'.
Copy the files in c:\php\dlls to c:\winnt\system32.
Copy the file c:\php\php4ts.dll to c:\winnt\system32.
Move all MIB files from c:\php\mibs to c:\usr\mibs.
Create the directory c:\tmp.
In the c:\php directory, rename the php.ini-dist file to php.ini, copy it to c:\winnt, and make the following changes to the file:
extension_dir = c:/php/extensions extension=php_snmp.dll session.save_path=c:\tmp
Configure the Webserver (Apache)
Install the Apache web server. This is as simple as double clicking the .msi file and following the prompts. Make sure to install it as a service and for the sake of the HOWTO, install it to c:\apache or c:\apache2.
If you are using Apache 1.3.x, add the following lines to your httpd.conf file in the c:\apache\conf directory:
LoadModule php4_module c:/php/sapi/php4apache.dll AddModule mod_php4.c AddType application/x-httpd-php .php DirectoryIndex index.html index.htm index.php
If you are using Apache 2.x, add the following lines to your httpd.conf file in the c:\apache2\conf directory:
LoadModule php4_module c:\php\sapi\php4apache2.dll AddType application/x-httpd-php .php DirectoryIndex index.html index.htm index.php
Configure the Webserver (IIS)
Start the Microsoft Management Console, right click on Default Web Server (in most cases) and select Properties.
Under the Home Directory tab, select Configuration and click Add. Browse to the path of php4isapi.dll, and type in .php as the extension.
Under the ISAPI Filters tab, click Add and browse to the php4isapi.dll file. Name the filter "php" and click OK.
Under the Documents tab, add index.php to the list.
Completely stop and start the IIS service using the following commands:
net stop iisadmin net start w3svc
Install MySQL
Extract the MySQL zip file to a temp directory and run setup.exe.
Install MySQL to the c:\mysql directory.
Start MySQL by running c:\mysql\bin\winmysqladmin.exe.
Set a password for the root user
shell> cd mysql\bin shell> mysqladmin ?-user=root password somepassword shell> mysqladmin --user=root --password reload
Create the MySQL database:
shell> mysqladmin --user=root --password create cacti
Import the default Cacti database:
shell> mysql --user=root --password cacti < c:\apache2\htdocs\cacti\cacti.sql
Optional: Create a MySQL username and password for Cacti.
shell> mysql --user=root --password mysql mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'somepassword'; mysql> flush privileges;
Install Cacti
Extract the distribution archive. These instructions will assume that the archive has been extracted to C:\Apache\htdocs\cacti, although you can use a different path if you wish. Make sure you extract with "Use folder names" enabled, so that the necessary sub-folders will be used.
Unzip rrdtool and copy rrdtool.exe from the src/tool_release directory to somewhere such as C:\rrdtool.
Edit include/config.php and specify the MySQL user, password and database for your Cacti configuration.
$database_default = "cacti"; $database_hostname = "localhost"; $database_username = "cactiuser"; $database_password = "cacti";
You are going to need to schedule a task, so cmd.php can run every 5 minutes. Make sure the Task Scheduler service is started and open up the Scheduled Tasks control panel item. Add a new task, browse to your php.exe file and click Next. Have the task run daily (for now) and click Next twice until you are at the username/password screen. You must enter a user that has read/write permissions to Cacti's rra/ and log/ directories here. Click Next, check the box to open Advanced Properties and click Finish.
You are going to have to enter the full command line in the Run textbox. Using default paths, your command line should look something like:
c:\php\php.exe c:\apache2\htdocs\cacti\cmd.php
Select the Schedule tab and click Advanced. Check the Repeat task checkbox and change it to every 5 minutes, then change the Duration to 24 hours. That should schedule cmd.php to run every 5 minutes.
Point your web browser to:
http://your-server/cacti/
Log in the with a username/password of admin. You will be required to change this password immediately. Using the default paths described in this document, your paths should look something like:
PHP Binary Path:
c:\php\php.exe
RRDTool Binary Path:
c:\rrdtool\rrdtool.exe