使用Ubuntu系统管理包工具(apt)部署Zabbix企业级监控系统

时间:2023-03-09 16:35:59
使用Ubuntu系统管理包工具(apt)部署Zabbix企业级监控系统

  使用Ubuntu系统管理包工具(apt)部署Zabbix企业级监控系统 

                          作者:尹正杰

版权声明:原创作品,谢绝转载!否则将追究法律责任。

  Ubuntu系统部署笔记:https://www.cnblogs.com/yinzhengjie/p/12180899.html.

一.Zabbix监控系统概述

1>.开源监控服务介绍

  博主推荐阅读:
    https://www.cnblogs.com/yinzhengjie2020/p/12301844.html

2>.什么是zabbix监控系统

  Zabbix是一个企业级解决方案,支持实时监控数千台服务器,虚拟机和网络设备,采集百万级监控指标。

  zabbix完全开源免费。

使用Ubuntu系统管理包工具(apt)部署Zabbix企业级监控系统

3>.zabbix的官方文档

  博主推荐阅读:
    官网地址:
      https://www.zabbix.com/cn/
    zabbix 4.0 LTS(Long Term Support)中文手册:
      https://www.zabbix.com/documentation/4.0/zh/manual
    zabbix功能概述:
      https://www.zabbix.com/cn/features

二.查看zabbix的官方手册

1>.点击下载

使用Ubuntu系统管理包工具(apt)部署Zabbix企业级监控系统

2>.查看Ubuntu操作系统的安装文档

  zabbix 4.0 LTS Ubantu安装文档:
    https://www.zabbix.com/cn/download?zabbix=4.0&os_distribution=ubuntu&os_version=18.04_bionic&db=mysql&ws=apache

使用Ubuntu系统管理包工具(apt)部署Zabbix企业级监控系统

三.使用Ubuntu的管理包工具(apt)部署zabbix

1>.安装repo软件源

[root@yinzhengjie.org.cn ~]# wget https://repo.zabbix.com/zabbix/4.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_4.0-3+bionic_all.deb
---- ::-- https://repo.zabbix.com/zabbix/4.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_4.0-3+bionic_all.deb
Resolving repo.zabbix.com (repo.zabbix.com)... 162.243.159.138, :a880::::b82:
Connecting to repo.zabbix.com (repo.zabbix.com)|162.243.159.138|:... connected.
HTTP request sent, awaiting response... OK
Length: (.0K) [application/octet-stream]
Saving to: ‘zabbix-release_4.-+bionic_all.deb’ zabbix-release_4.-+bionic_all.deb %[=================================================================================================================================================================>] .97K --.-KB/s in 0s -- :: ( MB/s) - ‘zabbix-release_4.-+bionic_all.deb’ saved [/] [root@yinzhengjie.org.cn ~]#
[root@yinzhengjie.org.cn ~]#
[root@yinzhengjie.org.cn ~]# ll
total
drwx------ root root Feb : ./
drwxr-xr-x root root Jan : ../
-rw------- root root Feb : .bash_history
-rw-r--r-- root root Feb : .bashrc
drwx------ root root Jan : .cache/
drwx------ root root Jan : .gnupg/
-rw-r--r-- root root Aug .profile
drwx------ root root Jan : .ssh/
-rw------- root root Feb : .viminfo
-rw-r--r-- root root Jan : zabbix-release_4.-+bionic_all.deb
[root@yinzhengjie.org.cn ~]#

[root@yinzhengjie.org.cn ~]# wget https://repo.zabbix.com/zabbix/4.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_4.0-3+bionic_all.deb        #下载软件源

[root@yinzhengjie.org.cn ~]# ll /etc/apt/sources.list.d/
total
drwxr-xr-x root root Apr ./
drwxr-xr-x root root Jan : ../
[root@yinzhengjie.org.cn ~]#
[root@yinzhengjie.org.cn ~]# dpkg -i zabbix-release_4.-+bionic_all.deb
Selecting previously unselected package zabbix-release.
(Reading database ... files and directories currently installed.)
Preparing to unpack zabbix-release_4.-+bionic_all.deb ...
Unpacking zabbix-release (:4.0-+bionic) ...
Setting up zabbix-release (:4.0-+bionic) ...
[root@yinzhengjie.org.cn ~]#
[root@yinzhengjie.org.cn ~]# ll /etc/apt/sources.list.d/
total
drwxr-xr-x root root Feb : ./
drwxr-xr-x root root Jan : ../
-rw-r--r-- root root Jul zabbix.list
[root@yinzhengjie.org.cn ~]#
[root@yinzhengjie.org.cn ~]# cat /etc/apt/sources.list.d/zabbix.list
deb http://repo.zabbix.com/zabbix/4.0/ubuntu bionic main
deb-src http://repo.zabbix.com/zabbix/4.0/ubuntu bionic main
[root@yinzhengjie.org.cn ~]#
[root@yinzhengjie.org.cn ~]#

[root@yinzhengjie.org.cn ~]# dpkg -i zabbix-release_4.0-3+bionic_all.deb                                                #安装软件源

[root@yinzhengjie.org.cn ~]# vim /etc/apt/sources.list
[root@yinzhengjie.org.cn ~]#
[root@yinzhengjie.org.cn ~]# cat /etc/apt/sources.list
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
[root@yinzhengjie.org.cn ~]#
[root@yinzhengjie.org.cn ~]#

[root@yinzhengjie.org.cn ~]# vim /etc/apt/sources.list                                                           #更换阿里源

