Zabbix6安装教程


####一、Centos8 为最小安装模式

  • 关闭防火墙

    • systemctl stop firewalld.service #停止firewalld服务
    • systemctl disable firewalld.service #设置开机默认不启动
  • 或者生产环境单独在防火墙上开启端口和策略

    • firewall-cmd –permanent –zone=public –add-port=80/tcp
    • firewall-cmd –reload
      ####二、关闭selinux
  • getenforce #查看状态
    vi /etc/sysconfig/selinux #开机不启动
    SELINUX=disabled
    ####三、安装zabbix6.0源

  • rpm -Uvh https://repo.zabbix.com/zabbix/6.0/rhel/8/x86_64/zabbix-release-6.0-1.el8.noarch.rpm

  • dnf clean all *清理yum缓存
    ####四、安装zabbix6.0服务端和客户端

  • dnf install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-sql-scripts zabbix-selinux-policy zabbix-agent -y

    如果提示:错误:为仓库 ‘appstream’ 下载元数据失败 : Cannot prepare internal mirrorlist: No URLs in mirrorlist
    请更换centos8的源

####五、配置数据库

  • 1.安装MariaDB
    注意:MariaDB要10.5以上版本,不然会不能启动

  • 2.新建一个 MariaDB.repo
    MariaDB 10.5 CentOS repository list - created 2022-02-21 03:48 UTC
    https://mariadb.org/download/
    [mariadb]
    name = MariaDB
    baseurl = https://ftp.ubuntu-tw.org/mirror/mariadb/yum/10.5/centos8-amd64
    module_hotfixes=1
    gpgkey=https://ftp.ubuntu-tw.org/mirror/mariadb/yum/RPM-GPG-KEY-MariaDB
    gpgcheck=1
    放到 /etc/yum.repos.d/

  • 3.创建初始数据库
    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;

  • 4.导入初始架构和数据
    zcat /usr/share/doc/zabbix-sql-scripts/mysql/server.sql.gz | mysql -uzabbix -p zabbix
    提示输入的密码为:password
    mysql> create user zabbix@localhost identified by ‘password’;

  • 5.Zabbix server配置数据库
    vi /etc/zabbix/zabbix_server.conf

    ####六、启动Zabbix
    systemctl restart zabbix-server zabbix-agent httpd php-fpm
    systemctl enable zabbix-server zabbix-agent httpd php-fpm

####七、配置向导

和zabbix5相同,不再累述

web界面设置为中文乱码解决


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


文章作者:
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 !
  目录