5.0 版本对基础环境的要求有?的变化,最?的就是对 php 版本的要求,最低要求 7.2.0 版本,对 php 扩展组件版本也有要求,详?官??档 https://www.zabbix.com/documentation/current/manual/installatio n/requirements
服务器准备
准备好?台linux服务器,ip地址,初始化后,设置如下 
1.获取zabbix官?源
rpm -Uvh https://mirrors.aliyun.com/zabbix/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
 替换zibbix源为阿里云地址
sed -i 's#http://repo.zabbix.com#https://mirrors.aliyun.com/zabbix#' /etc/yum.repos.d/zabbix.repo
chmod +x /etc/yum.repos.d/zabbix.repo
/etc/yum.repos.d/zabbix.repo
yum clean all
2.安装zabbix server和agent
yum install zabbix-server-mysql zabbix-agent -y

3.安装 Software Collections
便于后续安装?版本的 php,默认 yum 安装的 php 版本为 5.4 过低。 SCL(Software Collections)可以让你在同?个操作系统上安装和使?多个版本的软件,?不会影响整个系统的安装包。 软件包会安装在/opt/rh?录下 为了避免系统?泛冲突,/opt/rh包安装在?录中,例如,这允许你在CentOS 7机器上安装Python 3.5,?不会删除或?扰Python 2.7. /etc/opt/rh/软件包的所有配置?件都存储在?录中相应的?录中,SCL包提供了定义使?所包含应?程序所需的环境变量的shell脚本,例如,PATH,LD_LIBRARY_PATH和MANPATH ,这些脚本存储在?件系统中,作为 /opt/rh/package-name/enable 。
yum install centos-release-scl -y

4.修改zabbix前端源
vim /etc/yum.repos.d/zabbix.repo

5.安装zabbix前端环境
yum install zabbix-web-mysql-scl zabbix-apache-conf-scl -y

6.安装zabbix所需的数据库,直接?centos7?带的mariadb
yum install mariadb-server -y

7.启动数据库,且配置开机启动
systemctl enable --now mariadb

8.初始化mariadb,设置root密码并按需设置

9.使?root?户登录mariadb,建?zabbix数据库,这?的编码设置,?常重要,否则zabbix?法安装
mysql -uroot -p
create database zabbix character set utf8 collate utf8_bin;
create user zabbix@localhost identified by 'xuyuhan';
grant all privileges on zabbix.* to zabbix@localhost;
flush privileges;
quit;

10.使?以下命令导? zabbix 数据库,zabbix 数据库?户为 zabbix,输入自己的密码
zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix

11.修改 zabbix server 配置?件/etc/zabbix/zabbix_server.conf ?的数据库密码
vim /etc/zabbix/zabbix_server.conf

grep '^DBPassword' /etc/zabbix/zabbix_server.conf

12.修改 zabbix 的 php 配置?件 /etc/opt/rh/rh-php72/php- fpm.d/zabbix.conf ?的时区
vim /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf
php_value[date.timezone] = Asia/Shanghai  修改完
grep 'timezone' /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf

13.启动相关服务
systemctl restart zabbix-server zabbix-agent httpd rh-php72-php-fpm
systemctl enable zabbix-server zabbix-agent httpd rh-php72-php-fpm

14.访问zabbix??
以上安装无误后默认访问地址为 IP地址/zabbix/index.php 自动跳转
http://192.168.230.205/zabbix/setup.php       登录账号为 Admin,密码:zabbix,注意??写    记错密码了哈哈
15.忘记密码
解决方案: 1、进入zabbix服务器,连接到mysql数据库
mysql -uroot -p

2、进入mysql数据库后,查询users表
use zabbix

select * from users;
 这里就可以看到当前zabbix用户有哪些了,如果忘记用户名就可以在这里查看,如需修改密码可以另外找文章~
|