網路資訊繪圖分析-Cacti
Cacti是一套根據PHP,MySQL,SNMP(Simple Network Management Protocol)及RRDTool所發展的網路資訊繪圖分析工具。如果你是一個網路管理者,每天要監控及分析網路上的所有活動,這是一套必備的工具。
Fedora core 4
[1.] apt-get install cacti
[2.] 建資料庫
mysqladmin –user=root create cacti
匯入資料表
mysql cacti < /var/www/cacti/cacti.sql
授權
mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'cactiuser';
mysql> flush privileges;
[3.] vi /var/www/cacti/include/config.php
/* make sure these values refect your actual database/host/user/password */
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "cactiuser";
$database_port = "3306";
[4.] 如果是用tarball安裝時,需加入排程
*/5 * * * * cactiuser php /var/www/html/cacti/poller.php > /dev/null 2>&1
[5.] 更改 cacti 裡目錄的權限
chown -R apache rra/ log/
首次安裝,跟著提示作,預設帳號密碼 admin/admin
第一次登入,會要求更改密碼
[Q1.] 重設密碼
[A1.] 修改admin密碼
mysql> update user_auth set password=md5('admin') where username='admin';
[Q2:] [root@ssorc ~]# php /var/www/html/cacti-0.8.6j/poller.php
File 'NONEXISTENT/charsets/?.conf' not found (Errcode: 2)
Character set '#33' is not a compiled character set and is not specified in the 'NONEXISTENT/charsets/Index' file
File 'NONEXISTENT/charsets/?.conf' not found (Errcode: 2)
Character set '#33' is not a compiled character set and is not specified in the 'NONEXISTENT/charsets/Index' file
[A2:] 原因在於編譯 PHP –with-mysql時,必需指定 –with-mysql=/usr
留言