Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Zabbix-3.2 installation practice

2025-03-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Brief instructions for ZABBIX installation

Blue is what you need to pay attention to, and red is basically the command line you need to enter.

The cat section will be edited by VIM and the key parts will also be identified by color.

Install zabbix first

Install the database mysql

Import the zabbix database initial file.

Configure related files and start related services.

Ps: if you have changed the php related files, be sure to restart httpd.

[root@zabbix-server cache] # cat / etc/redhat-release

CentOS Linux release 7.2.1511 (Core)

[root@zabbix-server cache] # rpm-ivh http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm

Retrieving http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm

Warning: / var/tmp/rpm-tmp.AYeSQ4: Header V4 RSA/SHA512 Signature, key ID a14fe591: NOKEY

Preparing... # # [100%]

Updating / installing...

1:zabbix-release-3.2-1.el7 # # [100%]

[root@zabbix-server cache] # yum install zabbix-server-mysql zabbix-web-mysql

Loaded plugins: fastestmirror

Loading mirror speeds from cached hostfile

* base: mirrors.zju.edu.cn

* extras: mirrors.163.com

* updates: mirrors.tuna.tsinghua.edu.cn

Resolving Dependencies

-> Running transaction check

-> Package zabbix-server-mysql.x86_64 0RU 3.2.1-1.el7 will be installed

-- > Processing Dependency: fping for package: zabbix-server-mysql-3.2.1-1.el7.x86_64

-> Processing Dependency: libiksemel.so.3 () (64bit) for package: zabbix-server-mysql-3.2.1-1.el7.x86_64

-> Processing Dependency: libnetsnmp.so.31 () (64bit) for package: zabbix-server-mysql-3.2.1-1.el7.x86_64

-> Processing Dependency: libOpenIPMIposix.so.0 () (64bit) for package: zabbix-server-mysql-3.2.1-1.el7.x86_64

-> Processing Dependency: libodbc.so.2 () (64bit) for package: zabbix-server-mysql-3.2.1-1.el7.x86_64

-> Processing Dependency: libOpenIPMI.so.0 () (64bit) for package: zabbix-server-mysql-3.2.1-1.el7.x86_64

-> Package zabbix-web-mysql.noarch 0RU 3.2.1-1.el7 will be installed

-- > Processing Dependency: zabbix-web = 3.2.1-1.el7 for package: zabbix-web-mysql-3.2.1-1.el7.noarch

-- > Processing Dependency: php-mysql for package: zabbix-web-mysql-3.2.1-1.el7.noarch

-> Running transaction check

-> Package OpenIPMI-libs.x86_64 0RU 2.0.19-11.el7 will be installed

-- > Processing Dependency: OpenIPMI-modalias = 2.0.19-11.el7 for package: OpenIPMI-libs-2.0.19-11.el7.x86_64

-> Package fping.x86_64 0RU 3.10-1.el7 will be installed

-> Package iksemel.x86_64 0RU 1.4-2.el7.centos will be installed

-> Package net-snmp-libs.x86_64 1RV 5.7.2-24.el7_2.1 will be installed

-> Package php-mysql.x86_64 0RU 5.4.16-36.3.el7_2 will be installed

-- > Processing Dependency: php-pdo (x86-64) = 5.4.16-36.3.el7_2 for package: php-mysql-5.4.16-36.3.el7_2.x86_64

-> Package unixODBC.x86_64 0vv 2.3.1-11.el7 will be installed

-> Processing Dependency: libltdl.so.7 () (64bit) for package: unixODBC-2.3.1-11.el7.x86_64

-> Package zabbix-web.noarch 0RU 3.2.1-1.el7 will be installed

-- > Processing Dependency: php > = 5.4for package: zabbix-web-3.2.1-1.el7.noarch

-- > Processing Dependency: php-gd for package: zabbix-web-3.2.1-1.el7.noarch

-- > Processing Dependency: php-mbstring for package: zabbix-web-3.2.1-1.el7.noarch

-- > Processing Dependency: dejavu-sans-fonts for package: zabbix-web-3.2.1-1.el7.noarch

-- > Processing Dependency: php-bcmath for package: zabbix-web-3.2.1-1.el7.noarch

-- > Processing Dependency: httpd for package: zabbix-web-3.2.1-1.el7.noarch

-- > Processing Dependency: php-ldap for package: zabbix-web-3.2.1-1.el7.noarch

-- > Processing Dependency: php-xml for package: zabbix-web-3.2.1-1.el7.noarch

-> Running transaction check

-> Package OpenIPMI-modalias.x86_64 0RU 2.0.19-11.el7 will be installed

-> Package dejavu-sans-fonts.noarch 0RU 2.33-6.el7 will be installed

