rpm -ivh http://repo.mysql.com/yum/mysql-5.6-community/el/7/x86_64/mysql-community-release-el7-5.noarch.rpm
yum install -y mysql-community-server
vim /etc/my.cnf
[mysqld]
skip_name_resolve = ON 禁止主机名解析
innodb_file_per_table = ON 启用innodb存储引擎
systemctl start mysqld
systemctl enable mysqld
mysql_secure_installation
根据提示输入root用户的密码,用户mysql登录
# mysql -uroot -p
password
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by ‘password‘;
mysql> quit;
rpm -Uvh https://repo.zabbix.com/zabbix/4.4/rhel/7/x86_64/zabbix-release-4.4-1.el7.noarch.rpm
yum install zabbix-server-mysql zabbix-agent
yum install zabbix-web-mysql zabbix-nginx-conf
zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix
配置连接数据库相关参数
编辑nginx配置文件/etc/nginx/conf.d/zabbix.conf
编辑php配置文件 /etc/php-fpm.d/zabbix.conf
php_value[date.timezone] = Asia/Shanghai
systemctl restart zabbix-server zabbix-agent nginx php-fpm
systemctl enable zabbix-server zabbix-agent nginx php-fpm
原文:https://www.cnblogs.com/zoer/p/13019208.html