Zabbix 6.2版本一步一步教你安装(Rockylinux8.6)

环境要求:
1、Server: 192.168.3.81 监控主机
2、Agent:192.168.3.82 监控客户端
系统要求:Rockylinux8.6

一、yum 安装(zabbix+nginx+mariadb)

1、关闭selinux,firewalld

1、sed -i ‘s/SELINUX=enforcing/SELINUX=disabled/g’ /etc/selinux/config
2、systemctl disable firewalld
3、reboot

2、更改yum源为阿里云

sed -e ‘s|^mirrorlist=|#mirrorlist=|g’
-e ‘s|^#baseurl=http://dl.rockylinux.org/$contentdir|baseurl=https://mirrors.aliyun.com/rockylinux|g’
-i.bak
/etc/yum.repos.d/Rocky-*.repo

dnf makecache

vim /etc/yum.repos.d/Rocky-AppStream.repo

添加
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.5/centos8-amd64
module_hotfixes=1
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

3、配置命令补全及vim工具

dnf install -y wget bash-completion vim net-tools
dnf update -y

4、安装zabbix源

rpm -Uvh https://repo.zabbix.com/zabbix/6.2/rhel/8/x86_64/zabbix-release-6.2-3.el8.noarch.rpm
dnf clean all

5、安装php及zabbix

dnf module switch-to php:7.4
dnf install -y zabbix-server-mysql zabbix-web-mysql zabbix-nginx-conf zabbix-sql-scripts zabbix-selinux-policy zabbix-agent

6、安装mariadb(10.5.18)

dnf install -y mariadb-server
systemctl start mariadb
systemctl enable mariadb

mysql_secure_installation
在这里插入图片描述

设置数据库密码为:password
在这里插入图片描述

注:不支持 10.5以下版本

7、初始化数据库

mysql -uroot -ppassword
create database zabbix character set utf8mb4 collate utf8mb4_bin;
create user zabbix@localhost identified by ‘password’;
grant all privileges on zabbix.* to zabbix@localhost;
set global log_bin_trust_function_creators = 1;
quit;
zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix

mysql -uroot -ppassword
set global log_bin_trust_function_creators = 0;
quit;

8、编辑配置文件

yum -y install vim

vim /etc/zabbix/zabbix_server.conf
将129行改为
DBPassword= password

vim /etc/nginx/conf.d/zabbix.conf
将前两行改为
listen 8080;
server_name 192.168.3.81;
在这里插入图片描述

9、安装中文包

1、dnf install langpacks-zh_CN.noarch # 安装zh_CN语言包
2、dnf -y install glibc-common # 安装glibc-common实现对语言包的识别

3、locale -a | grep zh_CN

zh_CN
zh_CN.gb18030
zh_CN.gbk
zh_CN.utf8

10. 启动服务并设置开机自启

1、systemctl restart zabbix-server zabbix-agent nginx php-fpm
2、systemctl enable zabbix-server zabbix-agent nginx php-fpm

11.访问页面

http://ip:8080/

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

账号:Admin 密码:zabbix

12、Zabbix 6.0 Web界面中文汉化

在这里插入图片描述
在这里插入图片描述

将字体文件拷贝到Fonts路径下备份和替换字体:

mv graphfont.ttf graphfont.ttf.bak

mv msyhbd.ttc graphfont.ttf

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

OpenClouds

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值