Windows Cacti+php+mysql+iis Installation

Source: Internet
Author: User
Tags php database rrdtool snmp win32 phpmyadmin



Software required to install the environment:



1, Cacti



: http://www.cacti.net/downloads/



(This is cacti's web display program, which is done in PHP, you will put him in your web directory after completion.) )



2, Cactid



: http://www.cacti.net/downloads/cactid/packages/Windows/



(This is the program that cacti generated graphics from the RRDtool.) )






Spine This is the new version of Cactid. This is used as the interface for generating graphics and Web pages after the 0.8.6 version.






http://www.cacti.net/spine_download.php



3, RRDTool



: http://www.cacti.net/downloads/rrdtool/win32/






(This is the program that generates the graphics, which is used in the Cmd.exe program.) Of course you have to add your cmd.exe with user privileges)



4, PHP 4.3.6 or 5.x



: http://www.php.net/downloads.php



5, MySQL 4.x or MySQL 5.x



: http://dev.mysql.com/downloads/



6. (non-essential) Cygwin



: http://cygwin.com/



7, Net-snmp



: http://net-snmp.sourceforge.net/



8, (not necessary) ActivePerl-if you want to execute a Perl file, install it.



: Http://www.activestate.com/Products/Download/Download.plex?id=ActivePerl






9, install CYGIWN1. Installing a single Cygwin instance and using it for all applications requires that this is recommended, so you don't have to have different versions of Cygwin DLLs around your system, which can cause conflicts.






2. Run the previously downloaded setup.exe. 3. When you reach the installation Selection Package section, install the following:



Base (all items included)



Libs



Libart_lgpl



Libfreetype26



Libpng12



Zlib



Openssl



Utils



Patch



Web



Wget



: Http://cygwin.com/setup.exe






First, PHP5 installation






1, decompression php-5.2.13-win32.zip to "C:\php";



2, the "C:\php" in the "php.ini-recommended" renamed to "PHP.ini", find Extension_dir = "./" Change to Extension_dir = "C:\php\ext"



3, copy the php.ini to the C:\Windows directory (you can also copy all the PHP folder under Windows), and then copy "Php5ts.dll" and "Libmysql.dll" to "






Windows\system32\ "in;



4. Open the IIS configuration, mail Properties--Home Directory--Configure, add a ". php" suffix, point to "C:\php\php5isapi.dll", and add the ISAPI hot pick up add PHP






C:\php\php5isapi.dll



5, open "Start"-"Control Panel"-"System"-"advanced"-"environment variable".



In the "System Variables" tab, click Add, in the popup window variable name input mibdirs, variable value input C:\php\extras\mibs, determine



Then find the "path" variable, click Edit, add php variable directory; C:\php; C:\php\ext.






Add PHPRC; c:\php






Turn on PHP support for SNMP, GD, sockets, open the C:\windows\php.ini file, and make sure



Extension=php_gd2.dll,



Extension=php_mysql.dll,



Extension=php_snmp.dll,



Extension=php_sockets.dll



Cgi.force_redirect = 0



Session.save_path=c:\windows\tmp (to prevent session_start error)






Extension_dir = "c:/php/ext/"






You will need to restart Windows to make the settings you just made effective.






<?php



Phpinfo ();



?>






Use this to detect if the PHP installation was successful.






Second, installation cacti



Installing NET-SNMP



1, follow the cacti default path installation, all installed to C:\NET-SNMP



2, unzip Rrdtool-1.2.15-cygwin-1.5.20.zip to C:\rrdtool



3, unzip the cacti-0.8.7e.zip to the Web directory, here is C:\Inetpub\wwwroot\cacti



4, unzip Cacti-cactid-0.8.6k.zip to C:\cactid






Third, install MySQL



Double-click Mysql-essential-5.1.44-win32.msi



Just select Server.






Login Database Execution






mysql> CREATE database cacti;






Query OK, 1 row Affected (0.00 sec)






Mysql> Grant all on cacti.* to identified by "123456";






Query OK, 1 row Affected (0.00 sec)






Mysql>flush privileges;



Mysql>use cacti;






Mysql>source C:\Inetpub\wwwroot\cacti\cacti.sql



