Centos8下安装Zabbix5.0教程

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

三、安装zabbix5.0源

rpm -Uvh https://repo.zabbix.com/zabbix/5.1/rhel/8/x86_64/zabbix-release-5.1-1.el8.noarch.rpm
#官方5.1的源
rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/8/x86_64/zabbix-release-5.0-1.el8.noarch.rpm
#官方5.0的源
dnf clean all                        *清理yum缓存

四、安装zabbix5.0服务端和客户端

dnf install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-agent

#五、安装CentOS SCLo RH存储库:
安装 Software Collections,便于后续安装高版本的 php

dnf install centos-release-scl

编辑配置文件

vi /etc/yum.repos.d/zabbix.repo

image.png

六、配置数据库

1.安装MariaDB

dnf install -y mariadb-server    # yum安装MariaDB
systemctl start mariadb.service    #启动mariadb
systemctl enable mariadb.service   #设置开机启动
mysqladmin -uroot password '********';    #创建管理员密码   *自己更改

2.创建初始数据库

 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;

3.导入初始架构和数据

zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix

提示输入的密码为:password
mysql> create user zabbix@localhost identified by 'password';


4.Zabbix server配置数据库

vi /etc/zabbix/zabbix_server.conf
image.png

七、安装配置PHP

dnf install -y php

vi /etc/opt/php-fpm.d/zabbix.conf


image.png

八、启动Zabbix5.0

systemctl restart zabbix-server zabbix-agent httpd rh-php72-php-fpm
systemctl enable zabbix-server zabbix-agent httpd rh-php72-php-fpm

九、配置向导

image.png

和zabbix4相同,不再累述

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


image.png

还是字体问题
查看配置文件


image.png

复制windowns系统下面 仿宋字体文件到 /usr/share/zabbix/assets/fonts/
改名为:graphfont.ttf
刷新页面,字体正常
image.png
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。