The previous article has introduced how to install centos7 on vbox. Now you can install zabbix on the virtual machine. I am using yum installation now, and I will learn about the compilation and installation when I have time.
1. Install zabbix source
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6 .repo curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6 .repo rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm
2. Install zabbix
yum install -y zabbix-server-mysql zabbix-web-mysql
3. Install the Maya database, and create the import data (the directory of the import data will have some differences depending on the version)
yum install -y mariadb-server
systemctl start mariadb.service
mysql -e 'create database zabbix character set utf8 collate utf8_bin;' mysql -e 'grant all privileges on zabbix.* to zabbix@localhost identified by "zabbix";'
zcat /usr/share/doc/zabbix-server-mysql-3.0.15/create.sql.gz|mysql -uzabbix -pzabbix zabbix
4. Configure zabbixserver to connect to mysql
sed -i.ori '115a DBPassword=zabbix' /etc/zabbix/zabbix_server.conf
5. Add time zone
sed -i.ori '18a php_value date.timezone Asia/Shanghai' /etc/httpd/conf.d/zabbix.conf
6. Solve Chinese garbled characters
yum -y install wqy-microhei-fonts \cp /usr/share/fonts/wqy-microhei/wqy-microhei.ttc /usr/share/fonts/dejavu/DejaVuSans.ttf
7. The version of gnutls.x86_64 (gnutls.x86_64 3.3.8-14.el7_2 ) in Centos7 is too high and needs to be downgraded to 3.1.18-8.el7 (1.20) https://www.cnblogs.com/liushen/p/5775857 .html
wget ftp://mirror.switch.ch/pool/4/mirror/scientificlinux/7.0/x86_64/os/Packages/gnutls-3.1.18-8.el7.x86_64.rpm
rpm -Uvh --force gnutls-3.1.18-8.el7.x86_64.rpm
8. Start the service
systemctl start zabbix-server
systemctl start httpd
9. Visit http://192.168.137.123/zabbix