-- > Processing Dependency: dejavu-fonts-common = 2.33-6.el7 for package: dejavu-sans-fonts-2.33-6.el7.noarch

-> Package httpd.x86_64 0RU 2.4.6-40.el7.centos.4 will be installed

-- > Processing Dependency: httpd-tools = 2.4.6-40.el7.centos.4 for package: httpd-2.4.6-40.el7.centos.4.x86_64

Processing Dependency: / etc/mime.types for package: httpd-2.4.6-40.el7.centos.4.x86_64

-> Package libtool-ltdl.x86_64 0RU 2.4.2-21.el7_2 will be installed

-> Package php.x86_64 0RU 5.4.16-36.3.el7_2 will be installed

-- > Processing Dependency: php-common (x86-64) = 5.4.16-36.3.el7_2 for package: php-5.4.16-36.3.el7_2.x86_64

-- > Processing Dependency: php-cli (x86-64) = 5.4.16-36.3.el7_2 for package: php-5.4.16-36.3.el7_2.x86_64

-> Package php-bcmath.x86_64 0RU 5.4.16-36.3.el7_2 will be installed

-> Package php-gd.x86_64 0RU 5.4.16-36.3.el7_2 will be installed

-> Processing Dependency: libpng15.so.15 (PNG15_0) (64bit) for package: php-gd-5.4.16-36.3.el7_2.x86_64

-> Processing Dependency: libt1.so.5 () (64bit) for package: php-gd-5.4.16-36.3.el7_2.x86_64

-> Processing Dependency: libpng15.so.15 () (64bit) for package: php-gd-5.4.16-36.3.el7_2.x86_64

-> Processing Dependency: libXpm.so.4 () (64bit) for package: php-gd-5.4.16-36.3.el7_2.x86_64

-> Processing Dependency: libX11.so.6 () (64bit) for package: php-gd-5.4.16-36.3.el7_2.x86_64

-> Package php-ldap.x86_64 0RU 5.4.16-36.3.el7_2 will be installed

-> Package php-mbstring.x86_64 0RU 5.4.16-36.3.el7_2 will be installed

-> Package php-pdo.x86_64 0RU 5.4.16-36.3.el7_2 will be installed

-> Package php-xml.x86_64 0RU 5.4.16-36.3.el7_2 will be installed

-> Running transaction check

-> Package dejavu-fonts-common.noarch 0RU 2.33-6.el7 will be installed

-- > Processing Dependency: fontpackages-filesystem for package: dejavu-fonts-common-2.33-6.el7.noarch

-> Package httpd-tools.x86_64 0RU 2.4.6-40.el7.centos.4 will be installed

-> Package libX11.x86_64 0RU 1.6.3-2.el7 will be installed

-- > Processing Dependency: libX11-common > = 1.6.3-2.el7 for package: libX11- 1.6.3-2.el7.x86_64

-- > Processing Dependency: libxcb.so.1 () (64bit) for package: libX11-1.6.3-2.el7.x86_64

-> Package libXpm.x86_64 0RU 3.5.11-3.el7 will be installed

-> Package libpng.x86_64 2 1.5.13-7.el7_2 will be installed

-> Package mailcap.noarch 0RU 2.1.41-2.el7 will be installed

-> Package php-cli.x86_64 0RU 5.4.16-36.3.el7_2 will be installed

-> Package php-common.x86_64 0RU 5.4.16-36.3.el7_2 will be installed

-> Processing Dependency: libzip.so.2 () (64bit) for package: php-common-5.4.16-36.3.el7_2.x86_64

-> Package t1lib.x86_64 0RU 5.1.2-14.el7 will be installed

-> Running transaction check

-> Package fontpackages-filesystem.noarch 0RU 1.44-8.el7 will be installed

-> Package libX11-common.noarch 0RU 1.6.3-2.el7 will be installed

-> Package libxcb.x86_64 0RU 1.11-4.el7 will be installed

-> Processing Dependency: libXau.so.6 () (64bit) for package: libxcb-1.11-4.el7.x86_64

-> Package libzip.x86_64 0RU 0.10.1-8.el7 will be installed

-> Running transaction check

-> Package libXau.x86_64 0RU 1.0.8-2.1.el7 will be installed

-> Finished Dependency Resolution

Dependencies Resolved

=

Package Arch Version Repository Size

=

Installing:

Zabbix-server-mysql x8631 64 3.2.1-1.el7 zabbix 1.8m

Zabbix-web-mysql noarch 3.2.1-1.el7 zabbix 5.1k

Installing for dependencies:

OpenIPMI-libs x8631 64 2.0.19-11.el7 base 501k

OpenIPMI-modalias x8631 64 2.0.19-11.el7 base 15k

Dejavu-fonts-common noarch 2.33-6.el7 base64 k

