iis服务器助手广告广告
返回顶部
首页 > 资讯 > 数据库 >zabbix-3.2安装实战
  • 530
分享到

zabbix-3.2安装实战

2024-04-02 19:04:59 530人浏览 薄情痞子
摘要

ZABBIX安装简要说明蓝色为你需要注意下的,红色基本为你需要输入的命令行cat部分会进行VIM编辑 重点部分也用颜色标识了。先安装zabbix安装数据库Mysql导入zabbix 数据库初始文件。配置相关

ZABBIX安装简要说明

蓝色为你需要注意下的,红色基本为你需要输入的命令行

cat部分会进行VIM编辑 重点部分也用颜色标识了。

  1. 先安装zabbix

  2. 安装数据库Mysql

  3. 导入zabbix 数据库初始文件。

  4. 配置相关文件,和启动相关服务。

ps:改了PHP相关文件,一定要重启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 0: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 0: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 0: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 0:3.10-1.el7 will be installed

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

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

---> Package php-mysql.x86_64 0: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 0: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 0:3.2.1-1.el7 will be installed

--> Processing Dependency: php >= 5.4 for 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 0:2.0.19-11.el7 will be installed

---> Package dejavu-sans-fonts.noarch 0: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 0: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 0:2.4.2-21.el7_2 will be installed

---> Package php.x86_64 0: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 0:5.4.16-36.3.el7_2 will be installed

---> Package php-gd.x86_64 0: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 0:5.4.16-36.3.el7_2 will be installed

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

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

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

--> Running transaction check

---> Package dejavu-fonts-common.noarch 0: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 0:2.4.6-40.el7.centos.4 will be installed

---> Package libX11.x86_64 0: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 0: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 0:2.1.41-2.el7 will be installed

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

---> Package php-common.x86_64 0: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 0:5.1.2-14.el7 will be installed

--> Running transaction check

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

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

---> Package libxcb.x86_64 0: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 0:0.10.1-8.el7 will be installed

--> Running transaction check

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

--> Finished Dependency Resolution

 

Dependencies Resolved

 

=========================================================================================================================================

 Package                               Arch                 Version                             Repository                          Size

=========================================================================================================================================

Installing:

 zabbix-server-mysql                   x86_64               3.2.1-1.el7                         zabbix                             1.8 M

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

Installing for dependencies:

 OpenIPMI-libs                         x86_64               2.0.19-11.el7                       base                               501 k

 OpenIPMI-modalias                     x86_64               2.0.19-11.el7                       base                                15 k

 dejavu-fonts-common                   noarch               2.33-6.el7                          base                                64 k

 dejavu-sans-fonts                     noarch               2.33-6.el7                          base                               1.4 M

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

 fping                                 x86_64               3.10-1.el7                          zabbix-non-supported                40 k

 httpd                                 x86_64               2.4.6-40.el7.centos.4               updates                            2.7 M

 httpd-tools                           x86_64               2.4.6-40.el7.centos.4               updates                             83 k

 iksemel                               x86_64               1.4-2.el7.centos                    zabbix-non-supported                49 k

 libX11                                x86_64               1.6.3-2.el7                         base                               605 k

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

 libXau                                x86_64               1.0.8-2.1.el7                       base                                29 k

 libXpm                                x86_64               3.5.11-3.el7                        base                                54 k

 libpng                                x86_64               2:1.5.13-7.el7_2                    updates                            213 k

 libtool-ltdl                          x86_64               2.4.2-21.el7_2                      updates                             49 k

 libxcb                                x86_64               1.11-4.el7                          base                               189 k

 libzip                                x86_64               0.10.1-8.el7                        base                                48 k

 mailcap                               noarch               2.1.41-2.el7                        base                                31 k

 net-snmp-libs                         x86_64               1:5.7.2-24.el7_2.1                  updates                            747 k

 php                                   x86_64               5.4.16-36.3.el7_2                   updates                            1.4 M

 php-bcmath                            x86_64               5.4.16-36.3.el7_2                   updates                             56 k

 php-cli                               x86_64               5.4.16-36.3.el7_2                   updates                            2.7 M

 php-common                            x86_64               5.4.16-36.3.el7_2                   updates                            563 k

 php-gd                                x86_64               5.4.16-36.3.el7_2                   updates                            126 k

 php-ldap                              x86_64               5.4.16-36.3.el7_2                   updates                             51 k

 php-mbstring                          x86_64               5.4.16-36.3.el7_2                   updates                            504 k

 php-mysql                             x86_64               5.4.16-36.3.el7_2                   updates                            100 k

 php-pdo                               x86_64               5.4.16-36.3.el7_2                   updates                             97 k

 php-xml                               x86_64               5.4.16-36.3.el7_2                   updates                            124 k

 t1lib                                 x86_64               5.1.2-14.el7                        base                               166 k

 unixODBC                              x86_64               2.3.1-11.el7                        base                               413 k

 zabbix-web                            noarch               3.2.1-1.el7                         zabbix                             3.6 M

 

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 <packager@zabbix.com>"

 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 <packager@zabbix.com>"

 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/34

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  Installing : libX11-1.6.3-2.el7.x86_64                                                                                           27/34

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  Verifying  : libX11-1.6.3-2.el7.x86_64                                                                                           12/34

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

 

