cacti install centos5.2
作者:tseng 日期:2009-03-30
1.先安裝以下套件
httpd-2.2.3-11、php-5.1.6-15、mysql-5.0.22-2.2
cacti-0.8.7b-2、net-snmp-5.3.1-19、rrdtool-1.2.23-1
rpm -ivh cacti-0.8.7b-2.el5.rf.noarch.rpm
rpm -ivh cacti-docs-0.8.7b-2.el5.rf.noarch.rpm
以上套件用rpm或yum安裝
2.安裝與設定 Cacti
mysqladmin -u root -p create cacti
mysql -u root -p -A cacti < /var/www/html/cacti/cacti.sql
編輯 cacti 設定檔
vi /var/www/cacti/include/config.php
修改以下四行
$database_default = "cacti"; //資料庫名稱
$database_hostname = "localhost"; //資料庫位置
$database_username = "cactiuser"; //資料庫使用者名稱
$database_password = "cactiuser"; //資料庫使用者密碼
設定資料庫
mysql> grant all privileges on cacti.* to cactiuser@localhost identified by ‘cactiuser’;
mysql> flush privileges;
mysql> exit
設定apache
vi /etc/httpd/conf.d/cacti.conf
vi /etc/httpd/conf/http.conf
Alias /cacti/ /var/www/cacti/
<Directory /var/www/cacti/>
DirectoryIndex index.php
Options -Indexes
AllowOverride all
order deny,allow
deny from all
allow from 127.0.0.1
allow from 192.168 <= 追加
AddType application/x-httpd-php .php
php_flag magic_quotes_gpc on
php_flag track_vars on
</Directory>
cacti定期執行
/etc/cron.d/cacti
*/5 * * * * cacti php /var/www/cacti/poller.php &>/dev/null
httpd-2.2.3-11、php-5.1.6-15、mysql-5.0.22-2.2
cacti-0.8.7b-2、net-snmp-5.3.1-19、rrdtool-1.2.23-1
rpm -ivh cacti-0.8.7b-2.el5.rf.noarch.rpm
rpm -ivh cacti-docs-0.8.7b-2.el5.rf.noarch.rpm
以上套件用rpm或yum安裝
2.安裝與設定 Cacti
mysqladmin -u root -p create cacti
mysql -u root -p -A cacti < /var/www/html/cacti/cacti.sql
編輯 cacti 設定檔
vi /var/www/cacti/include/config.php
修改以下四行
$database_default = "cacti"; //資料庫名稱
$database_hostname = "localhost"; //資料庫位置
$database_username = "cactiuser"; //資料庫使用者名稱
$database_password = "cactiuser"; //資料庫使用者密碼
設定資料庫
mysql> grant all privileges on cacti.* to cactiuser@localhost identified by ‘cactiuser’;
mysql> flush privileges;
mysql> exit
設定apache
vi /etc/httpd/conf.d/cacti.conf
vi /etc/httpd/conf/http.conf
Alias /cacti/ /var/www/cacti/
<Directory /var/www/cacti/>
DirectoryIndex index.php
Options -Indexes
AllowOverride all
order deny,allow
deny from all
allow from 127.0.0.1
allow from 192.168 <= 追加
AddType application/x-httpd-php .php
php_flag magic_quotes_gpc on
php_flag track_vars on
</Directory>
cacti定期執行
/etc/cron.d/cacti
*/5 * * * * cacti php /var/www/cacti/poller.php &>/dev/null
评论: 0 | 引用: 0 | 查看次数: 10983
发表评论