zabbix4.4安装(简洁易懂)

1 配置yum源 zabbix.repo

[root@localhost ~]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# vim zabbix.repo
[root@localhost yum.repos.d]# cat zabbix.repo
[zabbix]
name=Zabbix Official Repository - $basearch
baseurl=http://mirrors.aliyun.com/zabbix/zabbix/4.4/rhel/7/$basearch/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591

[zabbix-debuginfo]
name=Zabbix Official Repository debuginfo - $basearch
baseurl=http://mirrors.aliyun.com/zabbix/zabbix/4.4/rhel/7/$basearch/debuginfo/
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591
gpgcheck=0

[zabbix-non-supported]
name=Zabbix Official Repository non-supported - $basearch
baseurl=http://mirrors.aliyun.com/zabbix/non-supported/rhel/7/$basearch/
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX
gpgcheck=0

2 安装zabbix 相关组件

[root@localhost ~]# yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-agent mariadb mariadb-server 

启动数据库

[root@localhost yum.repos.d]# systemctl enable mariadb #开机自启
[root@localhost yum.repos.d]# systemctl start mariadb

登录mysql
character set utf8 collate utf8_bin:数据库字符集和一个数据库校对规则

MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin; # 创建一个数据库
MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';
MariaDB [(none)]> flush privileges;
MariaDB [(none)]> quit

导入zabbix初始数据库

[root@localhost yum.repos.d]# zcat /usr/share/doc/zabbix-server-mysql-4.4.7/create.sql.gz | mysql -uzabbix -pzabbix zabbix

编辑zabbix-server配置文件,配置数据库信息

[root@localhost yum.repos.d]# cat /etc/zabbix/zabbix_server.conf | grep "^DB"
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix

启动所有服务

[root@localhost yum.repos.d]# systemctl enable httpd zabbix-server zabbix-agent
[root@localhost yum.repos.d]#  systemctl start httpd zabbix-server zabbix-agent

查看相关端口是否监听:

[root@localhost yum.repos.d]# ss -ntlp | grep 80
[root@localhost yum.repos.d]# ss -ntlp | grep 10050 #server监听
[root@localhost yum.repos.d]# ss -ntlp | grep 10051 #client监听

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

[root@localhost yum.repos.d]# cat /etc/php.ini | grep -w "date.timezone"
; http://php.net/date.timezone
date.timezone = Asia/Shanghai

重启apache

[root@localhost yum.repos.d]# systemctl restart httpd

刷新
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
使用默认管理员登录

账号:Admin 大写的

密码:zabbix
修改语言
在这里插入图片描述
修改中文乱码

/usr/share/zabbix/assets/fonts
[root@localhost fonts]# ll
总用量 0
lrwxrwxrwx. 1 root root 33 4月   8 12:11 graphfont.ttf -> /etc/alternatives/zabbix-web-font
[root@localhost fonts]# rm -rf graphfont.ttf
[root@localhost fonts]# mv /root/simkai.ttf ./
[root@localhost fonts]# mv simkai.ttf graphfont.ttf
[root@localhost fonts]# chmod -R 644 graphfont.ttf

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

云原生解决方案

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

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

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

打赏作者

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

抵扣说明:

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

余额充值