wget https://mirrors.aliyun.com/zabbix/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm
rpm -ivh zabbix-release-3.0-1.el7.noarch.rpm
yum -y install zabbix-server zabbix-server-mysql zabbix-web zabbix-web-mysql;
sed -i "s@^#ServerName www.example.com:80@ServerName localhost:80@g" /etc/httpd/conf/httpd.conf
sed -i "s@# php_value date.timezone Europe/Riga@php_value date.timezone Asia/Shanghai@g" /etc/httpd/conf.d/zabbix.conf
systemctl start httpd
^start^enable
yum -y install mariadb-server mariadb
systemctl start mariadb
systemctl enable mariadb
mysql_secure_installation
mysql -uroot -pmariadb00 -e "create database zabbix character set utf8 collate utf8_bin;grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix00';"
zcat /usr/share/doc/zabbix-server-mysql-3.0.19/create.sql.gz | mysql -uzabbix -pzabbix00 zabbix
mysql -uzabbix -pzabbix00 -e "use zabbix;show tables;" | wc -l
sed -ir -e "s@^# DBHost=.*@DBHost=localhost@g"
-e "s@^# DBPassword=.*@DBPassword=zabbix00@g"
-e "s@^DBName=.*@DBName=zabbix@g"
-e "s@DBUser=.*@DBUser=zabbix@g" /etc/zabbix/zabbix_server.conf
systemctl start zabbix-server
^start^enable
systemctl start httpd
^start^enable