[root@yinzhengjie.org.cn ~]# apt update
Get: http://mirrors.aliyun.com/ubuntu bionic InRelease [242 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-security InRelease [88.7 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-updates InRelease [88.7 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-proposed InRelease [242 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-backports InRelease [74.6 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/multiverse Sources [181 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/universe Sources [9,051 kB]
Get: http://repo.zabbix.com/zabbix/4.0/ubuntu bionic InRelease [7,096 B]
Get: http://repo.zabbix.com/zabbix/4.0/ubuntu bionic/main Sources [1,178 B]
Get: http://repo.zabbix.com/zabbix/4.0/ubuntu bionic/main amd64 Packages [2,678 B]
Get: http://mirrors.aliyun.com/ubuntu bionic/main Sources [829 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/restricted Sources [5,324 B]
Get: http://mirrors.aliyun.com/ubuntu bionic/main amd64 Packages [1,019 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/main Translation-en [516 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/restricted amd64 Packages [9,184 B]
Get: http://mirrors.aliyun.com/ubuntu bionic/restricted Translation-en [3,584 B]
Get: http://mirrors.aliyun.com/ubuntu bionic/universe amd64 Packages [8,570 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/universe Translation-en [4,941 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/multiverse amd64 Packages [151 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/multiverse Translation-en [108 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-security/main Sources [142 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-security/universe Sources [166 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-security/restricted Sources [4,548 B]
Get: http://mirrors.aliyun.com/ubuntu bionic-security/multiverse Sources [3,180 B]
Get: http://mirrors.aliyun.com/ubuntu bionic-security/main amd64 Packages [636 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-security/main Translation-en [208 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-security/restricted amd64 Packages [21.2 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-security/restricted Translation-en [5,984 B]
Get: http://mirrors.aliyun.com/ubuntu bionic-security/universe amd64 Packages [644 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-security/universe Translation-en [217 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-security/multiverse amd64 Packages [6,340 B]
Get: http://mirrors.aliyun.com/ubuntu bionic-security/multiverse Translation-en [2,640 B]
Get: http://mirrors.aliyun.com/ubuntu bionic-updates/main Sources [307 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-updates/restricted Sources [6,540 B]
Get: http://mirrors.aliyun.com/ubuntu bionic-updates/universe Sources [277 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-updates/multiverse Sources [5,840 B]
Get: http://mirrors.aliyun.com/ubuntu bionic-updates/main amd64 Packages [853 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-updates/main Translation-en [298 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-updates/restricted amd64 Packages [30.2 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-updates/restricted Translation-en [7,928 B]
Get: http://mirrors.aliyun.com/ubuntu bionic-updates/universe amd64 Packages [1,048 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-updates/universe Translation-en [324 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-updates/multiverse amd64 Packages [9,700 B]
Get: http://mirrors.aliyun.com/ubuntu bionic-updates/multiverse Translation-en [4,576 B]
Get: http://mirrors.aliyun.com/ubuntu bionic-proposed/restricted Sources [5,572 B]
Get: http://mirrors.aliyun.com/ubuntu bionic-proposed/multiverse Sources [1,796 B]
Get: http://mirrors.aliyun.com/ubuntu bionic-proposed/main Sources [71.2 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-proposed/universe Sources [20.2 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-proposed/main amd64 Packages [124 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-proposed/main Translation-en [43.8 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-proposed/restricted amd64 Packages [16.7 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-proposed/restricted Translation-en [5,680 B]
Get: http://mirrors.aliyun.com/ubuntu bionic-proposed/universe amd64 Packages [145 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-proposed/universe Translation-en [31.6 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-proposed/multiverse amd64 Packages [7,372 B]
Get: http://mirrors.aliyun.com/ubuntu bionic-proposed/multiverse Translation-en [2,796 B]
Get: http://mirrors.aliyun.com/ubuntu bionic-backports/main Sources [2,532 B]
Get: http://mirrors.aliyun.com/ubuntu bionic-backports/universe Sources [2,496 B]
Get: http://mirrors.aliyun.com/ubuntu bionic-backports/main amd64 Packages [2,512 B]
Get: http://mirrors.aliyun.com/ubuntu bionic-backports/main Translation-en [1,644 B]
Get: http://mirrors.aliyun.com/ubuntu bionic-backports/universe amd64 Packages [4,028 B]
Get: http://mirrors.aliyun.com/ubuntu bionic-backports/universe Translation-en [1,900 B]
Fetched 31.8 MB in 6s (, kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
packages can be upgraded. Run 'apt list --upgradable' to see them.
[root@yinzhengjie.org.cn ~]#

[root@yinzhengjie.org.cn ~]# apt update                                                                    #更新软件源

2>.安装Zabbix server 数据库,Php Web前端,zabbix agent

[root@yinzhengjie.org.cn ~]# apt -y install zabbix-server-mysql zabbix-frontend-php zabbix-agent
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
apache2 apache2-bin apache2-data apache2-utils fontconfig-config fonts-dejavu-core fping galera- libaio1 libapache2-mod-php libapache2-mod-php7. libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libcgi-fast-perl libcgi-pm-perl libconfig-inifiles-perl
libdbd-mysql-perl libdbi-perl libencode-locale-perl libfcgi-perl libfontconfig1 libgd3 libhtml-parser-perl libhtml-tagset-perl libhtml-template-perl libhttp-date-perl libhttp-message-perl libiksemel3 libio-html-perl libjbig0 libjemalloc1 libjpeg-turbo8 libjpeg8
libltdl7 liblua5.- liblwp-mediatypes-perl libmysqlclient20 libodbc1 libopenipmi0 libsensors4 libsnmp-base libsnmp30 libsodium23 libssh2- libterm-readkey-perl libtiff5 libtimedate-perl liburi-perl libwebp6 libxpm4 mariadb-client-10.1 mariadb-client-core-10.1
mariadb-common mariadb-server-10.1 mariadb-server-core-10.1 mysql-common php-bcmath php-common php-gd php-ldap php-mbstring php-mysql php-xml php7.-bcmath php7.-cli php7.-common php7.-gd php7.-json php7.-ldap php7.-mbstring php7.-mysql php7.-opcache
php7.-readline php7.-xml snmpd socat ssl-cert ttf-dejavu-core
Suggested packages:
www-browser apache2-doc apache2-suexec-pristine | apache2-suexec-custom php-pear libclone-perl libmldbm-perl libnet-daemon-perl libsql-statement-perl libgd-tools libdata-dump-perl libipc-sharedcache-perl libmyodbc odbc-postgresql tdsodbc unixodbc-bin lm-sensors
snmp-mibs-downloader libwww-perl mailx mariadb-test tinyca snmptrapd openssl-blacklist
The following NEW packages will be installed:
apache2 apache2-bin apache2-data apache2-utils fontconfig-config fonts-dejavu-core fping galera- libaio1 libapache2-mod-php libapache2-mod-php7. libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libcgi-fast-perl libcgi-pm-perl libconfig-inifiles-perl
libdbd-mysql-perl libdbi-perl libencode-locale-perl libfcgi-perl libfontconfig1 libgd3 libhtml-parser-perl libhtml-tagset-perl libhtml-template-perl libhttp-date-perl libhttp-message-perl libiksemel3 libio-html-perl libjbig0 libjemalloc1 libjpeg-turbo8 libjpeg8
libltdl7 liblua5.- liblwp-mediatypes-perl libmysqlclient20 libodbc1 libopenipmi0 libsensors4 libsnmp-base libsnmp30 libsodium23 libssh2- libterm-readkey-perl libtiff5 libtimedate-perl liburi-perl libwebp6 libxpm4 mariadb-client-10.1 mariadb-client-core-10.1
mariadb-common mariadb-server-10.1 mariadb-server-core-10.1 mysql-common php-bcmath php-common php-gd php-ldap php-mbstring php-mysql php-xml php7.-bcmath php7.-cli php7.-common php7.-gd php7.-json php7.-ldap php7.-mbstring php7.-mysql php7.-opcache
php7.-readline php7.-xml snmpd socat ssl-cert ttf-dejavu-core zabbix-agent zabbix-frontend-php zabbix-server-mysql
upgraded, newly installed, to remove and not upgraded.
Need to get 38.8 MB of archives.
After this operation, MB of additional disk space will be used.
Get: http://mirrors.aliyun.com/ubuntu bionic/main amd64 libapr1 amd64 1.6.3-2 [90.9 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/main amd64 libaprutil1 amd64 1.6.1-2 [84.4 kB]
Get: http://repo.zabbix.com/zabbix/4.0/ubuntu bionic/main amd64 zabbix-server-mysql amd64 1:4.0.17-2+bionic [1,946 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/main amd64 libaprutil1-dbd-sqlite3 amd64 1.6.1-2 [10.6 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/main amd64 libaprutil1-ldap amd64 1.6.1-2 [8,764 B]
Get: http://mirrors.aliyun.com/ubuntu bionic/main amd64 liblua5.2-0 amd64 5.2.4-1.1build1 [108 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-proposed/main amd64 apache2-bin amd64 2.4.29-1ubuntu4.12 [1,071 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-proposed/main amd64 apache2-utils amd64 2.4.29-1ubuntu4.12 [83.5 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-proposed/main amd64 apache2-data all 2.4.29-1ubuntu4.12 [160 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-proposed/main amd64 apache2 amd64 2.4.29-1ubuntu4.12 [95.1 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-security/main amd64 libjpeg-turbo8 amd64 1.5.2-0ubuntu5.18.04.3 [110 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/main amd64 mysql-common all 5.8+1.0.4 [7,308 B]
Get: http://mirrors.aliyun.com/ubuntu bionic-security/universe amd64 mariadb-common all 1:10.1.44-0ubuntu0.18.04.1 [16.1 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/universe amd64 galera-3 amd64 25.3.20-1 [947 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/main amd64 libdbi-perl amd64 1.640-1 [724 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/main amd64 libconfig-inifiles-perl all 2.94-1 [40.4 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-updates/main amd64 libaio1 amd64 0.3.110-5ubuntu0.1 [6,476 B]
Get: http://mirrors.aliyun.com/ubuntu bionic-security/universe amd64 mariadb-client-core-10.1 amd64 1:10.1.44-0ubuntu0.18.04.1 [4,772 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/universe amd64 libjemalloc1 amd64 3.6.0-11 [82.4 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-security/universe amd64 mariadb-client-10.1 amd64 1:10.1.44-0ubuntu0.18.04.1 [5,641 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-security/universe amd64 mariadb-server-core-10.1 amd64 1:10.1.44-0ubuntu0.18.04.1 [4,952 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/main amd64 socat amd64 1.7.3.2-2ubuntu2 [342 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-security/universe amd64 mariadb-server-10.1 amd64 1:10.1.44-0ubuntu0.18.04.1 [5,099 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/universe amd64 libiksemel3 amd64 1.4-3build1 [26.9 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-security/main amd64 libmysqlclient20 amd64 5.7.29-0ubuntu0.18.04.1 [690 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/main amd64 libltdl7 amd64 2.4.6-2 [38.8 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/main amd64 libodbc1 amd64 2.3.4-1.1ubuntu3 [183 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-updates/main amd64 libopenipmi0 amd64 2.0.22-1.1ubuntu2.1 [450 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/main amd64 libsensors4 amd64 1:3.4.0-4 [28.8 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-updates/main amd64 libsnmp-base all 5.7.3+dfsg-1.8ubuntu3.3 [224 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-updates/main amd64 libsnmp30 amd64 5.7.3+dfsg-1.8ubuntu3.3 [929 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/universe amd64 libssh2-1 amd64 1.8.0-1 [73.2 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/universe amd64 fping amd64 4.0-6 [32.1 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/main amd64 fonts-dejavu-core all 2.37-1 [1,041 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/main amd64 fontconfig-config all 2.12.6-0ubuntu2 [55.8 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/main amd64 php-common all 1:60ubuntu1 [12.1 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-security/main amd64 php7.2-common amd64 7.2.24-0ubuntu0.18.04.2 [887 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-security/main amd64 php7.2-json amd64 7.2.24-0ubuntu0.18.04.2 [18.9 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-security/main amd64 php7.2-opcache amd64 7.2.24-0ubuntu0.18.04.2 [165 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-security/main amd64 php7.2-readline amd64 7.2.24-0ubuntu0.18.04.2 [12.2 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/main amd64 libsodium23 amd64 1.0.16-2 [143 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-security/main amd64 php7.2-cli amd64 7.2.24-0ubuntu0.18.04.2 [1,408 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-security/main amd64 libapache2-mod-php7.2 amd64 7.2.24-0ubuntu0.18.04.2 [1,351 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/main amd64 libapache2-mod-php all 1:7.2+60ubuntu1 [3,212 B]
Get: http://mirrors.aliyun.com/ubuntu bionic/main amd64 libhtml-tagset-perl all 3.20-3 [12.1 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/main amd64 liburi-perl all 1.73-1 [77.2 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/main amd64 libhtml-parser-perl amd64 3.72-3build1 [85.9 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/main amd64 libcgi-pm-perl all 4.38-1 [185 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/main amd64 libfcgi-perl amd64 0.78-2build1 [32.8 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/main amd64 libcgi-fast-perl all 1:2.13-1 [9,940 B]
Get: http://mirrors.aliyun.com/ubuntu bionic/universe amd64 libdbd-mysql-perl amd64 4.046-1 [82.0 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/main amd64 libencode-locale-perl all 1.05-1 [12.3 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/main amd64 libfontconfig1 amd64 2.12.6-0ubuntu2 [137 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/main amd64 libjpeg8 amd64 8c-2ubuntu8 [2,194 B]
Get: http://mirrors.aliyun.com/ubuntu bionic/main amd64 libjbig0 amd64 2.1-3.1build1 [26.7 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-security/main amd64 libtiff5 amd64 4.0.9-5ubuntu0.3 [153 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/main amd64 libwebp6 amd64 0.6.1-2 [185 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/main amd64 libxpm4 amd64 1:3.5.12-1 [34.0 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-security/main amd64 libgd3 amd64 2.2.5-4ubuntu0.3 [119 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/main amd64 libhtml-template-perl all 2.97-1 [59.0 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/main amd64 libtimedate-perl all 2.3000-2 [37.5 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/main amd64 libhttp-date-perl all 6.02-1 [10.4 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/main amd64 libio-html-perl all 1.001-1 [14.9 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/main amd64 liblwp-mediatypes-perl all 6.02-1 [21.7 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/main amd64 libhttp-message-perl all 6.14-1 [72.1 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/universe amd64 libterm-readkey-perl amd64 2.37-1build1 [24.4 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic-security/universe amd64 php7.2-bcmath amd64 7.2.24-0ubuntu0.18.04.2 [15.3 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/universe amd64 php-bcmath all 1:7.2+60ubuntu1 [2,004 B]
Get: http://mirrors.aliyun.com/ubuntu bionic-security/main amd64 php7.2-gd amd64 7.2.24-0ubuntu0.18.04.2 [27.2 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/main amd64 php-gd all 1:7.2+60ubuntu1 [1,996 B]
Get: http://mirrors.aliyun.com/ubuntu bionic-security/main amd64 php7.2-ldap amd64 7.2.24-0ubuntu0.18.04.2 [23.6 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/main amd64 php-ldap all 1:7.2+60ubuntu1 [2,000 B]
Get: http://mirrors.aliyun.com/ubuntu bionic-security/universe amd64 php7.2-mbstring amd64 7.2.24-0ubuntu0.18.04.2 [484 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/universe amd64 php-mbstring all 1:7.2+60ubuntu1 [2,008 B]
Get: http://mirrors.aliyun.com/ubuntu bionic-security/main amd64 php7.2-mysql amd64 7.2.24-0ubuntu0.18.04.2 [117 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/main amd64 php-mysql all 1:7.2+60ubuntu1 [2,004 B]
Get: http://mirrors.aliyun.com/ubuntu bionic-security/main amd64 php7.2-xml amd64 7.2.24-0ubuntu0.18.04.2 [107 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/universe amd64 php-xml all 1:7.2+60ubuntu1 [2,024 B]
Get: http://mirrors.aliyun.com/ubuntu bionic-updates/main amd64 snmpd amd64 5.7.3+dfsg-1.8ubuntu3.3 [57.0 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/main amd64 ssl-cert all 1.0.39 [17.0 kB]
Get: http://mirrors.aliyun.com/ubuntu bionic/universe amd64 ttf-dejavu-core all 2.37-1 [2,978 B]
Get: http://repo.zabbix.com/zabbix/4.0/ubuntu bionic/main amd64 zabbix-server-mysql amd64 1:4.0.17-2+bionic [1,946 kB]
Get: http://repo.zabbix.com/zabbix/4.0/ubuntu bionic/main amd64 zabbix-server-mysql amd64 1:4.0.17-2+bionic [1,946 kB]
Get: http://repo.zabbix.com/zabbix/4.0/ubuntu bionic/main amd64 zabbix-agent amd64 1:4.0.17-2+bionic [190 kB]
Get: http://repo.zabbix.com/zabbix/4.0/ubuntu bionic/main amd64 zabbix-frontend-php all 1:4.0.17-2+bionic [2,182 kB]
Fetched 37.2 MB in 3min 4s ( kB/s)
Extracting templates from packages: %
Preconfiguring packages ...
Selecting previously unselected package libapr1:amd64.
(Reading database ... files and directories currently installed.)
Preparing to unpack .../-libapr1_1.6.3-2_amd64.deb ...
Unpacking libapr1:amd64 (1.6.-) ........................................................................................................................................................................................................................................]
Selecting previously unselected package libaprutil1:amd64.
Preparing to unpack .../-libaprutil1_1.6.1-2_amd64.deb ...
Unpacking libaprutil1:amd64 (1.6.-) ...
Selecting previously unselected package libaprutil1-dbd-sqlite3:amd64.....................................................................................................................................................................................................]
Preparing to unpack .../-libaprutil1-dbd-sqlite3_1.6.1-2_amd64.deb ...
Unpacking libaprutil1-dbd-sqlite3:amd64 (1.6.-) ...
Selecting previously unselected package libaprutil1-ldap:amd64............................................................................................................................................................................................................]
Preparing to unpack .../-libaprutil1-ldap_1.6.1-2_amd64.deb ...
Unpacking libaprutil1-ldap:amd64 (1.6.-) ...
Selecting previously unselected package liblua5.-:amd64.
Preparing to unpack .../-liblua5.-0_5.2.4-.1build1_amd64.deb ...
Unpacking liblua5.-:amd64 (5.2.-.1build1) ............................................................................................................................................................................................................................]
Selecting previously unselected package apache2-bin.
Preparing to unpack .../-apache2-bin_2.4.29-1ubuntu4.12_amd64.deb ...
Unpacking apache2-bin (2.4.-1ubuntu4.) ...
Selecting previously unselected package apache2-utils.....................................................................................................................................................................................................................]
Preparing to unpack .../-apache2-utils_2.4.29-1ubuntu4.12_amd64.deb ...
Unpacking apache2-utils (2.4.-1ubuntu4.) ...
Selecting previously unselected package apache2-data......................................................................................................................................................................................................................]
Preparing to unpack .../-apache2-data_2.4.29-1ubuntu4.12_all.deb ...
Unpacking apache2-data (2.4.-1ubuntu4.) ...
Selecting previously unselected package apache2.
Preparing to unpack .../-apache2_2.4.29-1ubuntu4.12_amd64.deb ...
Unpacking apache2 (2.4.-1ubuntu4.) ...................................................................................................................................................................................................................................]
Selecting previously unselected package libjpeg-turbo8:amd64.
Preparing to unpack .../-libjpeg-turbo8_1.5.2-0ubuntu5.18.04.3_amd64.deb ...
Unpacking libjpeg-turbo8:amd64 (1.5.-0ubuntu5.18.04.) ...
Selecting previously unselected package mysql-common......................................................................................................................................................................................................................]
Preparing to unpack .../-mysql-common_5.+1.0.4_all.deb ...
Unpacking mysql-common (5.8+1.0.) ...
Selecting previously unselected package mariadb-common.
Preparing to unpack .../-mariadb-common_1%3a10.1.44-0ubuntu0.18.04.1_all.deb ...
Unpacking mariadb-common (:10.1.-0ubuntu0.18.04.) ....................................................................................................................................................................................................................]
Selecting previously unselected package galera-.
Preparing to unpack .../-galera-3_25.3.20-1_amd64.deb ...
Unpacking galera- (25.3.-) ...
Selecting previously unselected package libdbi-perl.......................................................................................................................................................................................................................]
Preparing to unpack .../-libdbi-perl_1.-1_amd64.deb ...
Unpacking libdbi-perl (1.640-) ...
Selecting previously unselected package libconfig-inifiles-perl...........................................................................................................................................................................................................]
Preparing to unpack .../-libconfig-inifiles-perl_2.-1_all.deb ...
Unpacking libconfig-inifiles-perl (2.94-) ...
Selecting previously unselected package libaio1:amd64.
Preparing to unpack .../-libaio1_0.3.110-5ubuntu0.1_amd64.deb ...
Unpacking libaio1:amd64 (0.3.-5ubuntu0.) .............................................................................................................................................................................................................................]
Selecting previously unselected package mariadb-client-core-10.1.
Preparing to unpack .../-mariadb-client-core-.1_1%3a10.1.44-0ubuntu0.18.04.1_amd64.deb ...
Unpacking mariadb-client-core-10.1 (:10.1.-0ubuntu0.18.04.) ...
Selecting previously unselected package libjemalloc1......................................................................................................................................................................................................................]
Preparing to unpack .../-libjemalloc1_3.6.0-11_amd64.deb ...
Unpacking libjemalloc1 (3.6.-) ...
Selecting previously unselected package mariadb-client-10.1.
Preparing to unpack .../-mariadb-client-.1_1%3a10.1.44-0ubuntu0.18.04.1_amd64.deb ...
Unpacking mariadb-client-10.1 (:10.1.-0ubuntu0.18.04.) ...............................................................................................................................................................................................................]
Selecting previously unselected package mariadb-server-core-10.1.
Preparing to unpack .../-mariadb-server-core-.1_1%3a10.1.44-0ubuntu0.18.04.1_amd64.deb ...
Unpacking mariadb-server-core-10.1 (:10.1.-0ubuntu0.18.04.) ...
Selecting previously unselected package socat.#######.....................................................................................................................................................................................................................]
Preparing to unpack .../-socat_1.7.3.-2ubuntu2_amd64.deb ...
Unpacking socat (1.7.3.2-2ubuntu2) ...
Setting up mysql-common (5.8+1.0.) ...################...................................................................................................................................................................................................................]
update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Setting up mariadb-common (:10.1.-0ubuntu0.18.04.) ...
update-alternatives: using /etc/mysql/mariadb.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Selecting previously unselected package mariadb-server-10.1...............................................................................................................................................................................................................]
(Reading database ... files and directories currently installed.)
Preparing to unpack .../-mariadb-server-.1_1%3a10.1.44-0ubuntu0.18.04.1_amd64.deb ...
Unpacking mariadb-server-10.1 (:10.1.-0ubuntu0.18.04.) ...
Selecting previously unselected package libiksemel3:amd64.
Preparing to unpack .../-libiksemel3_1.-3build1_amd64.deb ...
Unpacking libiksemel3:amd64 (1.4-3build1) ...###############..............................................................................................................................................................................................................]
Selecting previously unselected package libmysqlclient20:amd64.
Preparing to unpack .../-libmysqlclient20_5.7.29-0ubuntu0.18.04.1_amd64.deb ...
Unpacking libmysqlclient20:amd64 (5.7.-0ubuntu0.18.04.) ...
Selecting previously unselected package libltdl7:amd64.#######............................................................................................................................................................................................................]
Preparing to unpack .../-libltdl7_2.4.6-2_amd64.deb ...
Unpacking libltdl7:amd64 (2.4.-) ...
Selecting previously unselected package libodbc1:amd64.
Preparing to unpack .../-libodbc1_2.3.4-.1ubuntu3_amd64.deb ...
Unpacking libodbc1:amd64 (2.3.-.1ubuntu3) ...##################.........................................................................................................................................................................................................]
Selecting previously unselected package libopenipmi0.
Preparing to unpack .../-libopenipmi0_2.0.22-.1ubuntu2.1_amd64.deb ...
Unpacking libopenipmi0 (2.0.-.1ubuntu2.) ...
Selecting previously unselected package libsensors4:amd64.##########......................................................................................................................................................................................................]
Preparing to unpack .../-libsensors4_1%3a3.4.0-4_amd64.deb ...
Unpacking libsensors4:amd64 (:3.4.-) ...
Selecting previously unselected package libsnmp-base.#################....................................................................................................................................................................................................]
Preparing to unpack .../-libsnmp-base_5.7.3+dfsg-.8ubuntu3.3_all.deb ...
Unpacking libsnmp-base (5.7.+dfsg-.8ubuntu3.) ...
Selecting previously unselected package libsnmp30:amd64.
Preparing to unpack .../-libsnmp30_5.7.3+dfsg-.8ubuntu3.3_amd64.deb ...
Unpacking libsnmp30:amd64 (5.7.+dfsg-.8ubuntu3.) ...#################..................................................................................................................................................................................................]
Selecting previously unselected package libssh2-:amd64.
Preparing to unpack .../-libssh2-1_1.8.0-1_amd64.deb ...
Unpacking libssh2-:amd64 (1.8.-) ...
Selecting previously unselected package fping.#############################...............................................................................................................................................................................................]
Preparing to unpack .../-fping_4.-6_amd64.deb ...
Unpacking fping (4.0-) ...
Selecting previously unselected package zabbix-server-mysql.#################.............................................................................................................................................................................................]
Preparing to unpack .../-zabbix-server-mysql_1%3a4.0.17-+bionic_amd64.deb ...
Unpacking zabbix-server-mysql (:4.0.-+bionic) ...
Selecting previously unselected package fonts-dejavu-core.
Preparing to unpack .../-fonts-dejavu-core_2.-1_all.deb ...
Unpacking fonts-dejavu-core (2.37-) ...########################################..........................................................................................................................................................................................]
Selecting previously unselected package fontconfig-config.
Preparing to unpack .../-fontconfig-config_2.12.6-0ubuntu2_all.deb ...
Unpacking fontconfig-config (2.12.-0ubuntu2) ...
Selecting previously unselected package php-common.###############################........................................................................................................................................................................................]
Preparing to unpack .../-php-common_1%3a60ubuntu1_all.deb ...
Unpacking php-common (:60ubuntu1) ...
Selecting previously unselected package php7.-common.
Preparing to unpack .../-php7.-common_7.2.24-0ubuntu0.18.04.2_amd64.deb ...
Unpacking php7.-common (7.2.-0ubuntu0.18.04.) ...################################.....................................................................................................................................................................................]
Selecting previously unselected package php7.-json.
Preparing to unpack .../-php7.-json_7.2.24-0ubuntu0.18.04.2_amd64.deb ...
Unpacking php7.-json (7.2.-0ubuntu0.18.04.) ...
Selecting previously unselected package php7.-opcache.################################...................................................................................................................................................................................]
Preparing to unpack .../-php7.-opcache_7.2.24-0ubuntu0.18.04.2_amd64.deb ...
Unpacking php7.-opcache (7.2.-0ubuntu0.18.04.) ...
Selecting previously unselected package php7.-readline.##################################................................................................................................................................................................................]
Preparing to unpack .../-php7.-readline_7.2.24-0ubuntu0.18.04.2_amd64.deb ...
Unpacking php7.-readline (7.2.-0ubuntu0.18.04.) ...
Selecting previously unselected package libsodium23:amd64.
Preparing to unpack .../-libsodium23_1.0.16-2_amd64.deb ...
Unpacking libsodium23:amd64 (1.0.-) ...##################################################..............................................................................................................................................................................]
Selecting previously unselected package php7.-cli.
Preparing to unpack .../-php7.-cli_7.2.24-0ubuntu0.18.04.2_amd64.deb ...
Unpacking php7.-cli (7.2.-0ubuntu0.18.04.) ...
Selecting previously unselected package libapache2-mod-php7..################################............................................................................................................................................................................]
Preparing to unpack .../-libapache2-mod-php7.2_7.2.24-0ubuntu0.18.04.2_amd64.deb ...
Unpacking libapache2-mod-php7. (7.2.-0ubuntu0.18.04.) ...
Selecting previously unselected package libapache2-mod-php.
Preparing to unpack .../-libapache2-mod-php_1%3a7.+60ubuntu1_all.deb ...
Unpacking libapache2-mod-php (:7.2+60ubuntu1) ...###############################################.........................................................................................................................................................................]
Selecting previously unselected package libhtml-tagset-perl.
Preparing to unpack .../-libhtml-tagset-perl_3.-3_all.deb ...
Unpacking libhtml-tagset-perl (3.20-) ...
Selecting previously unselected package liburi-perl.################################################......................................................................................................................................................................]
Preparing to unpack .../-liburi-perl_1.-1_all.deb ...
Unpacking liburi-perl (1.73-) ...
Selecting previously unselected package libhtml-parser-perl.##########################################....................................................................................................................................................................]
Preparing to unpack .../-libhtml-parser-perl_3.-3build1_amd64.deb ...
Unpacking libhtml-parser-perl (3.72-3build1) ...
Selecting previously unselected package libcgi-pm-perl.
Preparing to unpack .../-libcgi-pm-perl_4.-1_all.deb ...
Unpacking libcgi-pm-perl (4.38-) ...####################################################################.................................................................................................................................................................]
Selecting previously unselected package libfcgi-perl.
Preparing to unpack .../-libfcgi-perl_0.-2build1_amd64.deb ...
Unpacking libfcgi-perl (0.78-2build1) ...
Selecting previously unselected package libcgi-fast-perl.##################################################...............................................................................................................................................................]
Preparing to unpack .../-libcgi-fast-perl_1%3a2.-1_all.deb ...
Unpacking libcgi-fast-perl (:2.13-) ...
Selecting previously unselected package libdbd-mysql-perl.###################################################.............................................................................................................................................................]
Preparing to unpack .../-libdbd-mysql-perl_4.-1_amd64.deb ...
Unpacking libdbd-mysql-perl (4.046-) ...
Selecting previously unselected package libencode-locale-perl.
Preparing to unpack .../-libencode-locale-perl_1.-1_all.deb ...
Unpacking libencode-locale-perl (1.05-) ...
Selecting previously unselected package libfontconfig1:amd64.###################################################..........................................................................................................................................................]
Preparing to unpack .../-libfontconfig1_2.12.6-0ubuntu2_amd64.deb ...
Unpacking libfontconfig1:amd64 (2.12.-0ubuntu2) ...
Selecting previously unselected package libjpeg8:amd64.############################################################.......................................................................................................................................................]
Preparing to unpack .../-libjpeg8_8c-2ubuntu8_amd64.deb ...
Unpacking libjpeg8:amd64 (8c-2ubuntu8) ...
Selecting previously unselected package libjbig0:amd64.
Preparing to unpack .../-libjbig0_2.-.1build1_amd64.deb ...
Unpacking libjbig0:amd64 (2.1-.1build1) ...#########################################################################.....................................................................................................................................................]
Selecting previously unselected package libtiff5:amd64.
Preparing to unpack .../-libtiff5_4.0.9-5ubuntu0.3_amd64.deb ...
Unpacking libtiff5:amd64 (4.0.-5ubuntu0.) ...
Selecting previously unselected package libwebp6:amd64.################################################################...................................................................................................................................................]
Preparing to unpack .../-libwebp6_0.6.1-2_amd64.deb ...
Unpacking libwebp6:amd64 (0.6.-) ...
Selecting previously unselected package libxpm4:amd64.####################################################################................................................................................................................................................]
Preparing to unpack .../-libxpm4_1%3a3.5.12-1_amd64.deb ...
Unpacking libxpm4:amd64 (:3.5.-) ...
Selecting previously unselected package libgd3:amd64.
Preparing to unpack .../-libgd3_2.2.5-4ubuntu0.3_amd64.deb ...
Unpacking libgd3:amd64 (2.2.-4ubuntu0.) ...###############################################################################..............................................................................................................................................]
Selecting previously unselected package libhtml-template-perl.
Preparing to unpack .../-libhtml-template-perl_2.-1_all.deb ...
Unpacking libhtml-template-perl (2.97-) ...
Selecting previously unselected package libtimedate-perl.######################################################################...........................................................................................................................................]
Preparing to unpack .../-libtimedate-perl_2.-2_all.deb ...
Unpacking libtimedate-perl (2.3000-) ...
Selecting previously unselected package libhttp-date-perl.
Preparing to unpack .../-libhttp-date-perl_6.-1_all.deb ...
Unpacking libhttp-date-perl (6.02-) ...##########################################################################################........................................................................................................................................]
Selecting previously unselected package libio-html-perl.
Preparing to unpack .../-libio-html-perl_1.-1_all.deb ...
Unpacking libio-html-perl (1.001-) ...
Selecting previously unselected package liblwp-mediatypes-perl.#####################################################################......................................................................................................................................]
Preparing to unpack .../-liblwp-mediatypes-perl_6.-1_all.deb ...
Unpacking liblwp-mediatypes-perl (6.02-) ...
Selecting previously unselected package libhttp-message-perl.#########################################################################....................................................................................................................................]
Preparing to unpack .../-libhttp-message-perl_6.-1_all.deb ...
Unpacking libhttp-message-perl (6.14-) ...
Selecting previously unselected package libterm-readkey-perl.
Preparing to unpack .../-libterm-readkey-perl_2.-1build1_amd64.deb ...
Unpacking libterm-readkey-perl (2.37-1build1) ...########################################################################################.................................................................................................................................]
Selecting previously unselected package php7.-bcmath.
Preparing to unpack .../-php7.-bcmath_7.2.24-0ubuntu0.18.04.2_amd64.deb ...
Unpacking php7.-bcmath (7.2.-0ubuntu0.18.04.) ...
Selecting previously unselected package php-bcmath.########################################################################################...............................................................................................................................]
Preparing to unpack .../-php-bcmath_1%3a7.+60ubuntu1_all.deb ...
Unpacking php-bcmath (:7.2+60ubuntu1) ...
Selecting previously unselected package php7.-gd.############################################################################################............................................................................................................................]
Preparing to unpack .../-php7.-gd_7.2.24-0ubuntu0.18.04.2_amd64.deb ...
Unpacking php7.-gd (7.2.-0ubuntu0.18.04.) ...
Selecting previously unselected package php-gd.
Preparing to unpack .../-php-gd_1%3a7.+60ubuntu1_all.deb ...
Unpacking php-gd (:7.2+60ubuntu1) ...
Selecting previously unselected package php7.-ldap.############################################################################################..........................................................................................................................]
Preparing to unpack .../-php7.-ldap_7.2.24-0ubuntu0.18.04.2_amd64.deb ...
Unpacking php7.-ldap (7.2.-0ubuntu0.18.04.) ...
Selecting previously unselected package php-ldap.##################################################################################################.......................................................................................................................]
Preparing to unpack .../-php-ldap_1%3a7.+60ubuntu1_all.deb ...
Unpacking php-ldap (:7.2+60ubuntu1) ...
Selecting previously unselected package php7.-mbstring.
Preparing to unpack .../-php7.-mbstring_7.2.24-0ubuntu0.18.04.2_amd64.deb ...
Unpacking php7.-mbstring (7.2.-0ubuntu0.18.04.) ...##############################################################################################.....................................................................................................................]
Selecting previously unselected package php-mbstring.
Preparing to unpack .../-php-mbstring_1%3a7.+60ubuntu1_all.deb ...
Unpacking php-mbstring (:7.2+60ubuntu1) ...
Selecting previously unselected package php7.-mysql.###################################################################################################..................................................................................................................]
Preparing to unpack .../-php7.-mysql_7.2.24-0ubuntu0.18.04.2_amd64.deb ...
Unpacking php7.-mysql (7.2.-0ubuntu0.18.04.) ...
Selecting previously unselected package php-mysql.########################################################################################################................................................................................................................]
Preparing to unpack .../-php-mysql_1%3a7.+60ubuntu1_all.deb ...
Unpacking php-mysql (:7.2+60ubuntu1) ...
Selecting previously unselected package php7.-xml.
Preparing to unpack .../-php7.-xml_7.2.24-0ubuntu0.18.04.2_amd64.deb ...
Unpacking php7.-xml (7.2.-0ubuntu0.18.04.) ...##########################################################################################################..............................................................................................................]
Selecting previously unselected package php-xml.
Preparing to unpack .../-php-xml_1%3a7.+60ubuntu1_all.deb ...
Unpacking php-xml (:7.2+60ubuntu1) ...
Selecting previously unselected package snmpd.#################################################################################################################...........................................................................................................]
Preparing to unpack .../-snmpd_5.7.3+dfsg-.8ubuntu3.3_amd64.deb ...
Unpacking snmpd (5.7.+dfsg-.8ubuntu3.) ...
Selecting previously unselected package ssl-cert.
Preparing to unpack .../-ssl-cert_1..39_all.deb ...
Unpacking ssl-cert (1.0.) ...###################################################################################################################################........................................................................................................]
Selecting previously unselected package ttf-dejavu-core.
Preparing to unpack .../-ttf-dejavu-core_2.-1_all.deb ...
Unpacking ttf-dejavu-core (2.37-) ...
Selecting previously unselected package zabbix-agent.###############################################################################################################......................................................................................................]
Preparing to unpack .../-zabbix-agent_1%3a4.0.17-+bionic_amd64.deb ...
Unpacking zabbix-agent (:4.0.-+bionic) ...
Selecting previously unselected package zabbix-frontend-php.###########################################################################################################...................................................................................................]
Preparing to unpack .../-zabbix-frontend-php_1%3a4.0.17-+bionic_all.deb ...
Unpacking zabbix-frontend-php (:4.0.-+bionic) ...
Setting up libhtml-tagset-perl (3.20-) ...
Setting up libapr1:amd64 (1.6.-) ...###################################################################################################################################.................................................................................................]
Processing triggers for ufw (0.36-0ubuntu0.18.04.) ...
Setting up libconfig-inifiles-perl (2.94-) ...
Processing triggers for ureadahead (0.100.-) ...########################################################################################################################...............................................................................................]
Setting up libencode-locale-perl (1.05-) ...
Setting up libjemalloc1 (3.6.-) ...
Setting up libtimedate-perl (2.3000-) ...####################################################################################################################################............................................................................................]
Setting up libjbig0:amd64 (2.1-.1build1) ...
Setting up fonts-dejavu-core (2.37-) ...########################################################################################################################################.........................................................................................]
Setting up socat (1.7.3.2-2ubuntu2) ...
Setting up libio-html-perl (1.001-) ...###########################################################################################################################################.......................................................................................]
Setting up libiksemel3:amd64 (1.4-3build1) ...
Setting up apache2-data (2.4.-1ubuntu4.) ...#####################################################################################################################################.....................................................................................]
Setting up ssl-cert (1.0.) ...
Setting up libjpeg-turbo8:amd64 (1.5.-0ubuntu5.18.04.) ...############################################################################################################################..................................................................................]
Setting up libterm-readkey-perl (2.37-1build1) ...
Setting up libsodium23:amd64 (1.0.-) ...###############################################################################################################################################................................................................................]
Setting up libssh2-:amd64 (1.8.-) ...
Setting up liblwp-mediatypes-perl (6.02-) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...#########################################################################################################################################.............................................................................]
Setting up zabbix-agent (:4.0.-+bionic) ...
Setting up libaio1:amd64 (0.3.-5ubuntu0.) ...
Setting up galera- (25.3.-) ...#############################################################################################################################################################..........................................................................]
Setting up liburi-perl (1.73-) ...
Setting up fping (4.0-) ...######################################################################################################################################################################........................................................................]
Setting up libaprutil1:amd64 (1.6.-) ...
Setting up php-common (:60ubuntu1) ...#############################################################################################################################################################......................................................................]
Created symlink /etc/systemd/system/timers.target.wants/phpsessionclean.timer → /lib/systemd/system/phpsessionclean.timer.
Processing triggers for systemd (-3ubuntu10.) ...
Setting up libltdl7:amd64 (2.4.-) ...
Setting up libhtml-parser-perl (3.72-3build1) ...######################################################################################################################################################...................................................................]
Setting up libcgi-pm-perl (4.38-) ...
Setting up libxpm4:amd64 (:3.5.-) ...################################################################################################################################################################.................................................................]
Setting up libsensors4:amd64 (:3.4.-) ...
Processing triggers for man-db (2.8.-2ubuntu0.) ...#######################################################################################################################################################..............................................................]
Setting up libmysqlclient20:amd64 (5.7.-0ubuntu0.18.04.) ...
Setting up liblua5.-:amd64 (5.2.-.1build1) ...
Setting up libfcgi-perl (0.78-2build1) ...####################################################################################################################################################################............................................................]
Setting up libdbi-perl (1.640-) ...
Setting up libopenipmi0 (2.0.-.1ubuntu2.) ...################################################################################################################################################################.........................................................]
Setting up libaprutil1-ldap:amd64 (1.6.-) ...
Setting up libwebp6:amd64 (0.6.-) ...############################################################################################################################################################################.......................................................]
Setting up libsnmp-base (5.7.+dfsg-.8ubuntu3.) ...
Setting up libjpeg8:amd64 (8c-2ubuntu8) ...###########################################################################################################################################################################....................................................]
Setting up fontconfig-config (2.12.-0ubuntu2) ...
Setting up libhttp-date-perl (6.02-) ...###############################################################################################################################################################################..................................................]
Setting up libsnmp30:amd64 (5.7.+dfsg-.8ubuntu3.) ...
Setting up libodbc1:amd64 (2.3.-.1ubuntu3) ...##########################################################################################################################################################################................................................]
Setting up php7.-common (7.2.-0ubuntu0.18.04.) ... Creating config file /etc/php/7.2/mods-available/calendar.ini with new version Creating config file /etc/php/7.2/mods-available/ctype.ini with new version Creating config file /etc/php/7.2/mods-available/exif.ini with new version Creating config file /etc/php/7.2/mods-available/fileinfo.ini with new version Creating config file /etc/php/7.2/mods-available/ftp.ini with new version Creating config file /etc/php/7.2/mods-available/gettext.ini with new version Creating config file /etc/php/7.2/mods-available/iconv.ini with new version Creating config file /etc/php/7.2/mods-available/pdo.ini with new version Creating config file /etc/php/7.2/mods-available/phar.ini with new version Creating config file /etc/php/7.2/mods-available/posix.ini with new version Creating config file /etc/php/7.2/mods-available/shmop.ini with new version Creating config file /etc/php/7.2/mods-available/sockets.ini with new version Creating config file /etc/php/7.2/mods-available/sysvmsg.ini with new version Creating config file /etc/php/7.2/mods-available/sysvsem.ini with new version Creating config file /etc/php/7.2/mods-available/sysvshm.ini with new version Creating config file /etc/php/7.2/mods-available/tokenizer.ini with new version
Setting up mariadb-server-core-10.1 (:10.1.-0ubuntu0.18.04.) ...
Setting up libhtml-template-perl (2.97-) ...################################################################################################################################################################################.............................................]
Setting up php7.-ldap (7.2.-0ubuntu0.18.04.) ...
Progress: [ %] [##############################################################################################################################################################################################################..........................................]
Creating config file /etc/php/7.2/mods-available/ldap.ini with new version
Setting up ttf-dejavu-core (2.37-) ...
Setting up libaprutil1-dbd-sqlite3:amd64 (1.6.-) ...
Setting up apache2-utils (2.4.-1ubuntu4.) ...#################################################################################################################################################################################........................................]
Setting up mariadb-client-core-10.1 (:10.1.-0ubuntu0.18.04.) ...
Setting up snmpd (5.7.+dfsg-.8ubuntu3.) ...#######################################################################################################################################################################################.....................................]
adduser: Warning: The home directory `/var/lib/snmp' does not belong to the user you are currently creating.
Created symlink /etc/systemd/system/multi-user.target.wants/snmpd.service → /lib/systemd/system/snmpd.service.
Setting up apache2-bin (2.4.-1ubuntu4.) ...
Setting up libtiff5:amd64 (4.0.-5ubuntu0.) ...#######################################################################################################################################################################################...................................]
Setting up php7.-mbstring (7.2.-0ubuntu0.18.04.) ...
Progress: [ %] [#######################################################################################################################################################################################################################.................................]
Creating config file /etc/php/7.2/mods-available/mbstring.ini with new version
Setting up libcgi-fast-perl (:2.13-) ...
Setting up php7.-readline (7.2.-0ubuntu0.18.04.) ... Creating config file /etc/php/7.2/mods-available/readline.ini with new version
Setting up php7.-bcmath (7.2.-0ubuntu0.18.04.) ...######################################################################################################################################################################################..............................] Creating config file /etc/php/7.2/mods-available/bcmath.ini with new version
Setting up php-ldap (:7.2+60ubuntu1) ...
Setting up php-mbstring (:7.2+60ubuntu1) ...##################################################################################################################################################################################################...........................]
Setting up libhttp-message-perl (6.14-) ...
Setting up php7.-json (7.2.-0ubuntu0.18.04.) ...#############################################################################################################################################################################################.........................] Creating config file /etc/php/7.2/mods-available/json.ini with new version
Setting up libdbd-mysql-perl (4.046-) ...
Setting up php7.-opcache (7.2.-0ubuntu0.18.04.) ...############################################################################################################################################################################################.......................] Creating config file /etc/php/7.2/mods-available/opcache.ini with new version
Setting up php7.-mysql (7.2.-0ubuntu0.18.04.) ... Creating config file /etc/php/7.2/mods-available/mysqlnd.ini with new version Creating config file /etc/php/7.2/mods-available/mysqli.ini with new version Creating config file /etc/php/7.2/mods-available/pdo_mysql.ini with new version
Setting up libfontconfig1:amd64 (2.12.-0ubuntu2) ...#################################################################################################################################################################################################....................]
Setting up php7.-xml (7.2.-0ubuntu0.18.04.) ... Creating config file /etc/php/7.2/mods-available/dom.ini with new version Creating config file /etc/php/7.2/mods-available/simplexml.ini with new version Creating config file /etc/php/7.2/mods-available/wddx.ini with new version Creating config file /etc/php/7.2/mods-available/xml.ini with new version Creating config file /etc/php/7.2/mods-available/xmlreader.ini with new version Creating config file /etc/php/7.2/mods-available/xmlwriter.ini with new version Creating config file /etc/php/7.2/mods-available/xsl.ini with new version
Setting up mariadb-client-10.1 (:10.1.-0ubuntu0.18.04.) ...#########################################################################################################################################################################################..................]
Setting up zabbix-server-mysql (:4.0.-+bionic) ...
Setting up apache2 (2.4.-1ubuntu4.) ...
Enabling module mpm_event.#################################################################################################################################################################################################################################...............]
Enabling module authz_core.
Enabling module authz_host.
Enabling module authn_core.
Enabling module auth_basic.
Enabling module access_compat.
Enabling module authn_file.
Enabling module authz_user.
Enabling module alias.
Enabling module dir.
Enabling module autoindex.
Enabling module env.
Enabling module mime.
Enabling module negotiation.
Enabling module setenvif.
Enabling module filter.
Enabling module deflate.
Enabling module status.
Enabling module reqtimeout.
Enabling conf charset.
Enabling conf localized-error-pages.
Enabling conf other-vhosts-access-log.
Enabling conf security.
Enabling conf serve-cgi-bin.
Enabling site -default.
Created symlink /etc/systemd/system/multi-user.target.wants/apache2.service → /lib/systemd/system/apache2.service.
Created symlink /etc/systemd/system/multi-user.target.wants/apache-htcacheclean.service → /lib/systemd/system/apache-htcacheclean.service.
Setting up libgd3:amd64 (2.2.-4ubuntu0.) ...
Setting up php-bcmath (:7.2+60ubuntu1) ...
Setting up php-xml (:7.2+60ubuntu1) ...######################################################################################################################################################################################################################............]
Setting up php7.-cli (7.2.-0ubuntu0.18.04.) ...
update-alternatives: using /usr/bin/php7. to provide /usr/bin/php (php) in auto mode###########################################################################################################################################################################..........]
update-alternatives: using /usr/bin/phar7. to provide /usr/bin/phar (phar) in auto mode
update-alternatives: using /usr/bin/phar.phar7. to provide /usr/bin/phar.phar (phar.phar) in auto mode Creating config file /etc/php/7.2/cli/php.ini with new version
Setting up libapache2-mod-php7. (7.2.-0ubuntu0.18.04.) ... Creating config file /etc/php/7.2/apache2/php.ini with new version
Module mpm_event disabled.
Enabling module mpm_prefork.
apache2_switch_mpm Switch to prefork
apache2_invoke: Enable module php7.
Setting up mariadb-server-10.1 (:10.1.-0ubuntu0.18.04.) ...
Created symlink /etc/systemd/system/mysql.service → /lib/systemd/system/mariadb.service.#########################################################################################################################################################################........]
Created symlink /etc/systemd/system/mysqld.service → /lib/systemd/system/mariadb.service.
Created symlink /etc/systemd/system/multi-user.target.wants/mariadb.service → /lib/systemd/system/mariadb.service.
Setting up php-mysql (:7.2+60ubuntu1) ...
Setting up php7.-gd (7.2.-0ubuntu0.18.04.) ... Creating config file /etc/php/7.2/mods-available/gd.ini with new version
Setting up libapache2-mod-php (:7.2+60ubuntu1) ...
Setting up zabbix-frontend-php (:4.0.-+bionic) ...###############################################################################################################################################################################################################.....]
update-alternatives: using /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf to provide /usr/share/zabbix/assets/fonts/graphfont.ttf (zabbix-frontend-font) in auto mode
Enabling conf zabbix.
To activate the new configuration, you need to run:
systemctl reload apache2
Setting up php-gd (:7.2+60ubuntu1) ...
Processing triggers for ureadahead (0.100.-) ...####################################################################################################################################################################################################################...]
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for systemd (-3ubuntu10.) ...
Processing triggers for ufw (0.36-0ubuntu0.18.04.) ...
Processing triggers for libapache2-mod-php7. (7.2.-0ubuntu0.18.04.) ...
[root@yinzhengjie.org.cn ~]#
[root@yinzhengjie.org.cn ~]#

[root@yinzhengjie.org.cn ~]# apt -y install zabbix-server-mysql zabbix-frontend-php zabbix-agent

[root@yinzhengjie.org.cn ~]# ss -ntl
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 127.0.0.53%lo: 0.0.0.0:*
LISTEN 0.0.0.0: 0.0.0.0:*
LISTEN 0.0.0.0: 0.0.0.0:*
LISTEN 127.0.0.1: 0.0.0.0:*
LISTEN *: *:*
LISTEN [::]: [::]:*
LISTEN [::]: [::]:*
[root@yinzhengjie.org.cn ~]#
[root@yinzhengjie.org.cn ~]# grep 127.0.0.1 /etc/mysql/ -R
/etc/mysql/mariadb.conf.d/-server.cnf:bind-address = 127.0.0.1
[root@yinzhengjie.org.cn ~]#
[root@yinzhengjie.org.cn ~]# sed -i 's#127.0.0.1#172.200.5.201#' /etc/mysql/mariadb.conf.d/-server.cnf
[root@yinzhengjie.org.cn ~]#
[root@yinzhengjie.org.cn ~]# grep 127.0.0.1 /etc/mysql/ -R
[root@yinzhengjie.org.cn ~]#
[root@yinzhengjie.org.cn ~]# grep bind-address /etc/mysql/ -R
/etc/mysql/mariadb.conf.d/-server.cnf:bind-address = 172.200.5.201
[root@yinzhengjie.org.cn ~]#
[root@yinzhengjie.org.cn ~]# systemctl restart mariadb
[root@yinzhengjie.org.cn ~]#
[root@yinzhengjie.org.cn ~]# ss -ntl
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 127.0.0.53%lo: 0.0.0.0:*
LISTEN 0.0.0.0: 0.0.0.0:*
LISTEN 0.0.0.0: 0.0.0.0:*
LISTEN 172.200.5.201: 0.0.0.0:*
LISTEN *: *:*
LISTEN [::]: [::]:*
LISTEN [::]: [::]:*
[root@yinzhengjie.org.cn ~]#
[root@yinzhengjie.org.cn ~]#

[root@yinzhengjie.org.cn ~]# sed -i 's#127.0.0.1#172.200.5.201#' /etc/mysql/mariadb.conf.d/50-server.cnf

使用Ubuntu系统管理包工具(apt)部署Zabbix企业级监控系统

3>.创建初始化数据库

[root@yinzhengjie.org.cn ~]# mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is
Server version: 10.1.-MariaDB-0ubuntu0.18.04. Ubuntu 18.04 Copyright (c) , , Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]>
MariaDB [(none)]> CREATE DATABASE zabbix CHARACTER SET utf8 COLLATE utf8_bin;
Query OK, row affected (0.00 sec) MariaDB [(none)]>
MariaDB [(none)]> GRANT ALL PRIVILEGES ON zabbix.* to zabbix@172.200.5.201 IDENTIFIED BY 'yinzhengjie';
Query OK, rows affected (0.00 sec) MariaDB [(none)]>
MariaDB [(none)]> QUIT
Bye
[root@yinzhengjie.org.cn ~]#
[root@yinzhengjie.org.cn ~]#
[root@yinzhengjie.org.cn ~]# mysql -u zabbix -pyinzhengjie -h 172.200.5.201
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is
Server version: 10.1.-MariaDB-0ubuntu0.18.04. Ubuntu 18.04 Copyright (c) , , Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]>
MariaDB [(none)]> SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| information_schema |
| zabbix |
+--------------------+
rows in set (0.00 sec) MariaDB [(none)]>
MariaDB [(none)]> QUIT
Bye
[root@yinzhengjie.org.cn ~]#

[root@yinzhengjie.org.cn ~]# mysql -u zabbix -pyinzhengjie -h 172.200.5.201

使用Ubuntu系统管理包工具(apt)部署Zabbix企业级监控系统

[root@yinzhengjie.org.cn ~]# zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -pyinzhengjie -h 172.200.5.201 zabbix        #往zabbix数据库中导入初始化数据库
[root@yinzhengjie.org.cn ~]#
[root@yinzhengjie.org.cn ~]# mysql -u zabbix -pyinzhengjie -h 172.200.5.201
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is
Server version: 10.1.-MariaDB-0ubuntu0.18.04. Ubuntu 18.04 Copyright (c) , , Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]>
MariaDB [(none)]> use zabbix
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A Database changed
MariaDB [zabbix]>
MariaDB [zabbix]> SHOW TABLES;
+----------------------------+
| Tables_in_zabbix |
+----------------------------+
| acknowledges |
| actions |
| alerts |
| application_discovery |
| application_prototype |
| application_template |
| applications |
| auditlog |
| auditlog_details |
| autoreg_host |
| conditions |
| config |
| corr_condition |
| corr_condition_group |
| corr_condition_tag |
| corr_condition_tagpair |
| corr_condition_tagvalue |
| corr_operation |
| correlation |
| dashboard |
| dashboard_user |
| dashboard_usrgrp |
| dbversion |
| dchecks |
| dhosts |
| drules |
| dservices |
| escalations |
| event_recovery |
| event_suppress |
| event_tag |
| events |
| expressions |
| functions |
| globalmacro |
| globalvars |
| graph_discovery |
| graph_theme |
| graphs |
| graphs_items |
| group_discovery |
| group_prototype |
| history |
| history_log |
| history_str |
| history_text |
| history_uint |
| host_discovery |
| host_inventory |
| hostmacro |
| hosts |
| hosts_groups |
| hosts_templates |
| housekeeper |
| hstgrp |
| httpstep |
| httpstep_field |
| httpstepitem |
| httptest |
| httptest_field |
| httptestitem |
| icon_map |
| icon_mapping |
| ids |
| images |
| interface |
| interface_discovery |
| item_application_prototype |
| item_condition |
| item_discovery |
| item_preproc |
| items |
| items_applications |
| maintenance_tag |
| maintenances |
| maintenances_groups |
| maintenances_hosts |
| maintenances_windows |
| mappings |
| media |
| media_type |
| opcommand |
| opcommand_grp |
| opcommand_hst |
| opconditions |
| operations |
| opgroup |
| opinventory |
| opmessage |
| opmessage_grp |
| opmessage_usr |
| optemplate |
| problem |
| problem_tag |
| profiles |
| proxy_autoreg_host |
| proxy_dhistory |
| proxy_history |
| regexps |
| rights |
| screen_user |
| screen_usrgrp |
| screens |
| screens_items |
| scripts |
| service_alarms |
| services |
| services_links |
| services_times |
| sessions |
| slides |
| slideshow_user |
| slideshow_usrgrp |
| slideshows |
| sysmap_element_trigger |
| sysmap_element_url |
| sysmap_shape |
| sysmap_url |
| sysmap_user |
| sysmap_usrgrp |
| sysmaps |
| sysmaps_elements |
| sysmaps_link_triggers |
| sysmaps_links |
| tag_filter |
| task |
| task_acknowledge |
| task_check_now |
| task_close_problem |
| task_remote_command |
| task_remote_command_result |
| timeperiods |
| trends |
| trends_uint |
| trigger_depends |
| trigger_discovery |
| trigger_tag |
| triggers |
| users |
| users_groups |
| usrgrp |
| valuemaps |
| widget |
| widget_field |
+----------------------------+
rows in set (0.01 sec) MariaDB [zabbix]>

[root@yinzhengjie.org.cn ~]# zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -pyinzhengjie -h 172.200.5.201 zabbix        #往zabbix数据库中导入初始化数据库

使用Ubuntu系统管理包工具(apt)部署Zabbix企业级监控系统

4>.为Zabbix server配置数据库

[root@yinzhengjie.org.cn ~]# cp /etc/zabbix/zabbix_server.conf /etc/zabbix/zabbix_server.conf-`date +%F`        #先为文件做一个备份
[root@yinzhengjie.org.cn ~]# grep DBPassword= /etc/zabbix/zabbix_server.conf
# DBPassword=
[root@yinzhengjie.org.cn ~]#
[root@yinzhengjie.org.cn ~]# sed -r -i 's@# (DBPassword=)@\1yinzhengjie@' /etc/zabbix/zabbix_server.conf
[root@yinzhengjie.org.cn ~]#
[root@yinzhengjie.org.cn ~]# grep DBPassword= /etc/zabbix/zabbix_server.conf
DBPassword=yinzhengjie
[root@yinzhengjie.org.cn ~]#
[root@yinzhengjie.org.cn ~]#

[root@yinzhengjie.org.cn ~]# sed -r -i 's@# (DBPassword=)@\1yinzhengjie@' /etc/zabbix/zabbix_server.conf        #配置连接MySQL数据库的密码

[root@yinzhengjie.org.cn ~]# grep DBPort= /etc/zabbix/zabbix_server.conf
# DBPort=
[root@yinzhengjie.org.cn ~]#
[root@yinzhengjie.org.cn ~]# sed -r -i 's@# (DBPort=)@\13306@' /etc/zabbix/zabbix_server.conf
[root@yinzhengjie.org.cn ~]#
[root@yinzhengjie.org.cn ~]# grep DBPort= /etc/zabbix/zabbix_server.conf
DBPort=
[root@yinzhengjie.org.cn ~]#
[root@yinzhengjie.org.cn ~]#

[root@yinzhengjie.org.cn ~]# sed -r -i 's@# (DBPort=)@\13306@' /etc/zabbix/zabbix_server.conf               #设置MySQL的端口号(此步骤可以省略,生产环境中如果你MySQL监听的不是3306端口的话你可以自行修改)

[root@yinzhengjie.org.cn ~]# grep DBHost= /etc/zabbix/zabbix_server.conf
# DBHost=localhost
[root@yinzhengjie.org.cn ~]#
[root@yinzhengjie.org.cn ~]# sed -r -i 's@# (DBHost=)localhost@\1172.200.5.201@' /etc/zabbix/zabbix_server.conf
[root@yinzhengjie.org.cn ~]#
[root@yinzhengjie.org.cn ~]# grep DBHost= /etc/zabbix/zabbix_server.conf
DBHost=172.200.5.201
[root@yinzhengjie.org.cn ~]#
[root@yinzhengjie.org.cn ~]#

[root@yinzhengjie.org.cn ~]# sed -r -i 's@# (DBHost=)localhost@\1172.200.5.201@' /etc/zabbix/zabbix_server.conf    #配置MySQL的服务器地址

使用Ubuntu系统管理包工具(apt)部署Zabbix企业级监控系统

5>.修改时区

[root@yinzhengjie.org.cn ~]# cp /etc/zabbix/apache.conf /etc/zabbix/apache.conf-`date +%F`
[root@yinzhengjie.org.cn ~]# grep "php_value date.timezone" /etc/zabbix/apache.conf
# php_value date.timezone Europe/Riga
# php_value date.timezone Europe/Riga
[root@yinzhengjie.org.cn ~]#
[root@yinzhengjie.org.cn ~]# sed -r -i "s@# (php_value date.timezone) Europe/Riga@\1 Asia/Shanghai@" /etc/zabbix/apache.conf
[root@yinzhengjie.org.cn ~]#
[root@yinzhengjie.org.cn ~]# grep "php_value date.timezone" /etc/zabbix/apache.conf
php_value date.timezone Asia/Shanghai
php_value date.timezone Asia/Shanghai
[root@yinzhengjie.org.cn ~]#
[root@yinzhengjie.org.cn ~]# head - /etc/zabbix/apache.conf
# Define /zabbix alias, this is the default
<IfModule mod_alias.c>
Alias /zabbix /usr/share/zabbix
</IfModule> <Directory "/usr/share/zabbix">
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all <IfModule mod_php5.c>
php_value max_execution_time
php_value memory_limit 128M
php_value post_max_size 16M
php_value upload_max_filesize 2M
php_value max_input_time
php_value max_input_vars
php_value always_populate_raw_post_data -
php_value date.timezone Asia/Shanghai
</IfModule>
<IfModule mod_php7.c>
php_value max_execution_time
php_value memory_limit 128M
php_value post_max_size 16M
php_value upload_max_filesize 2M
php_value max_input_time
php_value max_input_vars
php_value always_populate_raw_post_data -
php_value date.timezone Asia/Shanghai
[root@yinzhengjie.org.cn ~]#
[root@yinzhengjie.org.cn ~]#

[root@yinzhengjie.org.cn ~]# sed -r -i "s@# (php_value date.timezone) Europe/Riga@\1 Asia/Shanghai@" /etc/zabbix/apache.conf

使用Ubuntu系统管理包工具(apt)部署Zabbix企业级监控系统

6>.启动Zabbix server和agent进程

[root@yinzhengjie.org.cn ~]# systemctl restart zabbix-server zabbix-agent apache2
[root@yinzhengjie.org.cn ~]# systemctl enable zabbix-server zabbix-agent apache2
Synchronizing state of zabbix-server.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable zabbix-server
Synchronizing state of zabbix-agent.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable zabbix-agent
Synchronizing state of apache2.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable apache2
[root@yinzhengjie.org.cn ~]#

[root@yinzhengjie.org.cn ~]# systemctl enable zabbix-server zabbix-agent apache2

使用Ubuntu系统管理包工具(apt)部署Zabbix企业级监控系统

7>.配置Zabbix前端

  博主推荐阅读:
    https://www.cnblogs.com/yinzhengjie2020/p/12305904.html