Installed:

  zabbix-server-mysql.x86_64 0:3.2.1-1.el7                             zabbix-web-mysql.noarch 0:3.2.1-1.el7                           

 

Dependency Installed:

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

  dejavu-sans-fonts.noarch 0:2.33-6.el7       fontpackages-filesystem.noarch 0:1.44-8.el7     fping.x86_64 0:3.10-1.el7                 

  httpd.x86_64 0:2.4.6-40.el7.centos.4        httpd-tools.x86_64 0:2.4.6-40.el7.centos.4      iksemel.x86_64 0:1.4-2.el7.centos         

  libX11.x86_64 0:1.6.3-2.el7                 libX11-common.noarch 0:1.6.3-2.el7              libXau.x86_64 0:1.0.8-2.1.el7             

  libXpm.x86_64 0:3.5.11-3.el7                libpng.x86_64 2:1.5.13-7.el7_2                  libtool-ltdl.x86_64 0:2.4.2-21.el7_2      

  libxcb.x86_64 0:1.11-4.el7                  libzip.x86_64 0:0.10.1-8.el7                    mailcap.noarch 0:2.1.41-2.el7             

  net-snmp-libs.x86_64 1:5.7.2-24.el7_2.1     php.x86_64 0:5.4.16-36.3.el7_2                  php-bcmath.x86_64 0:5.4.16-36.3.el7_2     

  php-cli.x86_64 0:5.4.16-36.3.el7_2          php-common.x86_64 0:5.4.16-36.3.el7_2           php-gd.x86_64 0:5.4.16-36.3.el7_2         

  php-ldap.x86_64 0:5.4.16-36.3.el7_2         php-mbstring.x86_64 0:5.4.16-36.3.el7_2         php-mysql.x86_64 0:5.4.16-36.3.el7_2      

  php-pdo.x86_64 0:5.4.16-36.3.el7_2          php-xml.x86_64 0:5.4.16-36.3.el7_2              t1lib.x86_64 0:5.1.2-14.el7               

  unixODBC.x86_64 0:2.3.1-11.el7              zabbix-web.noarch 0:3.2.1-1.el7               

 

Complete!

>>尝试进入数据库,发现没有安装,下面就是安装和解压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 0:1.14-10.el7_0.1 will be installed

--> Finished Dependency Resolution

 

Dependencies Resolved

 

=========================================================================================================================================

 Package                      Arch                           Version                                  Repository                    Size

=========================================================================================================================================

Installing:

 wget                         x86_64                         1.14-10.el7_0.1                          base                         545 k

 

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/1

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

 

Installed:

  wget.x86_64 0:1.14-10.el7_0.1                                                                                                         

 

Complete!

>>添加mysql源

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

--2016-12-01 06:27:17--  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’

 

100%[===============================================================================================>] 6,140       4.13KB/s   in 1.5s  

 

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

 >>确认包

