Professional Documents
Culture Documents
Webserver : #yum y install httpd #service httpd start Mysql-server : #yum y install mysql-server // -y khng cn hi y/n ? #sercvice mysqld start #mysql > create database zabbix; > GRANT ALL ON zabbix.* TO zabbix@localhost IDENTIFIED BY 123abc!!!';
> FLUSH privileges; >\q
Chuyn tp tin t my ny qua my khc : qua my 192.168.2.17 ti th mc zabbix #scp /etc/zabbix/zabbix_agentd.conf root@192.168.2.17:/etc/zabbix/ Tt firewall : # /etc/init.d/iptables stop Lnh tt my: #shutdown r now QU TRNH INSTALL MONITOR ZABBIX(SERVER,AGENT) TRN 1 PC I. ci zabbix_server v zabbix_agentd trn cng mt my(server cho my gim st, agent cho my b gim st)
#wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm
# rpm -ivh epel-release-6-5.noarch.rpm
Phin bn 5 :
# wget http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm # rpm -ivh epel-release-5-4.noarch.rpm
bc 5: to database
# # # # #
service mysqld status service mysqld start mysqladmin -u root password 'new-password-here' mysql_secure_installation mysql -u root p
//LNH KIM TRA DATABASE CI HAY CHA Mysql>show databases; mysql> create database zabbix character set utf8; mysql> grant all privileges on zabbix.* to 'zabbix'@'localhost' identified by 'set-password-here'; mysql> quit; # cd create/schema # cat mysql.sql | mysql -u zabbix -p zabbix # cd ../data # cat data.sql | mysql -u zabbix -p zabbix # cat images_mysql.sql | mysql -u zabbix -p zabbix
bc 6: cu hnh zabbix
# mkdir /etc/zabbix # cd zabbix-1.8.1 #cd misc #cd conf #cp zabbix_agentd.conf /etc/zabbix/ # cp misc/conf/{zabbix_server.conf,zabbix_agentd.conf} /etc/zabbix/
Start/stop
# /usr/local/sbin/zabbix_agentd // start zabbix_agent ln i vi my cn gim st # /usr/local/sbin/zabbix_server // start zabbix_server ln
bc 8: to script khi ng
#echo zabbix_agent 10050/tcp >> /etc/services #echo zabbix_trap 10051/tcp >> /etc/services # cd zabbix-1.8.1 # cp misc/init.d/redhat/8.0/zabbix_* /etc/init.d/ # vi /etc/init.d/zabbix_server //Chnh sa trong zabbix server Progdir=/usr/local/sbin # chkconfig --add zabbix_server # chkconfig --add zabbix_agentd # chkconfig --level 35 zabbix_server on # chkconfig --level 35 zabbix_agentd on # chkconfig --list # chkconfig --list | grep zabbix # chmod 755 /etc/init.d/zabbix_server # chmod 755 /etc/init.d/zabbix_agentd // cd /sbin Lnh start/ stop/restart li zabbix. # service zabbix_server {start|stop|restart|condrestart}
bc 9: ci web frondtend
# yum install php-mysql php-gd php-bcmath php-mbstring php-xml # cp -r frontends/php/ /var/www/html/ Khi cp khong qua th mc /html th: #cd zabbix-1.8.1 #cd fontends
Truy cp giao din web: http://localhost/zabbix chnh sa file php.ini : seach : /tenfile cn tm.
# vi /etc/php.ini max_execution_time = 600 memory_limit = 256M post_max_size = 32M date.timezone = Europe/Zurich mbstring.func_overload = 2
Down file config v : copy - paste vo : #vi /var/www/html/zabbix/conf/zabbix.conf.php :wq ok # service httpd restart // khoi dong apache
II.
# ./configure --enable-agent
bc 5: ko cn bc 6: ging trn nhng ch chnh sa zabbix_agent vim /etc/zabbix/zabbix_agentd.conf server=<ip ca zabbix server> //dng co tnh nng discovery bn zabbix_server bc 7, bc 8: ging trn