Cacti (home)ForumsDocumentation

Differences

This shows you the differences between two versions of the page.

manual:100:1_installation.2_install_windows.7_configure_cacti [2015/12/30 01:51] (current)
Line 1: Line 1:
 +==== Install Cacti ====
 +  - Download the current version from [[http://www.cacti.net/download_cacti.php|www.cacti.net]]
 +  - Extract the ZIP file to the root of your web server directory:
 +    - IIS: C:\Inetpub\wwwroot\cacti\
 +    - Apache: C:\Apache2\htdocs\cacti\
  
 +
 +=== Patch ===
 +  - There are two methods of applying patches:
 +    - Visit [[http://www.cacti.net/downloads/patches/|http://www.cacti.net/downloads/patches/<cacti version>/pre-patched/]] and manually download and replace the patched files.
 +    - If you have Cygwin installed, then the patch instructions which use wget and patch, will work.
 +  - You might need to reapply file/folder security on the files patched. Double check they are correct.
 +
 +
 +=== Configure ===
 +<note important>Throughout this section, **cacti_web_root** is referenced. It's intended to be substituted with the real Cacti web server path of your environment. 
 +Typically this is: \\
 +C:\Inetpub\wwwroot\cacti\
 +\\ or \\
 +C:\Apache2\htdocs\cacti\</note>
 +
 +  - Edit **\cacti_web_root\cacti\include\config.php** and specify the database type, name, host, user, password, and url_path for your Cacti configuration.<code>$database_type = "mysql";
 +$database_default = "cacti";
 +$database_hostname = "localhost";
 +$database_username = "cactiuser";
 +$database_password = "cacti";
 +
 +/*
 +   Edit this to point to the default URL of your Cacti install
 +   ex: if your cacti install as at http://serverip/cacti/ this
 +   would be set to /cacti/
 +*/
 +$url_path = "/cacti/";</code>
 +
 +  - From within Cacti, go to Settings -> Paths and verify the paths to point to the correct locations. Recommended examples are posted below. 
 +<note>If you plan on using Spine, then it is very important that all paths include forward slashes instead of backslashes.</note>
 +
 +^ Path                      ^ Setting                                   ^
 +| **PHP Binary Path:**      | c:/php/php.exe                            |
 +| **RRDTool Binary Path:**  | c:/rrdtool/rrdtool.exe                      |
 +| **SNMPGET Path:**         | c:/net-snmp/bin/snmpget.exe      |
 +| **SNMPWALK Path:**        | c:/net-snmp/bin/snmpwalk.exe     |
 +| **SNMPBULKWALK Path:**    | c:/net-snmp/bin/snmpbulkwalk.exe |
 +| **SNMPGETNEXT Path:**     | c:/net-snmp/bin/snmpgetnext.exe  |
 +| **Cacti Logfile Path:**   | c:/cacti_web_root/log/cacti.log    |
 +| **Spine Path:**            | c:/spine/Spine.exe                        |
 +
 +  - Click on Devices. Delete the Localhost device as it intended for a Linux environment.
 +  - In the upper right corner, click **Add**. Fill in the following information and then click Add.<code>
 +Description: My Windows localhost
 +Hostname: localhost
 +Host Template: Windows 2000/XP
 +</code>
 +  - You should now be looking at the localhost device screen. Right under it's name, there should be some SNMP information listed, if not you should double check the SNMP settings on the server and firewall settings. 
 +  - In the upper right-hand corner, click on Create Graphs for this Host. 
 +  - On the following screen, select a disk partition and network interface. 
 +  - At the bottom of the page, click on Create.
 +  - Log into the user account you'll be using for the scheduled task and verify starting a Cacti polling cycle works. Do this by running the following from the command prompt:<code>
 +C:\>php c:/cacti_web_root/poller.php
 +</code>The output should look something like the following:<code>
 +C:\>php c:/cacti_web_root/cmd.php
 +11/04/2012 10:01:57 PM - CMDPHP: Poller[0] Time: 1.1106 s, Theads: N/A, Hosts: 1
 +</code>After this has ran once, you should have "cacti.log" in "/cacti/log/" and rrd files in /cacti/rra/.
 +
 +=== Configure Task ===
 +You are going to need to schedule a task while logged on as an Administrator. This task is required to you can run "poller.php" every 5 minutes. Make sure the Task Scheduler service is started and follow the steps below to begin.
 +
 +== Windows XP/2003 ==
 +    - In Control Panels, open **Scheduled Tasks**.
 +    - Double click on **Add Scheduled Task**.
 +    - Click Next and Browse on the following screen. Find "C:\php\" and select "php.exe". Choose **Daily** on and click **Next**.
 +    - Click Next again without changing the time or date settings.
 +    - When entering a username and password make sure the user has read and write access to the following directories:<code>cacti_web_root/cacti/rra
 +cacti_web_root/log</code> Make sure the user has read, write, and execute access to the following directories:<code>
 +c:\php
 +</code>
 +    - Click Next and Finish to close the wizard.
 +    - Right click on the task you just created, and select Properties.
 +    - Select the //Schedule Tab//.
 +    - Make sure **Daily** is selected and click the **Advanced** button.
 +    - Check the **Repeat** checkbox, set it for **5 minutes** and set the duration for **24 hours**.
 +    - Click OK
 +    - In the Run textbox enter the following text making sure to use the appropriate paths.<code>
 +c:\php\php.exe 
 +c:\cacti_web_root\poller.php</code>The start in box should say <code>"C:\cacti_web_root\"</code>.
 +
 +
 +== Windows 2008+ ==
 +  - Open **Task Scheduler**
 +  - Create a new Task
 +  - //General Tab//
 +    - Name: Cacti Poller
 +    - Security Options:  
 +      - Specify the user/service account the task will run under.
 +      - Select **Run whether user is logged on or not**
 +  - //Triggers Tab//
 +    - Create a new trigger.
 +    - Select **Daily**
 +    - Reoccur every: **1 days**
 +    - Repeat Task every: **5 minutes** for a duration of **Indefinitely**
 +    - Select **Enabled**
 +    - Click **OK**
 +  - //Actions Tab//
 +    - Create a new action.
 +    - Program: **C:\PHP\php.exe**
 +    - Argument: **C:\cacti_web_root\poller.php**
 +    - Start In: **C:\cacti_web_root\**
 +  - //Conditions & Settings Tabs//
 +    - Configure per your IT standards.
 +  - Click **OK** to create the Task.





Personal Tools