Dejavu-sans-fonts noarch 2.33-6.el7 base 1.4m

Fontpackages-filesystem noarch 1.44-8.el7 base 9.9k

Fping x8631 64 3.10-1.el7 zabbix-non-supported 40k

Httpd x8631 64 2.4.6-40.el7.centos.4 updates 2.7m

Httpd-tools x8631 64 2.4.6-40.el7.centos.4 updates 83k

Iksemel x86 million 64 1.4-2.el7.centos zabbix-non-supported 49 k

LibX11 x8631 64 1.6.3-2.el7 base 605k

LibX11-common noarch 1.6.3-2.el7 base 162k

LibXau x8631 64 1.0.8-2.1.el7 base 29k

LibXpm x8631 64 3.5.11-3.el7 base 54k

Libpng x86'64 2purl 1.5.13-7.el7_2 updates 213k

Libtool-ltdl x8631 64 2.4.2-21.el7_2 updates 49k

Libxcb x8631 64 1.11-4.el7 base 189k

Libzip x8631 64 0.10.1-8.el7 base 48k

Mailcap noarch 2.1.41-2.el7 base 31k

Net-snmp-libs x86x 64 1purl 5.7.2-24.el7_2.1 updates 747k

Php x8631 64 5.4.16-36.3.el7_2 updates 1.4m

Php-bcmath x8631 64 5.4.16-36.3.el7_2 updates 56k

Php-cli x8631 64 5.4.16-36.3.el7_2 updates 2.7m

Php-common x8631 64 5.4.16-36.3.el7_2 updates 563k

Php-gd x8631 64 5.4.16-36.3.el7_2 updates 126k

Php-ldap x8631 64 5.4.16-36.3.el7_2 updates 51k

Php-mbstring x8631 64 5.4.16-36.3.el7_2 updates 504k

Php-mysql x8631 64 5.4.16-36.3.el7_2 updates 100k

Php-pdo x8631 64 5.4.16-36.3.el7_2 updates 97k

Php-xml x8631 64 5.4.16-36.3.el7_2 updates 124k

T1lib x8631 64 5.1.2-14.el7 base 166k

UnixODBC x8634 2.3.1-11.el7 base 413k

Zabbix-web noarch 3.2.1-1.el7 zabbix 3.6m

Transaction Summary

=

Install 2 Packages (+ 32 Dependent packages)

Total size: 19 M

Installed size: 80 M

Is this ok [y/d/N]: y

Downloading packages:

Warning: / var/cache/yum/x86_64/7/zabbix-non-supported/packages/fping-3.10-1.el7.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 79ea5ed4: NOKEY

Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX

Importing GPG key 0x79EA5ED4:

Userid: "Zabbix SIA"

Fingerprint: fbab d5fb 2025 5eca b22e e194 d13d 58e4 79ea 5ed4

Package: zabbix-release-3.2-1.el7.noarch (installed)

From: / etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX

Is this ok [y/N]: y

Warning: / var/cache/yum/x86_64/7/zabbix/packages/zabbix-web-3.2.1-1.el7.noarch.rpm: Header V4 RSA/SHA512 Signature, key ID a14fe591: NOKEY

Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591

Importing GPG key 0xA14FE591:

Userid: "Zabbix LLC"

Fingerprint: a184 8f53 52d0 22b9 471d 83d0 082a b56b a14f e591

Package: zabbix-release-3.2-1.el7.noarch (installed)

From: / etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591

Is this ok [y/N]: y

Running transaction check

Running transaction test

Transaction test succeeded

Running transaction

Warning: RPMDB altered outside of yum.

Installing: 1:net-snmp-libs-5.7.2-24.el7_2.1.x86_64 1 Compact 34

Installing: libzip-0.10.1-8.el7.x86_64 2 Compact 34

Installing: php-common-5.4.16-36.3.el7_2.x86_64 3 Compact 34

Installing: php-pdo-5.4.16-36.3.el7_2.x86_64 4 Compact 34

Installing: php-mysql-5.4.16-36.3.el7_2.x86_64 5 Compact 34

Installing: php-ldap-5.4.16-36.3.el7_2.x86_64 6 Compact 34

Installing: php-xml-5.4.16-36.3.el7_2.x86_64 7 Compact 34

Installing: php-cli-5.4.16-36.3.el7_2.x86_64 8 Compact 34

Installing: php-mbstring-5.4.16-36.3.el7_2.x86_64 9 Compact 34

Installing: php-bcmath-5.4.16-36.3.el7_2.x86_64 10 Compact 34

Installing: httpd-tools-2.4.6-40.el7.centos.4.x86_64 11 Compact 34

Installing: libXau-1.0.8-2.1.el7.x86_64 12 Compact 34

