yum -y install mariadb mariadb-server
systemctl start mariadb (启动数据库)
mysql (进入数据库)
MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin;
MariaDB [(none)]> create user zabbix@localhost identified by 'password';
MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost;
zcat /usr/share/doc/zabbix-server-mysql-5.0.7/create.sql.gz | mysql -uzabbix -pzabbix zabbix (导入初始框架和数据)
配置zabbix-server文件
vim /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
配置php文件
vim /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf
[zabbix]
user = nginx
group = nginx
php_value[date.timezone] = Asia/Shanghai(设置时区)
vim /etc/opt/rh/rh-nginx116/nginx/conf.d/zabbix.conf
listen 80;
server_name 192.168.226.169;
#fastcgi_pass unix:/var/opt/rh/rh-php72/run/php-fpm/zabbix.sock;
fastcgi_pass 127.0.0.1:9000;