https://www.zabbix.com/download?zabbix=5.0&os_distribution=centos&os_version=8&db=mysql&ws=nginx
配置zabbix源
rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/8/x86_64/zabbix-release-5.0-1.el8.noarch.rpm
dnf clean all
安装zabbix相关包
dnf install zabbix-server-mysql zabbix-web-mysql zabbix-nginx-conf zabbix-agent
安装配置MySQL
yum install mysql-server
systemctl start mysqld.service
create database zabbix character set utf8 collate utf8_bin;
create user zabbix@localhost identified by 'zabbix';
grant all privileges on zabbix.* to zabbix@localhost;
quit;
导入zabbix数据库
zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix
配置zabbix连接MySQL
vim /etc/zabbix/zabbix_server.conf
DBPassword=zabbix
配置nginx for zabbix
vim /etc/nginx/conf.d/zabbix.conf
listen 80;
server_name zabbix.wuxingge.com;
配置php for zabbix
vim /etc/php-fpm.d/zabbix.conf
php_value[date.timezone] = Asia/Shanghai
启动 nginx 、php-fpm、zabbix
systemctl restart nginx php-fpm
systemctl restart zabbix-server zabbix-agent
配置hosts解析
x.x.x.x zabbix.wuxingge.com
web访问
http://zabbix.wuxingge.com
zabbix图形乱码问题处理
yum install wqy-microhei-fonts
\cp /usr/share/fonts/wqy-microhei/wqy-microhei.ttc /usr/share/fonts/dejavu/DejaVuSans.ttf