您的位置:首页 > 运维架构 > Linux

zabbix for centos8

2019-09-26 12:27 2056 查看
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。 本文链接:https://blog.csdn.net/wuxingge/article/details/101433401

安装zabbix-release

rpm -ivh https://repo.zabbix.com/zabbix/4.0/rhel/8/x86_64/zabbix-release-4.0-2.el8.noarch.rpm
dnf clean all

安装Zabbix server,Web前端,agent

dnf -y install zabbix-server-mysql zabbix-web-mysql zabbix-agent

创建初始数据库

mysql -uroot -p
password
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> create user zabbix@localhost identified by 'zabbix';
mysql> grant all privileges on zabbix.* to zabbix@localhost;
mysql> quit;

导入初始架构和数据,系统将提示您输入新创建的密码。

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

为Zabbix server配置数据库

编辑配置文件 /etc/zabbix/zabbix_server.conf

DBPassword=zabbix

为Zabbix前端配置PHP

编辑配置文件 /etc/php-fpm.d/zabbix.conf, uncomment and set the right timezone for you.

; php_value[date.timezone] = Europe/Riga

启动Zabbix server和agent进程

启动Zabbix server和agent进程,并为它们设置开机自启

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

现在您的Zabbix server已经安装完成并开始运行

配置Zabbix前端
连接到新安装的Zabbix前端:
http://server_ip_or_name/zabbix
This is the Zabbix “Welcome” screen. Enter the user name Admin with password zabbix to log in as a Zabbix superuser.

zabbix web连接数据库配置

/etc/zabbix/web/zabbix.conf.php

中文乱码问题

yum install wqy-microhei-fonts
\cp /usr/share/fonts/wqy-microhei/wqy-microhei.ttc /usr/share/fonts/dejavu/DejaVuSans.ttf
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: