centos8安装zabbix5.0 lts

环境:CentOS-8.1.1911-x86_64 Minimal
架构组合:MySQL8.0+NGINX1.14+PHP7.2

关闭Selinux

#setenforce 0
#getenforce
Permissive
#vim /etc/selinux/config
SELINUX=disable

安装 数据库

# 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 server,Web前端,agent

# dnf install zabbix-server-mysql zabbix-web-mysql zabbix-nginx-conf zabbix-agent

创建初始数据库

# yum -y install @mysql:8.0
# systemctl start mysqld
# 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; 

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

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

为Zabbix server配置数据库,编辑配置文件 /etc/zabbix/zabbix_server.conf

DBPassword=password

为Zabbix前端配置PHP

编辑配置文件 /etc/nginx/conf.d/zabbix.conf, uncomment and set ‘listen’ and ‘server_name’ directives.

 listen 80;
 server_name example.com; //ip 或 域名

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

php_value[date.timezone] = Asia/Shanghai

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

# systemctl restart zabbix-server zabbix-agent nginx php-fpm
# systemctl enable zabbix-server zabbix-agent nginx php-fpm 

防火墙打开80端口

#firewall-cmd --permanent --zone=public --add-port=80/tcp
# firewall-cmd --reload

配置Zabbix前端

连接到新安装的Zabbix前端: http://server_ip_or_name
根据Zabbix文件里步骤操作: Installing frontend

zabbix5.0安装后不能更改到中文出现You are not able to choose some of the languages, because locales for them are
参考zabbix5.0安装中文选项办法

监控图片中文乱码处理办法

你可能感兴趣的:(centos8安装zabbix5.0 lts)