0 tr ln:
(Nu khng c cc gi cn thit th tin hnh update, chnh sa source list v ci t cc gi epel-
release v remi-release)
1. Lamp server:
to nn mt mi trng my ch Web c kh nng cha v phn phi trang Web. Apache
c s dng hin th cc biu mng c to ra bi PHP v RRDtool.
apt-get -y install apache2 mysql-server php5 libapache2-mod-php5 dbconfig-
common libphp-adodb
chkconfig mysql on
chkconfig apache2 on
2. RRDtools:
Mt cng c hu ch ngun m lu tr v truy xut d liu chui thi gian.
apt-get install rrdtool librrds-perl y
3. SNMP v SNMPd
theo di localhost.
apt-get -y install snmp snmpd
# To Database TMS;
> CREATE DATABASE tms CHARACTER SET utf8 COLLATE utf8_unicode_ci;
>exit
<Directory /var/www/tms/>
Options +FollowSymLinks
AllowOverride None
</Directory>
6. Thit lp Crontab:
Crontab s gip d liu snmp nhn c trn Cacti y ln web ch hnh nh trong mi
khong thi gian.
To tp tin: /etc/cron.d/tms
*/1 * * * * root php /var/www/tms/poller.php 2>&1 >/dev/null >>
/var/www/tms/log/poller.log
y, */1 ch thi gian mi 1 pht PHP s xy dng Graphs da trn poller thu thp c,
2>&1 trng thi log khi xy dng s c lu trn file poller.log, nhng phn t khng
thuc h thng s b loi b, khng ghi trn n nh lnh >/dev/null
7. ng nhp :
M trnh duyt v g http://ip-address/cacti
ng nhp username v password l admin/admin.
2. Ci t Net-snmp
yum install net-snmp-utils net-snmp-libs php-pear-Net-SMTP y
3. Ci t RRDtool:
yum install rrdtool -y
/etc/init.d/mysqld start
/etc/init.d/snmpd start
chkconfig httpd on
chkconfig mysqld on
chkconfig snmpd on
<Directory /var/www/tms/>
<IfModule mod_authz_core.c>
# httpd 2.4
</IfModule>
<IfModule !mod_authz_core.c>
# httpd 2.2
Order deny,allow
</IfModule>
</Directory>
5. Thit lp Crontab:
Vo tp tin /etc/crontab thm dng sau :
*/1 * * * * php /var/www/tms/poller.php 2>&1 >/dev/null >>
/var/www/tms/log/poller.log
6. ng nhp:
M trnh duyt v g http://ip-address/cacti
ng nhp username v password l admin/admin.
Ch : Khi to ti khon trn Database Mysql phi trng khp ti khon trong cc tp
tin config.php v global.php ca Cacti :
#===================================
$database_type = "mysql";
$database_default = "tms";
$database_hostname = "localhost";
$database_username = "tms";
$database_port = "3306";
$database_ssl = false;
#===================================