一、关闭防火墙:
systemctl stop firewalld.service #停止firewalld服务
systemctl disable firewalld.service #设置开机默认不启动
二、关闭selinux
getenforce #查看状态
vim /etc/sysconfig/selinux #开机不启动
SELINUX=disabled
生产环境单独在防火墙上开启端口和策略
三、安装zabbix5.0源
rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
yum clean all *清理yum缓存
四、安装zabbix5.0服务端和客户端
yum install zabbix-server-mysql zabbix-agent #国外源安装可能比较慢或者出错,多试几次
五、安装CentOS SCLo RH存储库:
yum install centos-release-scl
编辑配置文件 /etc/yum.repos.d/zabbix.repo

六、配置数据库
1.安装MariaDB
yum install -y mariadb-server # yum安装MariaDB
systemctl start mariadb.service #启动mariadb
systemctl enable mariadb.service #设置开机启动
mysqladmin -uroot password '********'; #创建管理员密码 *自己更改
2.创建初始数据库
mysql -uroot -p
password
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> create user zabbix@localhost identified by 'password';
mysql> grant all privileges on zabbix.* to zabbix@localhost;
mysql> quit;
3.导入初始架构和数据
zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix
提示输入的密码为:password
mysql> create user zabbix@localhost identified by 'password';
4.Zabbix server配置数据库
vim /etc/zabbix/zabbix_server.conf

七、配置PHP
vim /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf

八、启动Zabbix5.0
systemctl restart zabbix-server zabbix-agent httpd rh-php72-php-fpm
systemctl enable zabbix-server zabbix-agent httpd rh-php72-php-fpm
九、配置向导

和zabbix4相同,不再累述
附:
web界面设置为中文乱码解决

还是字体问题
查看配置文件

复制windowns系统下面 仿宋字体文件到 /usr/share/zabbix/assets/fonts/
改名为:graphfont.ttf
刷新页面,字体正常

网友评论