Installing: libxcb-1.11-4.el7.x86_64 13 Compact 34

Installing: libtool-ltdl-2.4.2-21.el7_2.x86_64 14 Compact 34

Installing: unixODBC-2.3.1-11.el7.x86_64 15 Compact 34

Installing: OpenIPMI-modalias-2.0.19-11.el7.x86_64 16 Compact 34

Installing: OpenIPMI-libs-2.0.19-11.el7.x86_64 17 Compact 34

Installing: fontpackages-filesystem-1.44-8.el7.noarch 18 Compact 34

Installing: dejavu-fonts-common-2.33-6.el7.noarch 19 Compact 34

Installing: dejavu-sans-fonts-2.33-6.el7.noarch 20 Universe 34

Installing: 2:libpng-1.5.13-7.el7_2.x86_64 21 Compact 34

Installing: iksemel-1.4-2.el7.centos.x86_64 22 Universe 34

Installing: mailcap-2.1.41-2.el7.noarch 23 Compact 34

Installing: httpd-2.4.6-40.el7.centos.4.x86_64 24 Compact 34

Installing: php-5.4.16-36.3.el7_2.x86_64 25 Compact 34

Installing: libX11-common-1.6.3-2.el7.noarch 26 Compact 34

Installing: libX11-1.6.3-2.el7.x86_64 27lap34

Installing: t1lib-5.1.2-14.el7.x86_64 28 Compact 34

Installing: libXpm-3.5.11-3.el7.x86_64 29 Compact 34

Installing: php-gd-5.4.16-36.3.el7_2.x86_64 30 Compact 34

Installing: zabbix-web-mysql-3.2.1-1.el7.noarch 31 Compact 34

Installing: zabbix-web-3.2.1-1.el7.noarch 32 Universe 34

Installing: fping-3.10-1.el7.x86_64 33 Compact 34

Installing: zabbix-server-mysql-3.2.1-1.el7.x86_64 34amp 34

Verifying: fping-3.10-1.el7.x86_64 1 Compact 34

Verifying: libX11-common-1.6.3-2.el7.noarch 2 Compact 34

Verifying: mailcap-2.1.41-2.el7.noarch 3 Compact 34

Verifying: iksemel-1.4-2.el7.centos.x86_64 4 Compact 34

Verifying: 2:libpng-1.5.13-7.el7_2.x86_64 5 Compact 34

Verifying: fontpackages-filesystem-1.44-8.el7.noarch 6 Compact 34

Verifying: httpd-2.4.6-40.el7.centos.4.x86_64 7 Compact 34

Verifying: OpenIPMI-libs-2.0.19-11.el7.x86_64 8 Compact 34

Verifying: zabbix-web-3.2.1-1.el7.noarch 9 Compact 34

Verifying: php-common-5.4.16-36.3.el7_2.x86_64 10 Compact 34

Verifying: php-pdo-5.4.16-36.3.el7_2.x86_64 11 Compact 34

Verifying: libX11-1.6.3-2.el7.x86_64 12lap34

Verifying: dejavu-fonts-common-2.33-6.el7.noarch 13 Compact 34

Verifying: t1lib-5.1.2-14.el7.x86_64 14 Compact 34

Verifying: php-mysql-5.4.16-36.3.el7_2.x86_64 15 Compact 34

Verifying: OpenIPMI-modalias-2.0.19-11.el7.x86_64 16 Compact 34

Verifying: zabbix-web-mysql-3.2.1-1.el7.noarch 17 Compact 34

Verifying: php-ldap-5.4.16-36.3.el7_2.x86_64 18 Compact 34

Verifying: zabbix-server-mysql-3.2.1-1.el7.x86_64 19 Compact 34

Verifying: php-xml-5.4.16-36.3.el7_2.x86_64 20 Universe 34

Verifying: libtool-ltdl-2.4.2-21.el7_2.x86_64 21 Compact 34

Verifying: php-5.4.16-36.3.el7_2.x86_64 22 Universe 34

Verifying: unixODBC-2.3.1-11.el7.x86_64 23 Compact 34

Verifying: php-cli-5.4.16-36.3.el7_2.x86_64 24 Compact 34

Verifying: libXpm-3.5.11-3.el7.x86_64 25 Compact 34

Verifying: dejavu-sans-fonts-2.33-6.el7.noarch 26 Compact 34

Verifying: libXau-1.0.8-2.1.el7.x86_64 27 Compact 34

Verifying: httpd-tools-2.4.6-40.el7.centos.4.x86_64 28 Compact 34

Verifying: php-gd-5.4.16-36.3.el7_2.x86_64 29 Compact 34

Verifying: php-mbstring-5.4.16-36.3.el7_2.x86_64 30 Compact 34

