Install Cacti On Windows 7

Posted on

Cacti functions with any web server which utilizes PHP and MySQL. It's up to the system admin to utilize Microsoft IIS, Apache, or something else.

  1. Install Cacti On Ubuntu 16
  2. Install Cacti On Windows 10

Microsoft IIS

Select all templates and click Finish to complete the Cacti installation. Install Cacti on CentOS 7. How to Install Cacti on CentOS 7 / RHEL. Windows 7; Windows 8. May 17, 2017 - Cacti provide a fast poller, advanced graph templating, multiple data acquisition methods, and user management features out of the box. Home; Windows. You hadn't installed it yet you can simply install Cacti Server from here. As for “Associated Data Queries” add the following, and then click Save. Dec 27, 2017 - Install Cacti On Windows 7. Is an open source Network Management System with extensive graphics. It is used by multiple ISPs to show the.

Install

Configure

Follow:

After following the above guides:

IIS6 has the IIS_WPG user account. IIS7 it's called IIS_IUSRS

  • Give the COMPUTERNAMEIUSR_ and COMPUTERNAMEIIS_WPG users Read & Execute permissions to the file C:Windowssystem32cmd.exe. Yes, this can be a large security hole, but it's required so RRDTool can be launched for graphing by the anonymous web account. For slightly improved security, one can specify a separate custom User account which would be used for the /wwwroot/Cacti/ site. Then, instead of using IUSR_ everywhere throughout this document, replace it with the custom User account. This way, only a security vulnerability in Cacti's code could exploit cmd.exe and not all sites on the IIS server.
    • Right click on cmd.exe and select Properties.
    • Click on the Security tab.
    • Select the IUSR_ account
    • Click on Read & Execute in the Permissions box.
    • Repeat for the IIS_WPG user.
    • Click OK.
  • Both IUSR_ and IIS_WPG users will also need read permissions on C:Inetpubwwwrootcacti and its subfolders.
    • Right click on the folder C:Inetpubwwwrootcacti and select Properties.
    • Click on the Security tab.
    • Click on Add... under the group or user names section.
    • Type in IUSR_ COMPUTERNAME or click Advanced... and Find Now. Repeat for the IIS_WPG account.
    • Click OK to close the select users or groups window.
    • Select the IUSR_ COMPUTERNAME from the list.
    • Select Read & Execute from the Permissions box.
    • Repeat for the IIS_WPG account.
    • At the bottom of the Security tab, click on Advanced....
    • In the Permissions tab, click on Replace permissions entries on all child objects with entries shown here that apply to child objects.
    • Click OK.
    • Click Yes to the Security warning dialog box.
    • Click OK to close the properties window.
  • Give the IUSR_ and IIS_WPG users modify permissions to the folders C:Inetpubwwwrootcactilog and C:Inetpubwwwrootcactirra.
  • Completely stop and start the IIS service using the following commands from the command prompt. Alternatively, use the Service MMC snap-in under Administrative Tools:
  • Install WOFF mimetypes for TrueType Fonts:

Apache

Make sure to stop the IIS web services before proceeding with the Apache installation or make sure Apache is configured on an alternate port.

Install

  • Download the latest version from Apache Lounge.
  • Make sure to read the Windows specific notes for other Windows tips.
  • Extract the ZIP file to C:Apache24
    • Edit Apache24confhttpd.conf
      • Set ServerRoot
      • Set ServerName
  • Manually run httpd.exe at a command prompt to check for errors.
  • Once error free, execute httpd.exe -k install
  • Download the latest version of PHP 7.0 from http://windows.php.net.
  • Extract the ZIP file to C:PHP
  • Add C:PHP to your Windows PATH environment variable.
    • The Windows path variable can be accessed via the Control Panel at: System Advanced Environment Variables
    • In the System Variables groupbox, find Path and click Edit and add: C:PHP
  • Add a new system variable called PHPRC. Its value should be: C:PHP
  • Add a new system variable called MIBDIRS. Its value should be: C:PHPExtrasmibs
  • Rename C:PHPphp.ini-production to C:PHPphp.ini
  • Find and then uncomment/modify the following lines in C:PHPphp.ini.
  • If using IIS, find, uncomment or add the following lines in C:PHPphp.ini
  • If you have had previous versions of PHP installed, you had likely moved the PHP system files to in the Windows directory structure. If so, you will have to remove those files. Please review your PHP installation documentation for instructions on removing those files.
  • Verify PHP is functional by running the following at the command prompt: php -mIf messages with, Cannot find module are appearing, then there is something wrong with the MIBDIRS variable or missing mib file(s) in the PHPExtrasmib folder.

Configure Permissions

  • Change NTFS permissions on C:PHPUploadtemp and C:PHPSession to grant Modify rights to the IUSR_ and IIS_WPG users for only files in the directory.
  • Give the user who will be running the scheduled task, Modify rights to: c:phpextrasmibs.index
