rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
yum install zabbix-server-mysql zabbix-agent -y
yum install centos-release-scl -y
vim /etc/yum.repos.d/zabbix.repo
yum install zabbix-web-mysql-scl zabbix-nginx-conf-scl -y --skip-broken
yum install mariadb-server -y
systemctl start mariadb.service
systemctl enable mariadb.service
create database zabbix character set utf8 collate utf8_bin;
grant all on zabbix.* to zabbix@localhost identified by 'zabbix';
rpm -ql grep zabbix-server-mysql
zcat /usr/share/doc/zabbix-server-mysql-5.0.21/create.sql.gz > zabbix.sql
mysql -uzabbix -pzabbix < zabbix.sql
use zabbix;
show tables;
vim /etc/zabbix/zabbix_server.conf
vim /etc/opt/rh/rh-nginx116/nginx/conf.d/zabbix.conf
vim /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf
vim /etc/opt/rh/rh-nginx116/nginx/nginx.conf
因为修改nginx的配置文件监听localhost,端口和nginx的住配置文件冲突,注释nginx配置文件的38-80行,批量注释方式,先ctrl+v按下下键选择要注释行,按大写I,在输入#,之后按esc,保存退出
systemctl start zabbix-server zabbix-agent rh-nginx116-nginx.service rh-php72-php-fpm.service
systemctl enable zabbix-server zabbix-agent rh-nginx116-nginx.service rh-php72-php-fpm.service
(20)网页访问zabbix
默认账号密码
账号:Admin
密码:zabbix