Mysql>exit






Fourth. parameter setting






1, modify C:\Inetpub\wwwroot\cacti\include under config.php database connection information to



$database _type = "MySQL";



$database _default = "cacti";



$database _hostname = "localhost";



$database _username = "cacti";



$database _password = "123456";



$database _port = "3306";






2, modify






C:\cactid under cactid.conf for



Db_host 127.0.0.1 (do not fill out localhost)



Db_database cacti



Db_user cacti



Db_pass 123456



Db_port 3306






Fifth, execution and regular tasks



1, Start---run---cmd



CD Inetpub\wwwroot\cacti






Perform



C:\php\php-win.exe poller.php






If there is a warning, please do it again, General php5, using Php-win.exe to perform






2,



Set up recurring tasks






Running on a recurring task (R): C:\php\php-win.exe C:\Inetpub\wwwroot\cacti\poller.php






Best to use C:\php\php-win.exe C:\Inetpub\wwwroot\cacti\poller.php > Null






(The PHP dialog box will not pop up)






At start at (T): C:\php






Schedule Advanced recurring tasks, every 5 minutes






Sixth, login configuration






1,localhost/cacti






2, click New Install, then click Next to enter RRDtool, PHP, Snmpwalk, Snmpget, Cactid location, please follow the installation path above






Set up.



3, setting---to be modified



RRDTool Utility Version RRDTool 1.2.x



SNMP Version Version 2






Setting---Paths



RRDTool Default Font Path C:/windows/fonts/arial.ttf






Setting---Visual



The bottom font is all modified to



C:/windows/fonts/arial.ttf



(If there is no word in the picture is likely to be the problem here)














(If you can not login here: You need to pay attention, if the import warning, or installed, how can not login to the monitoring background, there is willing to be your database does not have iuser or Session.save_path no write permission, and the database encoding format does not correspond, Check the User_auth table; I ended up installing a phpmyadmin myself, phpmyadmin the import script by UTF8 format)









Seventh, basic settings



1,console---Devices---Add the relevant information (as long as no error), save. Continue---Create Graphs for the This Host, check the hook before you want to monitor the entry,---created, since this is done.



(But for unified management, a graph Trees is typically created.) )






2, click Graph tress--add-add Add Group, Tree Item Type: Select Host, click Create.






3, click graphs Times to see






Eighth, SNMP settings for monitored Linux






Cat/etc/snmpd/snmpd.conf






Com2sec notconfiguser Default Public






Group Notconfiggroup v1 Notconfiguser



Group Notconfiggroup v2c Notconfiguser






View SystemView included. 1.3.6.1.2.1.1



View SystemView included. 1.3.6.1.2.1.25.1.1



View SystemView included. 1.3.6.1.4.1.2021.11



View SystemView included. 1.3.6.1.4.1.2021.10.1.5






Access Notconfiggroup "" Any noauth exact none none






INCL/EXCL subtree Mask



View all included. 1 80



View all included. 1.3.6









Syslocation Unknown (edit/etc/snmp/snmpd.conf)



Syscontact Root <> (configure/etc/snmp/snmp.local.conf)






disk/4919



Disk/www 59422



Pass. 1.3.6.1.4.1.4413.4.1/usr/bin/ucd5820stat






Last additions (when I installed cacti a week ago on another server, I couldn't figure out what it was, and it turned out to be php_gd.) DLL extension is not open.






The entry error is as follows:






03/23/2010 07:31:57 am-cmdphp:poller[0] host[2] ds[13] Warning:result from CMD not valid. Partial result:1min:5min:10



03/23/2010 07:31:57 am-cmdphp:poller[0] error:detected RRDtool Crash attempting to perform write



03/23/2010 07:32:03 am-system stats:time:8.7813 Method:cmd.php processes:1 threads:n/a hosts:3 hostsperprocess:3 DataSo Urces:21 rrdsprocessed:13)






If you monitor the Windows machine CPU, the memory is only graph, no data, also need to download http://www.wtcs.org/informant/download.htm






Just install it on the line.






This article from the "Five pieces of edges and corners" blog, reproduced please contact the author!



Windows Cacti+php+mysql+iis Installation


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.