Install cacti plugin

MySQL 5.6 / 5.7

  • Download the latest Generally Available MSI Installer from MySQL.com.
  • Launch the MSI
    • Agree to the license
    • Setup Type - Select Server only
    • Click Execute and wait until the installation has completed.
  • Click Next to begin the Product Configuration
  • Type and Networking Page:
    • Config Type: Server Machine
    • Connectivity: Leave the defaults selected (TCP, Port 3306, Open Firewall port for network access)
    • Enable Show Advanced Options
    • Click Next.
  • Accounts and Roles Page:
    • Specify a root password
    • Skip the User Accounts section
    • Click Next.
  • Windows Service Page
    • Leave all defaults enabled
    • Click Next.
  • Plugins and Extensions
    • Leave all defaults disabled
    • Click Next.
  • Advanced Options
    • Enable General Log
    • Enable Slow Query Log
    • Click Next.
  • Apply Server Configuration page
    • Click Execute.
    • Validate all steps are green and were successful.
    • Click Finish
  • Click Next through the remaining screens.

Install TimeZone Database

  • Download TimeZone (POSIX standard) database from: http://dev.mysql.com/downloads/timezones.html
  • Extract file
  • Import:c:> mysql --user=root --password mysql < C:downloadstimezone_posix.sql
  • Validate it works. The two queries below should return the same result in the form of central US time 2007-03-11 01:00:00

Install Cacti Database

  • Create the MySQL database:c:> mysqladmin --user=root --password create cacti
  • Import the default Cacti database:c:> mysql --user=root --password cacti < C:Inetpubwwwrootcacticacti.sql

If you get any errors during this phase, you likely have sql-strict mode enabled or something else misconfigured in my.ini!

  • Create a MySQL username and password for Cacti.

If you plan to use any hosts with SNMP v3 support, you must install the Net-SNMP binaries, since the PHP SNMP extension does not handle SNMPv3. You do NOT need to install/use the Net-SNMP SNMP agent. The Microsoft SNMP agent is recommended. The Net-SNMP binaries are useful when creating custom scripts, as they provide an easy way to query SNMP data from devices.

  • Download from net-snmp.sourceforge.net
  • Run the installer:
    • Select the Net-SNMP agent service With Windows Extension DLL Support
    • Uncheck Net-SNMP Trap Service
    • Uncheck Perl SNMP Modules
    • Select Encryption support
    • Specify Destination Folder: C:Net-SNMP

Validate

  • From a command prompt run:

C:>snmpwalk

If there are no errors, it's properly installed.

  • Download the latest version from Github or www.cacti.net
  • Extract the ZIP file to the root of your web server directory:
    • IIS: C:Inetpubwwwrootcacti
    • Apache: C:Apache24htdocscacti

Install Cacti On Ubuntu 16

Configure Cacti

  • Open a web browser to http://localhost/cacti/
  • Follow the Installation Wizard

Configure Scheduled Task for Poller

You are going to need to schedule a task while logged on as an Administrator. This task is required for the Poller to run every 5 minutes. Make sure the Task Scheduler service is started and follow the steps below to begin.

  • 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:PHPphp.exe
    • Argument: C:cacti_web_rootpoller.php
    • Start In: C:cacti_web_root
  • Conditions & Settings Tabs
    • Configure per your IT standards.
  • Click OK to create the Task.

Spine is a high speed poller replacement for cmd.php. It is almost 100% compatible with the legacy cmd.php processor and provides much more flexibility, speed and concurrency than cmd.php

Often, the latest compiled binaries of Spine can be found here: http://www.cacti.net/downloads/packages/Windows/. Alternatively, you can compile Spine with Cygwin yourself. Refer to the documentation https://github.com/Cacti/spine/blob/develop/README.md

-->

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.

  1. Download MySQL Community Server. We recommend downloading Windows® Installer.
  2. Start Windows Installer, or extract all the files from the archive, and then start Setup.exe.
  3. You can use a Typical Setup or customize the installation to suit your needs.
  4. 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

  1. 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

  1. 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:
  2. Enter the password for the root account.
  3. Once logged on to MySQL, use the following sequence of commands:

  4. Next, restrict the root account to log on only from localhost. Open a MySQL command prompt, and use the following sequence of commands:

  5. Change the name of the root user with the following sequence of commands from the command prompt:

Provision the User and Database

Install Cacti On Windows 10

  1. To provision a new user, type the following command from the MySQL command prompt:

  2. The newly created user does not have any privileges on the MySQL server by default. To create a new database, type the following command:

  3. To grant access to this database for a particular user, type the following command:

Cacti

Configure PHP to Access MySQL

  1. Open the c:phpphp.ini file with your favorite text editor.
  2. Uncomment the following lines by removing the semicolon:

  3. Restart the IIS service by clicking on Start, selecting the Search Field, typing iisreset, and then pressing ENTER.
  4. 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.

See also