Verifying: php-bcmath-5.4.16-36.3.el7_2.x86_64 31 Compact 34

Verifying: libzip-0.10.1-8.el7.x86_64 32 Universe 34

Verifying: 1:net-snmp-libs-5.7.2-24.el7_2.1.x86_64 33 Compact 34

Verifying: libxcb-1.11-4.el7.x86_64 34amp 34

Installed:

Zabbix-server-mysql.x86_64 0VOR 3.2.1-1.el7 zabbix-web-mysql.noarch 0RU 3.2.1-1.el7

Dependency Installed:

OpenIPMI-libs.x86_64 0VOR 2.0.19-11.el7 OpenIPMI-modalias.x86_64 0VOR 2.0.19-11.el7 dejavu-fonts-common.noarch 0RU 2.33-6.el7

Dejavu-sans-fonts.noarch 0VOR 2.33-6.el7 fontpackages-filesystem.noarch 0RU 1.44-8.el7 fping.x86_64 0RU 3.10-1.el7

Httpd.x86_64 0VOR 2.4.6-40.el7.centos.4 httpd-tools.x86_64 0RU 2.4.6-40.el7.centos.4 iksemel.x86_64 0RU 1.4-2.el7.centos

LibX11.x86_64 0VOR 1.6.3-2.el7 libX11-common.noarch 0RU 1.6.3-2.el7 libXau.x86_64 0RU 1.0.8-2.1.el7

LibXpm.x86_64 0VOR 3.5.11-3.el7 libpng.x86_64 2RV 1.5.13-7.el7_2 libtool-ltdl.x86_64 0RU 2.4.2-21.el7_2

Libxcb.x86_64 0VOR 1.11-4.el7 libzip.x86_64 0RU 0.10.1-8.el7 mailcap.noarch 0RU 2.1.41-2.el7

Net-snmp-libs.x86_64 1RO 5.7.2-24.el7_2.1 php.x86_64 0RU 5.4.16-36.3.el7_2 php-bcmath.x86_64 0RO 5.4.16-36.3.el7_2

Php-cli.x86_64 0VOR 5.4.16-36.3.el7_2 php-common.x86_64 0RU 5.4.16-36.3.el7_2 php-gd.x86_64 0RU 5.4.16-36.3.el7_2

Php-ldap.x86_64 0VOR 5.4.16-36.3.el7_2 php-mbstring.x86_64 0RU 5.4.16-36.3.el7_2 php-mysql.x86_64 0RU 5.4.16-36.3.el7_2

Php-pdo.x86_64 0VOR 5.4.16-36.3.el7_2 php-xml.x86_64 0RU 5.4.16-36.3.el7_2 t1lib.x86_64 0RU 5.1.2-14.el7

UnixODBC.x86_64 0VOR 2.3.1-11.el7 zabbix-web.noarch 0RU 3.2.1-1.el7

Complete!

> > try to enter the database and find that it is not installed. Here are the steps to install and extract zabbix.

[root@zabbix-server cache] # mysql-uroot-p

-bash: mysql: command not found

[root@zabbix-server cache] # mysqld-uroot-p

-bash: mysqld: command not found

[root@zabbix-server cache] #

[root@zabbix-server cache] #

[root@zabbix-server cache] #

[root@zabbix-server cache] #

[root@zabbix-server cache] # yum install wget

Loaded plugins: fastestmirror

Loading mirror speeds from cached hostfile

* base: mirrors.zju.edu.cn

* extras: mirrors.163.com

* updates: mirrors.tuna.tsinghua.edu.cn

Resolving Dependencies

-> Running transaction check

-> Package wget.x86_64 0RU 1.14-10.el7_0.1 will be installed

-> Finished Dependency Resolution

Dependencies Resolved

=

Package Arch Version Repository Size

=

Installing:

Wget x8631 64 1.14-10.el7_0.1 base 545k

Transaction Summary

=

Install 1 Package

Total size: 545 k

Installed size: 2.0 M

Is this ok [y/d/N]: y

Downloading packages:

Running transaction check

Running transaction test

Transaction test succeeded

Running transaction

Installing: wget-1.14-10.el7_0.1.x86_64 1 Compact 1

Verifying: wget-1.14-10.el7_0.1.x86_64 1 Compact 1

Installed:

Wget.x86_64 0vl 1.14-10.el7_0.1

Complete!

> > add mysql Feed

[root@zabbix-server cache] # wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm

-- 2016-12-01 06 Fran 27RV 17muri-http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm

Resolving repo.mysql.com (repo.mysql.com)... 23.49.6.178

Connecting to repo.mysql.com (repo.mysql.com) | 23.49.6.178 |: 80. Connected.

HTTP request sent, awaiting response... 200 OK

