实验环境:Centos7.0

IP:192.168.47.140

Centos7.0 搭建Zabbix环境_搭建

关闭iptables及setenforce

Centos7.0 搭建Zabbix环境_centos_02

导入源 rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm

Centos7.0 搭建Zabbix环境_搭建_03

安装zabbix包

Centos7.0 搭建Zabbix环境_搭建_04

安装完成

Centos7.0 搭建Zabbix环境_centos_05

安装mysql源

wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm

rpm -ivh mysql-community-release-el7-5.noarch.rpm


Centos7.0 搭建Zabbix环境_搭建_06

yum install -y mysql-community-server

Centos7.0 搭建Zabbix环境_centos_07

安装完成

Centos7.0 搭建Zabbix环境_搭建_08

启动mysql服务

Centos7.0 搭建Zabbix环境_centos_09

设置mysql

mysql_secure_installation

Centos7.0 搭建Zabbix环境_搭建_10

登陆mysql

mysql -uroot -p

Centos7.0 搭建Zabbix环境_centos_11

创建相关数据库

create database zabbix character set utf8 collate utf8_bin;
grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';

Centos7.0 搭建Zabbix环境_搭建_12

切换目录 复制文件

cd /usr/share/doc/zabbix-server-mysql-3.0.13
zcat create.sql.gz | mysql -uroot -p zabbix

Centos7.0 搭建Zabbix环境_centos_13

修改配置文件

DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
vim /etc/zabbix/zabbix_server.conf

Centos7.0 搭建Zabbix环境_搭建_14

Centos7.0 搭建Zabbix环境_搭建_15

启动zabbix-server

Centos7.0 搭建Zabbix环境_搭建_16

修改zabbix配置

vim /etc/httpd/conf.d/zabbix.con
php_value date.timezone Asia/Shanghai

Centos7.0 搭建Zabbix环境_centos_17

启动http服务

systemctl start httpd

Centos7.0 搭建Zabbix环境_centos_18

访问测试

Centos7.0 搭建Zabbix环境_centos_19

Centos7.0 搭建Zabbix环境_搭建_20

Centos7.0 搭建Zabbix环境_centos_21

Centos7.0 搭建Zabbix环境_centos_22