服务器操作系统版本:
[root@host-137 ~]# cat /etc/redhat-release
CentOS Linux release 7.7.1908 (Core)
关闭防火墙
systemctl stop firewalld
开机禁用防火墙自启
systemctl disable firewalld
设置临时关闭selinux
setenforce 0
设置永久关闭selinux
vim /etc/sysconfig/selinux
将第7行内容修改如下
修改完成之后使用 reboot
命令重启服务器即可开始zabbix的安装
官网地址>> https://www.zabbix.com/download
查看上传成功
[root@host-136 ~]# ll /etc/yum.repos.d/zabbix_Aliyun5.0.repo
-rw-r--r--. 1 root root 893 Jan 21 22:21 /etc/yum.repos.d/zabbix_Aliyun5.0.repo
https://download.csdn.net/download/m0_46674735/14933727
yum install -y zabbix-server-mysql zabbix-agent
yum -y install centos-release-scl
yum -y install zabbix-web-mysql-scl zabbix-nginx-conf-scl
yum -y install mariadb mariadb-server
systemctl start mariadb
设置开机自启
systemctl enable mariadb
[root@host-136 ~]# mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 2
Server version: 5.5.68-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
# 创建zabbix数据库
MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin;
Query OK, 1 row affected (0.00 sec)
# 创建zabbix用户
MariaDB [(none)]> create user zabbix@localhost identified by 'zabbix';
Query OK, 0 rows affected (0.00 sec)
#给zabbix用户授权
MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost;
Query OK, 0 rows affected (0.00 sec)
#完成退出
MariaDB [(none)]> exit
Bye
zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -pzabbix -Dzabbix
vim /etc/zabbix/zabbix_server.conf
vim /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf
vim /etc/opt/rh/rh-nginx116/nginx/conf.d/zabbix.conf
将2、3行内容修改如下
server_name 为所在主机的IP地址
将32行内容注释掉,并新增33行内容如下
vim /etc/opt/rh/rh-php72/php.ini
systemctl restart zabbix-server zabbix-agent rh-nginx116-nginx rh-php72-php-fpm
systemctl enable zabbix-server zabbix-agent rh-nginx116-nginx rh-php72-php-fpm
IP/index.php
配置zabbixAdmin
,密码默认为 zabbix
yum -y install wqy-microhei-fonts
cp /usr/share/fonts/wqy-microhei/wqy-microhei.ttc /usr/share/fonts/dejavu/DejaVuSans.ttf
y
回车即可[root@host-137 ~]# cp /usr/share/fonts/wqy-microhei/wqy-microhei.ttc /usr/share/fonts/dejavu/DejaVuSans.ttf
cp: overwrite ‘/usr/share/fonts/dejavu/DejaVuSans.ttf’? y
[root@host-137 ~]#