Length: 6140 (6.0K) [application/x-redhat-package-manager]

Saving to: 'mysql-community-release-el7-5.noarch.rpm'

6140 4.13KB/s in 1.5s

2016-12-01 06:27:24 (4.13 KB/s)-'mysql-community-release-el7-5.noarch.rpm' saved [6140and6140]

> > confirm the package

[root@zabbix-server cache] # ls

Httpd ldconfig man mysql-community-release-el7-5.noarch.rpm yum

[root@zabbix-server cache] # rpm-ivh mysql-community-release-el7-5.noarch.rpm

Preparing... # # [100%]

Updating / installing...

1:mysql-community-release-el7-5 # #

[root@zabbix-server cache] # yum install mysql-community-server

Loaded plugins: fastestmirror

Loading mirror speeds from cached hostfile

* base: mirrors.zju.edu.cn

* extras: mirrors.163.com

* updates: mirrors.tuna.tsinghua.edu.cn

Resolving Dependencies

-> Running transaction check

-> Package mysql-community-server.x86_64 0RU 5.6.34-2.el7 will be installed

-- > Processing Dependency: mysql-community-common (x86-64) = 5.6.34-2.el7 for package: mysql-community-server-5.6.34-2.el7.x86_64

-- > Processing Dependency: mysql-community-client (x86-64) > = 5.6.10 for package: mysql-community-server-5.6.34-2.el7.x86_64

-> Processing Dependency: perl (DBI) for package: mysql-community-server-5.6.34-2.el7.x86_64

-> Running transaction check

-> Package mysql-community-client.x86_64 0RU 5.6.34-2.el7 will be installed

-- > Processing Dependency: mysql-community-libs (x86-64) > = 5.6.10 for package: mysql-community-client-5.6.34-2.el7.x86_64

-> Package mysql-community-common.x86_64 0RU 5.6.34-2.el7 will be installed

-> Package perl-DBI.x86_64 0RU 1.627-4.el7 will be installed

-- > Processing Dependency: perl (RPC::PlServer) > = 0.2001 for package: perl-DBI-1.627-4.el7.x86_64

-- > Processing Dependency: perl (RPC::PlClient) > = 0.2000 for package: perl-DBI-1.627-4.el7.x86_64

-> Running transaction check

-> Package mariadb-libs.x86_64 1Rank 5.5.44-2.el7.centos will be obsoleted

-> Package mysql-community-libs.x86_64 0RU 5.6.34-2.el7 will be obsoleting

-> Package perl-PlRPC.noarch 0rime 0.2020-14.el7 will be installed

-- > Processing Dependency: perl (Net::Daemon) > = 0.13 for package: perl-PlRPC-0.2020-14.el7.noarch

-> Processing Dependency: perl (Net::Daemon::Test) for package: perl-PlRPC-0.2020-14.el7.noarch

-> Processing Dependency: perl (Net::Daemon::Log) for package: perl-PlRPC-0.2020-14.el7.noarch

-> Processing Dependency: perl (Compress::Zlib) for package: perl-PlRPC-0.2020-14.el7.noarch

-> Running transaction check

-> Package perl-IO-Compress.noarch 0RU 2.061-2.el7 will be installed

-- > Processing Dependency: perl (Compress::Raw::Zlib) > = 2.061 for package: perl-IO-Compress-2.061-2.el7.noarch

-- > Processing Dependency: perl (Compress::Raw::Bzip2) > = 2.061 for package: perl-IO-Compress-2.061-2.el7.noarch

-> Package perl-Net-Daemon.noarch 0RU 0.48-5.el7 will be installed

-> Running transaction check

-> Package perl-Compress-Raw-Bzip2.x86_64 0RU 2.061-3.el7 will be installed

-> Package perl-Compress-Raw-Zlib.x86_64 1 2.061-4.el7 will be installed

-> Finished Dependency Resolution

Dependencies Resolved

=

Package Arch Version Repository Size

=

Installing:

Mysql-community-libs x8631 64 5.6.34-2.el7 mysql56-community 2.0m

Replacing mariadb-libs.x86_64 1Rank 5.5.44-2.el7.centos

Mysql-community-server x8631 64 5.6.34-2.el7 mysql56-community 59m

Installing for dependencies:

Mysql-community-client x8631 64 5.6.34-2.el7 mysql56-community 19m

Mysql-community-common x8631 64 5.6.34-2.el7 mysql56-community 257k

Perl-Compress-Raw-Bzip2 x8631 64 2.061-3.el7 base 32k

Perl-Compress-Raw-Zlib x86x 64 1purl 2.061-4.el7 base 57k

Perl-DBI x8631 64 1.627-4.el7 base 802k

Perl-IO-Compress noarch 2.061-2.el7 base 260k

