Anda di halaman 1dari 3

wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.

rpm
rpm -ivh epel-release-6-8.noarch.rpm

Sau bn m file /etc/yum.repos.d/epel.repo v sa [epel]


Yum y update

Ci t web server
yum install httpd httpd-devel mysql mysql-server php-mysql php-pear php-
common php-gd php-devel php php-mbstring php-cli php-mysql php-posix -y
Ci t PHP-SNMP
N l mt phn m rng cho SNMP truy cp d liu.
yum install php-snmp -y

Tip theo bn ci cc gi SNMP v RRD Tool theo di.


yum install net-snmp-utils net-snmp-libs php-pear-Net-SMTP y
Ci t RRDtool
cng c qun l v nhn d liu truy xut mng, lin kt d liu bng
thng v CPU
yum install rrdtool -y
yum install rrdtool* y

/etc/init.d/httpd start
/etc/init.d/mysqld start
/etc/init.d/snmpd start
chkconfig --levels 235 mysqld on
chkconfig --levels 235 httpd on
chkconfig --levels 235 snmpd on

yum install net-snmp-devel mysql-devel openssl-devel gcc make -y


yum install unzip y

cd/var/www/html/
wget http://www.cacti.net/downloads/cacti-0.8.8h.tar.gz

mv cacti-0.8.8h cacti
chmod 775 cacti/
mysql_secure_installation yes het
mysql u root p
CREATE DATABASE cacti;
CREATE USER 'cacti'@'localhost' IDENTIFIED BY 'hcmutinext';
GRANT ALL ON cacti.* to 'cacti'@'localhost';
FLUSH PRIVILEGES;
Exit
GRANT ALL PRIVILEGES ON mysql.* TO 'cacti'@'localhost' WITH GRANT OPTION;

GRANT ALL ON cacti.* TO cacti@localhost IDENTIFIED BY 'MyV3ryStr0ngPassword';

Flush privileges;

exit

Trong thu muc Cacti


[root@localhost cacti]# vi include/config.php

[root@localhost cacti]# vi include/global.php //tuong tu

[root@localhost cacti]# mysql -u root -p cacti < /var/www/html/cacti/cacti.sql


Enter password:

Cai dat ntp


yum install y ntp
chkconfig ntpd on
cp /usr/share/zoneinfo/Asia/Ho_Chi_Minh /etc/localtime
service ntpd start

Important PHP Settings


The default PHP installation usually has not configured the correct timezone or php error reporting. While
not required to run Cacti, its highly recommended to enable error reporting to syslog for troubleshooting
issues with plugins or other scripts.

The following lines need to be enabled/configued in your /etc/php.ini file:

; Defines the default timezone used by the date functions

; http://php.net/date.timezone

date.timezone = Europe/Berlin

and

; Log errors to syslog (Event Log on NT, not valid in Windows 95).

error_log = syslog

yum install net-snmp-devel mysql-devel openssl-devel gcc make -y


cd /var/www/html/cacti/plugins/
wget http://docs.cacti.net/_media/plugin:realtime-v0.5-2.tgz
tar -xvzf /var/www/html/cacti/plugins/plugin:realtime-v0.5-2.tgz -C
/var/www/html/cacti/plugins
[root@localhost plugins]# cd realtime/
[root@localhost realtime]# mkdir Cache_Realtime