#下载安装资源:
wget https://repo.zabbix.com/zabbix/4.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_4.2-1+xenial_all.deb
dpkg -i zabbix-release_4.2-1+xenial_all.deb
apt update
#安装server\proxy\frontend
apt install zabbix-server-mysql
apt install zabbix-proxy-mysql
apt install zabbix-frontend-php
#创建数据库
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;
#导入数据
zcat /usr/share/doc/zabbix-server-mysql/create.sql.gz | mysql -uzabbix -p zabbix
#配置 Zabbix server/proxy 数据库信息
vi /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=<password>
#配置时区
vi /etc/zabbix/apache.conf
php_value date.timezone Aisa/Shanghai
#开启 Zabbix server process
service zabbix-server start
update-rc.d zabbix-server enable
#开启 Zabbix proxy process