Perl-Net-Daemon noarch 0.48-5.el7 base 51k

Perl-PlRPC noarch 0.2020-14.el7 base 36k

Transaction Summary

=

Install 2 Packages (+ 8 Dependent packages)

Total size: 82 M

Is this ok [y/d/N]: y

Downloading packages:

Warning: / var/cache/yum/x86_64/7/mysql56-community/packages/mysql-community-server-5.6.34-2.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY

Retrieving key from file:/etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

Importing GPG key 0x5072E1F5:

Userid: "MySQL Release Engineering"

Fingerprint: a4a9 4068 76fc bd3c 4567 70c8 8c71 8d3b 5072 e1f5

Package: mysql-community-release-el7-5.noarch (installed)

From: file:/etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

Is this ok [y/N]: y

Running transaction check

Running transaction test

Transaction test succeeded

Running transaction

Warning: RPMDB altered outside of yum.

Installing: mysql-community-common-5.6.34-2.el7.x86_64 1Comp11

Installing: mysql-community-libs-5.6.34-2.el7.x86_64 2 Compact 11

Installing: mysql-community-client-5.6.34-2.el7.x86_64 3Comp11

Installing: perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64 4Comp11

Installing: 1:perl-Compress-Raw-Zlib-2.061-4.el7.x86_64 5Comp11

Installing: perl-IO-Compress-2.061-2.el7.noarch 6Comp11

Installing: perl-Net-Daemon-0.48-5.el7.noarch 7 Compact 11

Installing: perl-PlRPC-0.2020-14.el7.noarch 8Comp11

Installing: perl-DBI-1.627-4.el7.x86_64 9 Compact 11

Installing: mysql-community-server-5.6.34-2.el7.x86_64 10 Universe 11

Erasing: 1:mariadb-libs-5.5.44-2.el7.centos.x86_64 11 Compact 11

Verifying: perl-Net-Daemon-0.48-5.el7.noarch 1Comp11

Verifying: perl-IO-Compress-2.061-2.el7.noarch 2 Compact 11

Verifying: mysql-community-server-5.6.34-2.el7.x86_64 3Comp11

Verifying: mysql-community-client-5.6.34-2.el7.x86_64 4 Compact 11

Verifying: mysql-community-libs-5.6.34-2.el7.x86_64 5Comp11

Verifying: 1:perl-Compress-Raw-Zlib-2.061-4.el7.x86_64 6Comp11

Verifying: perl-DBI-1.627-4.el7.x86_64 7 Compact 11

Verifying: perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64 8Comp11

Verifying: perl-PlRPC-0.2020-14.el7.noarch 9 Compact 11

Verifying: mysql-community-common-5.6.34-2.el7.x86_64 10 Universe 11

Verifying: 1:mariadb-libs-5.5.44-2.el7.centos.x86_64 11 Compact 11

Installed:

Mysql-community-libs.x86_64 0VOR 5.6.34-2.el7 mysql-community-server.x86_64 0RU 5.6.34-2.el7

Dependency Installed:

Mysql-community-client.x86_64 0VOR 5.6.34-2.el7 mysql-community-common.x86_64 0RU 5.6.34-2.el7 perl-Compress-Raw-Bzip2.x86_64 0RU 2.061-3.el7

Perl-Compress-Raw-Zlib.x86_64 1VOR 2.061-4.el7 perl-DBI.x86_64 0RU 1.627-4.el7 perl-IO-Compress.noarch 0RU 2.061-2.el7

Perl-Net-Daemon.noarch 0VOR 0.48-5.el7 perl-PlRPC.noarch 0RO 0.2020-14.el7

Replaced:

Mariadb-libs.x86_64 1Rank 5.5.44-2.el7.centos

Complete!

[root@zabbix-server cache] # systemctl enable mysqld

[root@zabbix-server cache] # systemctl start mysqld

By default, it seems that you can't enter the database, so I just initialize the database directly.

[root@zabbix-server cache] # mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL

SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!

In order to log into MySQL to secure it, we'll need the current

Password for the root user. If you've just installed MySQL, and

You haven't set the root password yet, the password will be blank

So you should just press enter here.

Enter current password for root (enter for none):

OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MySQL

Root user without the proper authorisation.

Set root password? [Y/n] y

New password: enter the password you need to set

Re-enter new password: confirm the password you entered

Password updated successfully!

Reloading privilege tables..

... Success!

By default, a MySQL installation has an anonymous user, allowing anyone

To log into MySQL without having to have a user account created for

Them. This is intended only for testing, and to make the installation

Go a bit smoother. You should remove them before moving into a

Production environment.

Remove anonymous users? [Y/n] y

... Success!

Normally, root should only be allowed to connect from 'localhost'. This

Ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y

... Success!

