1 安装阿里云yum配置文件
rpm -ivh
https://mirrors.aliyun.com/zabbix/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm
2 安装zabbix-server、zabbix-agent、mariadb
yum install zabbix-server zabbix-get zabbix-agent zabbix-web zabbix-server-mysql zabbix-web-mysql mariadb-server mariadb -y
3 修改php时区
sed -i 's@# php_value date.timezone Europe/Riga@php_value date.timezone Asia/Shanghai@g' /etc/httpd/conf.d/zabbix.conf
4 创建zabbix数据库
启动mariadb,并创建zabbix数据库。
systemctl start mariadb
mysql
MariaDB [(none)]> create database zabbix character set uft8 collate utf8_bin;
ERROR 1115 (42000): Unknown character set: 'uft8'
MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin;
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> grant all on zabbix.* to zabbix@'localhost' identified by '123456';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> exit;
cd /usr/share/doc/zabbix-server-mysql-3.2.6/
zcat create.sql.gz|mysql -uzabbix -p123456 zabbix
5 修改zabbix配置
修改zabbix数据库密码
sed -i '116a DBPassword=123456' /etc/zabbix/zabbix_server.conf
6 启动zabbix和httpd
systemctl start zabbix-server
systemctl start zabbix-agent
systemctl start httpd
7 web界面安装
浏览器中输入
http://192.168.10.60/zabbix/setup.php就可以出现界面了