Zabbix 3.0 For CentOS6安裝
1?概述2?安裝MySQL3?安裝WEB4?安裝Zabbix-Server5配置WEB1概述
? ?對于3.0,官方只提供CentOS7的RPM包,Ubuntu的DEB包,對于CentOS6,默認不提供RPM包,為了照顧到使用CentOS6的兄弟們,而由不想使用源碼安裝的兄弟,小編特意準備了CentOS6的安裝包,希望大家玩的開心
環境要求
PHP >= 5.4 ?(CentOS6默認為5.3.3,需要更新)
curl >= 7.20 (如需支持SMTP認證,需更新)
為了支持CentOS6,特建立如下項目
推薦項目
https://github.com/zabbixcn/zabbix3.0-rpm.git https://github.com/zabbixcn/curl-rpm
2安裝MySQL
? ? ?MySQL建議使用5.6版本,CentOS6默認為5.1,不建議使用,性能偏低
rpm -ivh http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm yum install mysql-server -y ?#此過程會因為網路問題偏慢,請耐心等待 ?
vim /etc/my.cnf
[mysqld] innodb_file_per_table ? service mysqld start ? mysql_secure_installation ?
Enter current password for root (enter for none): Set root password? [Y/n] Remove anonymous users? [Y/n] Disallow root login remotely? [Y/n] Remove test database and access to it? [Y/n] Reload privilege tables now? [Y/n] ?
mysql -uroot -p mysql> CREATE DATABASE zabbix CHARACTER SET utf8 COLLATE utf8_bin; mysql> GRANT ALL PRIVILEGES ON zabbix.* TO zabbix@localhost IDENTIFIED BY 'zabbix'; mysql> show databases; ?
+--------------------+ ? ? | Database ? ? ? ? ? | ? ? +--------------------+ ? ? | information_schema | ? ? | mysql ? ? ? ? ? ? ?| ? ? | performance_schema | ? ? | zabbix ? ? ? ? ? ? | ? ? +--------------------+
3安裝WEB
Zabbix 3.0對PHP的要求最低為5.4,而CentOS6默認為5.3.3,完全不滿足要求,故需要利用第三方源,將PHP升級到5.4以上,注意,不支持PHP7
ssh登錄您的CentOS6 x64系統,使用root用戶運行以下命令
git?clone?https://github.com/zabbixcn/zabbix3.0-rpm.git
cd??zabbix3.0-rpm/RPMS
rpm?-ivh?http://repo.webtatic.com/yum/el6/latest.rpm
yum?install?zabbix-web-mysql-3.0.0-1.el6.noarch.rpm?zabbix-web-3.0.0-1.el6.noarch.rpm?httpd?php56w?php56w-gd?php56w-mysql php56w-bcmath?php56w-mbstring?php56w-xml?php56w-ldap
sed?-i?"s@#?php_value?date.timezone?Europe/Riga@php_value?date.timezone?Asia/Shanghai@g"?/etc/httpd/conf.d/zabbix.conf
/etc/init.d/httpd restart
cd?/usr/share/zabbix-server-mysql-3.0.0
zcat?create.sql.gz?|?mysql?-uzabbix?-pzabbix?zabbix
4安裝Zabbix-Server
yum ?localinstall ?zabbix-server-mysql-3.0.0-1.el6.x86_64.rpm vi /etc/zabbix/zabbix_server.conf DBHost=localhost DBName=zabbix DBUser=zabbix DBPassword=zabbix
/etc/init.d/zabbix-server?restart 如果一切正常,日志會如下:
5配置WEB
??http://${IP}/zabbix和之前版本一樣,此處不再詳解!
本文轉自it你好 51CTO博客,原文鏈接:http://blog.51cto.com/itnihao/1742701,如需轉載請自行聯系原作者