By default, MySQL comes with a database named 'test' that anyone can

Access. This is also intended only for testing, and should be removed

Before moving into a production environment.

Remove test database and access to it? [Y/n] y

-Dropping test database...

ERROR 1008 (HY000) at line 1: Can't drop database 'test'; database doesn't exist

... Failed! Not critical, keep moving...

-Removing privileges on test database...

... Success!

Reloading the privilege tables will ensure that all changes made so far

Will take effect immediately.

Reload privilege tables now? [Y/n] y

... Success!

All done! If you've completed all of the above steps, your MySQL

Installation should now be secure.

Thanks for using MySQL!

Cleaning up...

[root@zabbix-server cache] # mysql-uroot-p

Enter password: enter the password you set

Welcome to the MySQL monitor. Commands end with; or\ g.

Your MySQL connection id is 13

Server version: 5.6.34 MySQL Community Server (GPL)

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its

Affiliates. Other names may be trademarks of their respective

Owners.

Type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement.

Mysql > create database zabbix character set utf8 collate utf8_bin

Query OK, 1 row affected (0.00 sec)

> > the password of the database is set here, which is also needed in web.

Mysql > grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix'

Query OK, 0 rows affected (0.00 sec)

Mysql > quit

Bye

> > Import database

[root@zabbix-server cache] # cd / usr/share/doc/zabbix-server-mysql-3.2.1/

[root@zabbix-server zabbix-server-mysql-3.2.1] # ls

AUTHORS ChangeLog COPYING create.sql.gz NEWS README

[root@zabbix-server zabbix-server-mysql-3.2.1] # zcat / usr/share/doc/zabbix-server-mysql-3.2.1/create.sql.gz | mysql- uzabbix-p zabbix

Enter password:

ERROR 1045 (28000): Access denied for user 'zabbix'@'localhost' (using password: YES)

[root@zabbix-server zabbix-server-mysql-3.2.1] # zcat / usr/share/doc/zabbix-server-mysql-3.2.1/create.sql.gz | mysql- uzabbix-p zabbix

Enter password:

[root@zabbix-server zabbix-server-mysql-3.2.1] # systemctl start zabbix-server

> > the following are the areas that need to be changed in VIM. You can delete all the comments.

[root@zabbix-server zabbix-server-mysql-3.2.1] # cat / etc/zabbix/zabbix_server.conf | grep DBHost

# Option: DBHost

# DBHost=localhost

[root@zabbix-server zabbix-server-mysql-3.2.1] # cat / etc/zabbix/zabbix_server.conf | grep DBNam

# Option: DBName

# DBName=

DBName=zabbix

[root@zabbix-server zabbix-server-mysql-3.2.1] # cat / etc/zabbix/zabbix_server.conf | grep DBUser

# For SQLite3 path to database file must be provided. DBUser and DBPassword are ignored.

# Option: DBUser

# DBUser=

DBUser=zabbix

[root@zabbix-server zabbix-server-mysql-3.2.1] # cat / etc/zabbix/zabbix_server.conf | grep DBPassword

# For SQLite3 path to database file must be provided. DBUser and DBPassword are ignored.

# Option: DBPassword

# DBPassword=

[root@zabbix-server zabbix-server-mysql-3.2.1] # vim / etc/zabbix/zabbix_server.conf

[root@zabbix-server zabbix-server-mysql-3.2.1] # systemctl start zabbix-server

[root@zabbix-server zabbix-server-mysql-3.2.1] # systemctl enable zabbix-server

Created symlink from / etc/systemd/system/multi-user.target.wants/zabbix-server.service to / usr/lib/systemd/system/zabbix-server.service.

[root@zabbix-server zabbix-server-mysql-3.2.1] # cat / etc/php.ini | grep date.timezone

; http://php.net/date.timezone

; date.timezone =

[root@zabbix-server zabbix-server-mysql-3.2.1] # vim / etc/php.ini

[root@zabbix-server zabbix-server-mysql-3.2.1] # cat / etc/php.ini | grep date.timezone

; http://php.net/date.timezone

Date.timezone = Asia/Shanghai

[root@zabbix-server zabbix-server-mysql-3.2.1] # systemctl start httpd

[root@zabbix-server zabbix-server-mysql-3.2.1] # systemctl enable httpd

Created symlink from / etc/systemd/system/multi-user.target.wants/httpd.service to / usr/lib/systemd/system/httpd.service.

[root@zabbix-server zabbix-server-mysql-3.2.1] # systemctl stop firewalld

[root@zabbix-server zabbix-server-mysql-3.2.1] # systemctl restart httpd

I won't upload pictures or anything. It's basically the password you set up.

All items in the initialization configuration must be passed. If you change the configuration, you must restart httpd.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report