Zabbix6.2安装部署:
一. 安装CentOS8 操作系统,按照最小方式安装即可。
cd /etc/yum.repos.d/
mkdir abc
mv /etc/yum.repos.d/C* abc
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-8.repo
sed -i -e ‘/mirrors.cloud.aliyuncs.com/d’ -e ‘/mirrors.aliyuncs.com/d’ /etc/yum.repos.d/CentOS-Base.repo
yum makecache
systemctl stop firewalld && systemctl disable firewalld
sed -i ‘s/SELINUX=enforcing/SELINUX=disabled/g’ /etc/selinux/config
cat /etc/selinux/config
setenforce 0
yum install -y vim wget net-tools bash-completion yum-utils lrzsz
vi mariadb.repo
# MariaDB 10.8 CentOS repository list - created 2022-08-07 09:50 UTC
# https://mariadb.org/download/
[mariadb]
name = MariaDB
baseurl = https://mirrors.gigenet.com/mariadb/yum/10.8/centos8-amd64
module_hotfixes=1
gpgkey=https://mirrors.gigenet.com/mariadb/yum/RPM-GPG-KEY-MariaDB
gpgcheck=1
:wq
sudo dnf install MariaDB-server -y
sudo systemctl start mariadb
Rpm -Uvh https://repo.zabbix.com/zabbix/6.2/rhel/8/x86_64/zabbix-release-6.2-1.el8.noarch.rpm
dnf clean all
dnf module switch-to php:7.4
dnf install zabbix-server-mysql zabbix-web-mysql zabbix-nginx-conf zabbix-sql-scripts zabbix-selinux-policy zabbix-agent
mysql -uroot -p
mysql> create database zabbix character set utf8mb4 collate utf8mb4_bin;
mysql> create user zabbix@localhost identified by ‘password’;
mysql> grant all privileges on zabbix.* to zabbix@localhost;
mysql> SET GLOBAL log_bin_trust_function_creators = 1;
mysql> quit;
zcat /usr/share/doc/zabbix-sql-scripts/mysql/server.sql.gz | mysql -uzabbix -p Zabbix
输入密码:password
mysql -uroot -p
mysql> SET GLOBAL log_bin_trust_function_creators = 0;
mysql> quit;
vi /etc/zabbix/zabbix_server.conf
DBPassword=password
Vi /etc/nginx/conf.d/zabbix.conf
listen 80;
server_name 10.8.2.23;
:wq
systemctl restart zabbix-server zabbix-agent nginx php-fpm
systemctl enable zabbix-server zabbix-agent nginx php-fpm
谷歌浏览器打开:http://10.8.2.23
最后上传字库simkai.ttf,找到这个字库(在windows的C盘搜索就可以找到)
上传到这个路径: cd /usr/share/zabbix/assets/fonts
上传完后之后,修改simkai.ttf权限
chmod 777 simkai.ttf
修改默认软连接的字符集
cd /etc/alternatives/
ll
rm -f /etc/alternatives/zabbix-web-font #删除默认软链接的字符集
ln -s /usr/share/zabbix/assets/fonts/simkai.ttf /etc/alternatives/zabbix-web-font #指向新安装的字符集
重启zabbix服务器
systemctl restart zabbix-server
完毕。