安装zabbix
设置清华软件源
rpm -ivh https://mirrors.tuna.tsinghua.edu.cn/zabbix/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm

查看源
cd /etc/yum.repos.d/
编辑源

vi zabbix.repo
name=Zabbix Official Repository - $basearch
baseurl=http://mirrors.tuna.tsinghua.edu.cn/zabbix/zabbix/4.0/rhel/7/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591
[zabbix-non-supported]
name=Zabbix Official Repository non-supported - $basearch
baseurl=http://mirrors.tuna.tsinghua.edu.cn/zabbix/non-supported/rhel/7/$basearch/
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX
gpgcheck=1
更新运行yum
yum makecache fast
安装服务端
yum install-y zabbix-server-mysql zabbix-web-mysql zabbix-agent mariadb-server
重启mariadb
systemctl start mariadb
进去mysql 修改密码
mysql_secure_installation
导入建表语句
查找 rpm -ql zabbix-server-mysql

进入数据库,创建数据库
create database zabbix charactersetutf8 collate utf8_bin;
zabbix用户授权
grant all privileges on zabbix.*to zabbix@localhost identified by'zabbix';
刷新权限表
flush privileges;
zcat /usr/share/doc/zabbix-server-mysql-4.0.15/create.sql.gz|mysql -uzabbix -pzabbix zabbix

进入zabbix用户查看数据
user zabbix;
show tables;

修改zabbix配置文件
vim /etc/zabbix/zabbix_server.conf


启动zabbix服务
systemctl start zabbix-server.service
启动httpd
systemctl start httpd
查看端口
netstat -lntup
可以登录
10.0.0.10/zabbix
修改时区
vim /etc/httpd/conf.d/zabbix.conf

重启httpd
systemctl restart httpd
用户Admin 密码:zabbix