基於Yum安裝zabbix3.0

一、安裝環境介紹

操作系統:CentOS6.5

Mysql: 5.1

php: 官方要求5.4以上,php7暫不支持,本文選擇使用php5.6

Apache: httpd2.2

zabbix: 3.0


二、安裝httpd

yum -y install httpd httpd-devel


三、安裝php

a.添加repo源(二選一)

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm

rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm


b.安裝php及相關組件

yum install  php56w php56w-cli php56w-common php56w-devel php56w-pear php56w-gd php56w-mbstring php56w-mysql php56w-xml php56w-bcmath



四、安裝mysql

yum -y install mysql-server mysql


啓動數據庫並設置密碼

service mysqld start

/usr/bin/mysqladmin -u root password '123456'


五、安裝zabbix

a.添加repo源

vi /etc/yum.repo.d/zabbix.repo

[zabbix]

name=Zabbix Official Repository - $basearch

baseurl=http://repo.zabbix.com/zabbix/3.0/rhel/6/$basearch/

enabled=1

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX

[zabbix-non-supported]

name=Zabbix Official Repository non-supported - $basearch

baseurl=http://repo.zabbix.com/non-supported/rhel/6/$basearch/

enabled=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX

gpgcheck=1


b.安裝相關組件

yum install OpenIPMI libssh2 fping libcurl libiksemel net-snmp


c.安裝zabbix

yum install -y zabbix-release.noarch

yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent zabbix-java-gateway


d.創建初始化數據庫

mysql> create database zabbix character set utf8 collate utf8_bin; 

mysql> grant all privileges on zabbix.* to zabbix@localhost identified by '<password>'; 

mysql> quit;

zcat /usr/share/doc/zabbix-server-mysql-3.0.*/create.sql.gz | mysql -uzabbix -p zabbix


e.修改zabbix配置文件

# vi /etc/zabbix/zabbix_server.conf 

DBHost=localhost 

DBName=zabbix 

DBUser=zabbix 

DBPassword=<password>


六、啓動zabbix-server

service zabbix-server start


七、添加httpd的zabbix.conf文件

cp /usr/share/doc/zabbix-web-3.0.7/httpd22-example.conf /etc/httpd/conf.d/zabbix.conf

修改文件裏的date.timezone Asia/ShangHai


重啓httpd服務

service httpd restart


訪問

http://172.0.0.1/zabbix

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章