- OS:CentOS 7.2 64bit
- Zabbix版本:3.4.12
- MySQL版本:8.1
注意:zabbix3.0相关要求 mysql5.0以上版本、apache1.3以上版本、php5.4以上版本。
版本选择
注意:zabbix3.0相关要求 mysql5.0以上版本、apache1.3以上版本、php5.4以上版本。
[root@zabbix ~]# systemctl stop firewalld.service [root@zabbix ~]# setenforce 0 setenforce: SELinux is disabled
[root@zabbix ~]# rpm -vhi
[root@zabbix ~]# yum install -y zabbix-server-mysql zabbix-web-mysql
zabbix~]# rpm -ivh
zabbix ~]# yum install -y mysql-community-server
zabbix~]# systemctl start mysqld
zabbix~]# /sbin/chkconfig mysqld on #开机启动
zabbix ~]# mysql_secure_installation #初始化数据库信息
[root@~]# mysql -uroot -p ... mysql> create database zabbix character set utf8 collate utf8_bin; Query OK, 1 row affected (0.00 sec) mysql> grant all privileges on zabbix.* to 'zabbix'@'localhost' identified by 'zabbix'; Query OK, 0 rows affected (0.00 sec) mysql> flush privileges; Query OK, 0 rows affected (0.01 sec)zabbix
[root@zabbix zabbix-server-mysql-3.4.12]# zcat /usr/share/doc/zabbix-server-mysql-3.4.12/create.sql.gz | mysql zabbix -uzabbix -pzabbix
[root@zabbix# grep ^DB /etc/zabbix/zabbix_server.conf
DBHost=localhost DBName=zabbix DBUser=zabbix DBPassword=zabbix
php_value post_max_size 16M php_value upload_max_filesize 2M php_value max_input_time 300 php_value always_populate_raw_post_data -1 php_value date.timezone Asia/Shanghai
[root@zabbix ~]# systemctl enable httpd [root@zabbix ~]# netstat -an |grep 80 tcp 0 0 192.168.56.11:80 0.0.0.0:* LISTEN [root@zabbix ~]# systemctl start zabbix-server [root@zabbix ~]# systemctl enable zabbix-server