Centos8在线安装zabbix6

zabbix6目前是zabbix中最新的LTS版本

Posted by shrmars on March 15, 2024

一、 环境准备

  • Centos8 服务器一台

IP:192.168.181.141

需设置SELINUX=disabled,否则zabbix无法连接数据库,如下:

1
connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)

设置如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
vim /etc/selinux/config


# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these three values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected. 
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

关闭防火墙

1
2
sudo systemctl stop firewalld
sudo systemctl disable firewalld
  • Zabbix6 官方安装指南:

https://www.zabbix.com/cn/download

  • 数据库:mariadb ,版本 10.5 ,Zabbix8 限制如果使用mariadb,最低版本为10.5

二、安装zabbix-server

在192.168.181.141服务器上安装 mariadb、zabbix-server、zabbix前端。

1、安装 mariadb

zabbix6 要求mariadb版本最低为10.5,具体可参考如下。

CentOS8安装MariaDB 10.5 - Shrmars Blog

2、安装zabbix-server

此过程主要参考zabbix官方安装说明即可完成,如下:

https://www.zabbix.com/cn/download

此页面下方又详细安装步骤,一次完成即可。

完成后 访问zabbix首页即可

http://192.168.181.141:8080/

        默认用户名密码:Admin / zabbix