[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    ################################# [100%]

[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 0: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 0: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 0:5.6.34-2.el7 will be installed

---> Package perl-DBI.x86_64 0: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 1:5.5.44-2.el7.centos will be obsoleted

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

---> Package perl-PlRPC.noarch 0: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 0: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 0:0.48-5.el7 will be installed

--> Running transaction check

---> Package perl-Compress-Raw-Bzip2.x86_64 0: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                    x86_64                 5.6.34-2.el7                     mysql56-community                 2.0 M

     replacing  mariadb-libs.x86_64 1:5.5.44-2.el7.centos

 mysql-community-server                  x86_64                 5.6.34-2.el7                     mysql56-community                  59 M

Installing for dependencies:

 mysql-community-client                  x86_64                 5.6.34-2.el7                     mysql56-community                  19 M

 mysql-community-common                  x86_64                 5.6.34-2.el7                     mysql56-community                 257 k

 perl-Compress-Raw-Bzip2                 x86_64                 2.061-3.el7                      base                               32 k

 perl-Compress-Raw-Zlib                  x86_64                 1:2.061-4.el7                    base                               57 k

 perl-DBI                                x86_64                 1.627-4.el7                      base                              802 k

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

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

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

 

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 <mysql-build@oss.oracle.com>"

 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                                                                           1/11

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

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

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

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

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

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

  Installing : perl-PlRPC-0.2020-14.el7.noarch                                                                                      8/11

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

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

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

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

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

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

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

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

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

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

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

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

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

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

 

Installed:

  mysql-community-libs.x86_64 0:5.6.34-2.el7                         mysql-community-server.x86_64 0:5.6.34-2.el7                       

 

Dependency Installed:

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

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

  perl-Net-Daemon.noarch 0:0.48-5.el7          perl-PlRPC.noarch 0:0.2020-14.el7          

 

Replaced:

  mariadb-libs.x86_64 1:5.5.44-2.el7.centos                                                                                             

 

Complete!

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

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

>>默认貌似是进不了数据库的,于是我干脆直接初始化数据库

[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: 输入你需要设置的密码

Re-enter new password: 确认你输入的密码

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: 输入你设置的密码

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)

 >>这里设置了数据库的密码也是后面web中需要用的。

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

Query OK, 0 rows affected (0.00 sec)

 

mysql> quit;

Bye

>>导入数据库

[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

>>以下为VIM需要变更的地方,注释的都删除即可。

[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

 

图片什么的我就不上传了,基本就是你设置中的密码  

初始化配置中 所有项都必须通过,改了配置一定要重启httpd  


 


 


 


 


 



您可能感兴趣的文档:

--结束END--

本文标题: zabbix-3.2安装实战

本文链接: https://www.lsjlt.com/news/42502.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • zabbix 2.0.X安装
    file /sbin/init #查看32/64位机器uname -r#查看linxu版本yum -y install gcc gcc-c++ autoconf httpd php mysql lrzsz ...
    99+
    2024-04-02
  • 如何安装zabbix
    小编给大家分享一下如何安装zabbix,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧!Zabbix是一款能够监控各种网络参数以及服务器健康性和完整性的软件。Zabb...
    99+
    2023-06-27
  • [Linux7] zabbix 3.2.11安装
    zabbix 3.2.11关闭selinux[root@vm4 ~]$ vi /etc/selinux/config SELINUX=disabled1.安装lamp[root@vm4 ~]$ yum install -y mariadb[...
    99+
    2023-06-06
  • Zabbix 3.0 安装部署
    zabbix软件包下载zabbix-3.0.1.tar.gzhttp://heanet.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/...
    99+
    2024-04-02
  • zabbix如何安装agent
    这篇文章主要介绍了zabbix如何安装agent,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。创建zabbix用户和组# groupadd zabbix# useradd -...
    99+
    2023-06-05
  • zabbix如何安装php
    这篇文章给大家分享的是有关zabbix如何安装php的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。1,安装php可通过官网进行下(wget http://www.php.net/...
    99+
    2024-04-02
  • centos 6.5安装zabbix 4.4
    本环境,使用单机部署。操作系统:centos 7.5 x64zabbix-server,Mysql,php,nginx都在同一台服务器。都是使用Yum安装的! 官方安装文档:https://www.zabbix.com/downl...
    99+
    2023-01-31
    centos zabbix
  • Debian10安装Zabbix教程
    Debian10安装Zabbix教程 ​ zabbix分为server端和agent端,本文分为两个部分分别讨论其安装方法。对于zabbix的agent端的不同环境也做了详细阐述。 Zabbix-se...
    99+
    2023-09-02
    zabbix php apache
  • 基于docker安装zabbix实例分析
    这篇文章主要介绍“基于docker安装zabbix实例分析”,在日常操作中,相信很多人在基于docker安装zabbix实例分析问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”基于docker安装zabbix实...
    99+
    2023-06-30
  • Cent OS 7.x 安装Zabbix
    系统环境:     VMware Workstation 12 Pro 12.5.0Cent OS 7.3_1611Zabbix 3.2---以下操作均以root身份操作---1:设置网卡为开机启动Shell>ifconfig1.  ...
    99+
    2023-01-31
    OS Cent Zabbix
  • 如何编译安装zabbix
    这篇文章主要为大家展示了“如何编译安装zabbix”,内容简而易懂,条理清晰,希望能够帮助大家解决疑惑,下面让小编带领大家一起研究并学习一下“如何编译安装zabbix”这篇文章吧。1.下载资源下载安装包(自行去网上搜索)获取包zabbix-...
    99+
    2023-06-04
  • Zabbix怎么安装配置
    今天小编给大家分享一下Zabbix怎么安装配置的相关知识点,内容详细,逻辑清晰,相信大部分人都还太了解这方面的知识,所以分享这篇文章给大家参考一下,希望大家阅读完这篇文章后有所收获,下面我们一起来了解一下吧。Zabbix是一款能够监控各种网...
    99+
    2023-06-27
  • Zabbix的详细安装部署
    目录 1.架构 2.安装  1)所有机器关闭防火墙和selinux  2)准备两台机器,一台用做server,一台用做agent,mysql部署在server端的机器上。  3)在10.8.156.38 安装zabbix的存储库  4)安装...
    99+
    2023-08-31
    zabbix 数据库 服务器 linux
  • ESXi8.0安装,实体机安装,IPMI远程安装实战笔记
    目录 1.前言 2.连接主板IMPI 3.硬件兼容及BIOS设置 4.从U盘安装ESXi ESXi8.0安装包下载: 链接:https://pan.baidu.com/s/1-a3ka1TAScFPtAc29jcxzQ  提取码:qwh...
    99+
    2023-09-01
    linux 运维 服务器
  • Linux下zabbix的安装步骤
    如果你需要安装zabbix的机器可以联网,那么你可以按照我下方的步骤来安装配置zabbix所需的环境。众所周知,在Linux下安装zabbix,所需的底层环境是LAMP=linux+apache+mysql...
    99+
    2024-04-02
  • CentOS 7.3安装Zabbix 3.2.6记录
    1. 安装zabbix准备本文采用操作系统:CentOS7.3 x64   需要epel源    wget https://mirrors.tuna.tsinghua.edu....
    99+
    2024-04-02
  • 如何安装和使用Zabbix
    这篇文章主要介绍了如何安装和使用Zabbix,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。Zabbix 软件能够监控众多网络参数和服务器的健康度、完整性。Zabbix 使用灵...
    99+
    2023-06-28
  • 13. Docker实战之安装MySQL
    目录 1、前言 2、部署MySQL 2.1、Docker仓库查看镜像 2.2、拉取MySQL镜像 2.3、创建持久化目录 2.4、启动MySQL容器 2.5、查看宿主机上的MySQL目录 2.6、本地MySQL测试 2.7、新建MySQL...
    99+
    2023-09-03
    docker mysql 运维 云原生 linux 容器
  • 【zabbix】Centos7安装zabbix6.0版本配置
    目录 环境说明 一、部署Nginx+PHP 1、安装Nginx 2、安装PHP 3、配置Nginx 4、配置PHP 5、创建测试目录测试文件 6、启动Nginx和PHP 7、测试 二、部署数据库mariadb 1、安装mariadb 2、初...
    99+
    2023-09-03
    zabbix 服务器 运维
  • zabbix的安装和基本介绍
    这篇文章主要讲解了“zabbix的安装和基本介绍”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“zabbix的安装和基本介绍”吧!系统版本CentOS Lin...
    99+
    2024-04-02
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作