cacti¼à¿ØmysqlÊý¾Ý¿âµÄ·½·¨
cacti ¼à¿Ø mysql
»·¾³£º
Cactiez»òÕßcactiÖ÷»ú£º192.168.12.5
±»¼à¿ØmysqlÊý¾Ý¿âÖ÷»ú£º192.168.5.231
1. °²×°¼à¿Ø²å¼þ
cd /opt
wget http://mysql-cacti-templates.googlecode.com/files/mysql-cacti-templates-1.1.6.tar.gz
tar -xzvf mysql-cacti-templates-1.1.2.tar.gz
cp /opt/mysql-cacti-templates-1.1.2/ss_get_mysql_stats.php /var/www/html/scripts/
ÆäʵÀïÃæÎÒÃÇÒª¼à¿ØmysqlÓõ½µÄÊÇ£ºacti_host_template_x_db_server_ht_0.8.6i.xmlºÍmysql_definitions.pl
ÆäËûÔòÊǼà¿ØApacheºÍNginxµÄ£¬½ÓÏÂÀ´ÎÒÃÇ»á½éÉܵ½£¬ÕâÀï²»ÔÙÏêϸµÄ½²ÁË¡£
chown -R apache.apache /var/www/html/scripts
chmod -R 755 /var/www/html/scripts
ʹÓà http ·ÃÎÊ cactiÖ÷»ú µ¼Èë /opt/mysql-cacti-templates-1.1.2/cacti_host_template_x_db_server_ht_0.8.6i.xml
http://192.168.12.5
ĬÈÏCactiEZ ºÍCacti±ðÊÇ admin admin
¿ØÖÆ̨ - µ¼Èëµ¼³ö - Ä£°åµ¼Èë - ä¯ÀÀ
Ñ¡ÖÐ cacti_host_template_x_db_server_ht_0.8.6i.xml
±£´æ
2. ÅäÖÃcactiµÄmysql²å¼þ
ÐÞ¸Ä ss_get_mysql_stats.php
vi /var/www/html/scripts/ss_get_mysql_stats.php
$mysql_user = 'cacti';
$mysql_pass = 'cacti';
$cache_dir = "/tmp/cacti/cache/";
Õâ¸öÕË»§ºÍÃÜÂëÊÇ ±»¼à¿Ø¶ËÖ÷»ú ¸ø CactiÖ÷»ú ÊÚȨµÄ ÕË»§ºÍÃÜÂë
CactiÐèÒªÕâ¸öÕË»§ºÍÃÜÂëÈ¥Á¬½Ó ±»¼à¿Ø»ú ²éѯ״̬
mkdir -p /tmp/cacti/cache
chown -R apache.apache /tmp/cacti
chmod -R 755 /tmp/cacti
ÉèÖà cacti »º´æĿ¼ÔÚ /tmp/cacti/cache/ ²¢¸øÓèȨÏÞ
3. ÅäÖñ»¼à¿Ø¶Ë£¨192.168.5.231£©µÄmysql ¸ø cacti Ö÷»úÊÚȨ
mysql -uroot -p
grant process,super on *.* to 'cacti'@'192.168.12.5' identified by 'cacti';
exit
grant process,super on *.* to 'ÕË»§'@'CactiÖ÷»úIPµØÖ·' identified by 'ÃÜÂë';
´ËÃüÁî ÒâÒå
Ö»ÔÊÐíIPΪ 192.168.12.5 µÄÖ÷»ú ÒÔÕË»§ cacti ÃÜÂë cacti È¥·ÃÎÊ ±¾»úÊý¾Ý
4. ÔÚCactiÖ÷»úÉÏ£¨192.168.12.5£© ¼à¿ØMysql
4.1 ΪÖ÷»úÌí¼ÓmysqlÄ£¿é
¿ØÖÆ̨ - ¹ÜÀí - É豸 - Ñ¡ÖÐ֮ǰ´´½¨ºÃµÄÖ÷»ú
È»ºóÒƵ½×îÏÂÃæµÄ Ìí¼ÓͼÐÎÄ£°æ Ñ¡ÖÐ MysqlÏà¹ØÄ£¿é È»ºó±£´æ
4.2 ΪmysqlÄ£¿é´´½¨Í¼ÐÎ
¿ØÖÆ̨ - ´´½¨ - ´´½¨Í¼ÐÎ - Ñ¡ÖиÃÖ÷»ú - Ñ¡ÖÐmysqlÄ£¿é - ´´½¨
4.3 ²å¼þmysqlÐÔÄÜÊý¾Ý
¼àÊÓÆ÷ - Ñ¡ÖиÃÖ÷»ú - ²éÔĶÔÓ¦µÄmysql
Íê±Ï
-----һЩÊý¾Ý¿â²Ù×÷Óï¾ä
mysqld_safe -
Ïà¹ØÎĵµ£º
È¥mysqlµÄ¹Ù·½ÍøÕ¾ÏÂÔØodbc connector(http://dev.mysql.com/downloads/connector/odbc/3.51.html)
ÏÂÔصÄÊÇmysql-connector-odbc-noinstall-3.51.rar
½âѹºóÖ±½ÓÔËÐÐÎļþ¼ÐÖÐµÄ Install.bat Åú´¦ÀíÎļþ
mysql-connectorÓкü¸ÖÖ£¬Ñ¡ÔñÒ»¸ö×Ô¼ºÏ²»¶µÄ¼´¿É¡£
ÔÚxpÖдò¿ªODBCÊý¾ÝÔ´¹ÜÀíÆ÷£¨¿ØÖÆÃæ°å£¡·¹ÜÀí¹¤¾ß£¡·ODBCÊ ......
»·¾³:
Tomcat6.0.18
Mysql: 5.1.36
Windwos XP sp2
×î½üÐèÒªÓõ½Tomcat+mysqlÁ¬½Ó³ØµÄÅäÖÃ,½ñÌìÔÚÍøÉϲéÁ˺öà×ÊÁÏ,ÀÏ×ÊÁÏÌ«¶à,¶ÔÓÚÒÔÉϵÄÀÏ°æ±¾tomcat¿ÉÄÜÓÐÓÃ,±¾ÈËûÓвâÊÔ¹ý,Õýȷд³ötomcat6.0ÅäÖõÄÎļäºÜÉÙ!ºÃ¶à×ÊÁÏÉÏÃæµÄÅäÖöÔÓÚÏÖÔÚаæµÄ¼¸ºõ¶¼ÊÇÓÐÎÊÌâµÄ,Ê®´íÆß°Ë!½ñÌì°ÑÎÒÅäÖõÄÕýÈ··½·¨Ð´ÏÂÀ´,¹©´ó¼Ò²Î¿¼ ......
¡¡¡¡ÓÃC++²Ù×÷MySQLÊý¾Ý¿âÀࣺ
¡¡¡¡×¢ÊÍ£ºÕ⼸¸öÀà¶Ô´¦Àí²»ÊǺܴóÊý¾ÝÁ¿µÄ²Ù×÷ÊǺÜÀíÏëµÄ£¬ µ«²»ÊÊÒËÌØ´óÐ͵ÄÊý¾ÝµÄ²éѯ£¬ÒòΪԴÂëÖн«²éѯµ½µÄÊý¾ÝÖ±½Ó·ÅÈëÁËÄÚ´æ¡£
¡¡¡¡/*
¡¡¡¡* project:
¡¡¡¡* ͨÓÃÄ£¿é ( Óà c++ ´¦Àí mysql Êý¾Ý¿âÀ࣬ÏñADO )
¡¡¡¡*
¡¡¡¡* description:
¡¡¡¡*
¡¡¡¡* ͨ¹ýDataBase,Reco ......
²Ù×÷ϵͳ: windows xp
php°æ±¾:5.2.5 http://www.php.net/downloads.php
Apache http server °æ±¾:2.2.6http://httpd.apache.org/download.cgi
Mysql°æ±¾: 6.0.3http://dev.mysql.com/get/Downloads/MySQL-6.0
1.apacheµÄ°²×°:
1)Ë«»÷apache_2.2.6-win32-x86-no_ssl.msiͼ±ê£¬Æô¶¯apache°²×°³ÌÐò£»
2£©°²×°ÒÔÒ»¸ö»¶Ó ......