重置密码

sudo passwd root

[lighthouse@VM-12-2-centos ~]$ sudo passwd root
Changing password for user root.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
切换root用户

su

[lighthouse@VM-12-2-centos ~]$ su
Password:
查看系统版本

uname -r

[root@VM-12-2-centos lighthouse]# uname -r
3.10.0-1160.71.1.el7.x86_64

uname -a

docker官方说至少3.8以上,建议3.10以上

[root@VM-12-2-centos lighthouse]# uname -a
Linux VM-12-2-centos 3.10.0-1160.71.1.el7.x86_64 #1 SMP Tue Jun 28 15:37:28 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
[root@VM-12-2-centos lighthouse]#
更新yum包

yum update

[root@VM-12-2-centos lighthouse]# yum update
Loaded plugins: fastestmirror, langpacks
Repository epel is listed more than once in the configuration
Determining fastest mirrors
epel                                                                                                                         | 4.7 kB  00:00:00
extras                                                                                                                       | 2.9 kB  00:00:00
os                                                                                                                           | 3.6 kB  00:00:00
updates                                                                                                                      | 2.9 kB  00:00:00
(1/5): epel/7/x86_64/group_gz                                                                                                |  98 kB  00:00:00
(2/5): epel/7/x86_64/updateinfo                                                                                              | 1.0 MB  00:00:00
(3/5): extras/7/x86_64/primary_db                                                                                            | 249 kB  00:00:00
(4/5): epel/7/x86_64/primary_db                                                                                              | 7.0 MB  00:00:00
(5/5): updates/7/x86_64/primary_db                                                                                           |  17 MB  00:00:00
Resolving Dependencies
--> Running transaction check
---> Package bind-export-libs.x86_64 32:9.11.4-26.P2.el7_9.9 will be updated
---> Package bind-export-libs.x86_64 32:9.11.4-26.P2.el7_9.10 will be an update
---> Package bind-libs.x86_64 32:9.11.4-26.P2.el7_9.9 will be updated
---> Package bind-libs.x86_64 32:9.11.4-26.P2.el7_9.10 will be an update
---> Package bind-libs-lite.x86_64 32:9.11.4-26.P2.el7_9.9 will be updated
---> Package bind-libs-lite.x86_64 32:9.11.4-26.P2.el7_9.10 will be an update
---> Package bind-license.noarch 32:9.11.4-26.P2.el7_9.9 will be updated
---> Package bind-license.noarch 32:9.11.4-26.P2.el7_9.10 will be an update
---> Package bind-utils.x86_64 32:9.11.4-26.P2.el7_9.9 will be updated
---> Package bind-utils.x86_64 32:9.11.4-26.P2.el7_9.10 will be an update
---> Package bpftool.x86_64 0:3.10.0-1160.71.1.el7 will be updated
---> Package bpftool.x86_64 0:3.10.0-1160.76.1.el7 will be an update
---> Package ca-certificates.noarch 0:2021.2.50-72.el7_9 will be updated
---> Package ca-certificates.noarch 0:2022.2.54-74.el7_9 will be an update
---> Package expat.x86_64 0:2.1.0-14.el7_9 will be updated
---> Package expat.x86_64 0:2.1.0-15.el7_9 will be an update
---> Package expat-devel.x86_64 0:2.1.0-14.el7_9 will be updated
---> Package expat-devel.x86_64 0:2.1.0-15.el7_9 will be an update
---> Package kernel.x86_64 0:3.10.0-1160.76.1.el7 will be installed
---> Package kernel-devel.x86_64 0:3.10.0-1160.76.1.el7 will be installed
---> Package kernel-headers.x86_64 0:3.10.0-1160.71.1.el7 will be updated
---> Package kernel-headers.x86_64 0:3.10.0-1160.76.1.el7 will be an update
---> Package nspr.x86_64 0:4.32.0-1.el7_9 will be updated
---> Package nspr.x86_64 0:4.34.0-3.1.el7_9 will be an update
---> Package nss.x86_64 0:3.67.0-4.el7_9 will be updated
---> Package nss.x86_64 0:3.79.0-4.el7_9 will be an update
---> Package nss-softokn.x86_64 0:3.67.0-3.el7_9 will be updated
---> Package nss-softokn.x86_64 0:3.79.0-4.el7_9 will be an update
---> Package nss-softokn-freebl.x86_64 0:3.67.0-3.el7_9 will be updated
---> Package nss-softokn-freebl.x86_64 0:3.79.0-4.el7_9 will be an update
---> Package nss-sysinit.x86_64 0:3.67.0-4.el7_9 will be updated
---> Package nss-sysinit.x86_64 0:3.79.0-4.el7_9 will be an update
---> Package nss-tools.x86_64 0:3.67.0-4.el7_9 will be updated
---> Package nss-tools.x86_64 0:3.79.0-4.el7_9 will be an update
---> Package nss-util.x86_64 0:3.67.0-1.el7_9 will be updated
---> Package nss-util.x86_64 0:3.79.0-1.el7_9 will be an update
---> Package python-perf.x86_64 0:3.10.0-1160.71.1.el7 will be updated
---> Package python-perf.x86_64 0:3.10.0-1160.76.1.el7 will be an update
---> Package rsync.x86_64 0:3.1.2-10.el7 will be updated
---> Package rsync.x86_64 0:3.1.2-11.el7_9 will be an update
---> Package systemd.x86_64 0:219-78.el7_9.5 will be updated
---> Package systemd.x86_64 0:219-78.el7_9.7 will be an update
---> Package systemd-libs.x86_64 0:219-78.el7_9.5 will be updated
---> Package systemd-libs.x86_64 0:219-78.el7_9.7 will be an update
---> Package systemd-python.x86_64 0:219-78.el7_9.5 will be updated
---> Package systemd-python.x86_64 0:219-78.el7_9.7 will be an update
---> Package systemd-sysv.x86_64 0:219-78.el7_9.5 will be updated
---> Package systemd-sysv.x86_64 0:219-78.el7_9.7 will be an update
---> Package tuned.noarch 0:2.11.0-11.el7_9 will be updated
---> Package tuned.noarch 0:2.11.0-12.el7_9 will be an update
---> Package tzdata.noarch 0:2022a-1.el7 will be updated
---> Package tzdata.noarch 0:2022e-1.el7 will be an update
---> Package xfsdump.x86_64 0:3.1.7-1.el7 will be updated
---> Package xfsdump.x86_64 0:3.1.7-2.el7_9 will be an update
--> Finished Dependency ResolutionDependencies Resolved====================================================================================================================================================Package                                Arch                       Version                                        Repository                   Size
====================================================================================================================================================Installing:kernel                                 x86_64                     3.10.0-1160.76.1.el7                           updates                      50 Mkernel-devel                           x86_64                     3.10.0-1160.76.1.el7                           updates                      18 M
Updating:bind-export-libs                       x86_64                     32:9.11.4-26.P2.el7_9.10                       updates                     1.1 Mbind-libs                              x86_64                     32:9.11.4-26.P2.el7_9.10                       updates                     158 kbind-libs-lite                         x86_64                     32:9.11.4-26.P2.el7_9.10                       updates                     1.1 Mbind-license                           noarch                     32:9.11.4-26.P2.el7_9.10                       updates                      91 kbind-utils                             x86_64                     32:9.11.4-26.P2.el7_9.10                       updates                     261 kbpftool                                x86_64                     3.10.0-1160.76.1.el7                           updates                     8.5 Mca-certificates                        noarch                     2022.2.54-74.el7_9                             updates                     911 kexpat                                  x86_64                     2.1.0-15.el7_9                                 updates                      83 kexpat-devel                            x86_64                     2.1.0-15.el7_9                                 updates                      58 kkernel-headers                         x86_64                     3.10.0-1160.76.1.el7                           updates                     9.1 Mnspr                                   x86_64                     4.34.0-3.1.el7_9                               updates                     128 knss                                    x86_64                     3.79.0-4.el7_9                                 updates                     895 knss-softokn                            x86_64                     3.79.0-4.el7_9                                 updates                     379 knss-softokn-freebl                     x86_64                     3.79.0-4.el7_9                                 updates                     337 knss-sysinit                            x86_64                     3.79.0-4.el7_9                                 updates                      66 knss-tools                              x86_64                     3.79.0-4.el7_9                                 updates                     555 knss-util                               x86_64                     3.79.0-1.el7_9                                 updates                      80 kpython-perf                            x86_64                     3.10.0-1160.76.1.el7                           updates                     8.2 Mrsync                                  x86_64                     3.1.2-11.el7_9                                 updates                     408 ksystemd                                x86_64                     219-78.el7_9.7                                 updates                     5.1 Msystemd-libs                           x86_64                     219-78.el7_9.7                                 updates                     419 ksystemd-python                         x86_64                     219-78.el7_9.7                                 updates                     146 ksystemd-sysv                           x86_64                     219-78.el7_9.7                                 updates                      97 ktuned                                  noarch                     2.11.0-12.el7_9                                updates                     270 ktzdata                                 noarch                     2022e-1.el7                                    updates                     495 kxfsdump                                x86_64                     3.1.7-2.el7_9                                  updates                     308 kTransaction Summary
====================================================================================================================================================Install   2 Packages
Upgrade  26 PackagesTotal download size: 107 M
Is this ok [y/d/N]: y
Downloading packages:
No Presto metadata available for updates
(1/28): bind-libs-9.11.4-26.P2.el7_9.10.x86_64.rpm                                                                           | 158 kB  00:00:00
(2/28): bind-export-libs-9.11.4-26.P2.el7_9.10.x86_64.rpm                                                                    | 1.1 MB  00:00:00
(3/28): bind-license-9.11.4-26.P2.el7_9.10.noarch.rpm                                                                        |  91 kB  00:00:00
(4/28): bind-libs-lite-9.11.4-26.P2.el7_9.10.x86_64.rpm                                                                      | 1.1 MB  00:00:00
(5/28): bind-utils-9.11.4-26.P2.el7_9.10.x86_64.rpm                                                                          | 261 kB  00:00:00
(6/28): ca-certificates-2022.2.54-74.el7_9.noarch.rpm                                                                        | 911 kB  00:00:00
(7/28): expat-2.1.0-15.el7_9.x86_64.rpm                                                                                      |  83 kB  00:00:00
(8/28): expat-devel-2.1.0-15.el7_9.x86_64.rpm                                                                                |  58 kB  00:00:00
(9/28): bpftool-3.10.0-1160.76.1.el7.x86_64.rpm                                                                              | 8.5 MB  00:00:00
(10/28): kernel-devel-3.10.0-1160.76.1.el7.x86_64.rpm                                                                        |  18 MB  00:00:00
(11/28): kernel-3.10.0-1160.76.1.el7.x86_64.rpm                                                                              |  50 MB  00:00:00
(12/28): kernel-headers-3.10.0-1160.76.1.el7.x86_64.rpm                                                                      | 9.1 MB  00:00:00
(13/28): nspr-4.34.0-3.1.el7_9.x86_64.rpm                                                                                    | 128 kB  00:00:00
(14/28): nss-3.79.0-4.el7_9.x86_64.rpm                                                                                       | 895 kB  00:00:00
(15/28): nss-softokn-3.79.0-4.el7_9.x86_64.rpm                                                                               | 379 kB  00:00:00
(16/28): nss-softokn-freebl-3.79.0-4.el7_9.x86_64.rpm                                                                        | 337 kB  00:00:00
(17/28): nss-sysinit-3.79.0-4.el7_9.x86_64.rpm                                                                               |  66 kB  00:00:00
(18/28): nss-util-3.79.0-1.el7_9.x86_64.rpm                                                                                  |  80 kB  00:00:00
(19/28): nss-tools-3.79.0-4.el7_9.x86_64.rpm                                                                                 | 555 kB  00:00:00
(20/28): rsync-3.1.2-11.el7_9.x86_64.rpm                                                                                     | 408 kB  00:00:00
(21/28): systemd-219-78.el7_9.7.x86_64.rpm                                                                                   | 5.1 MB  00:00:00
(22/28): python-perf-3.10.0-1160.76.1.el7.x86_64.rpm                                                                         | 8.2 MB  00:00:00
(23/28): systemd-libs-219-78.el7_9.7.x86_64.rpm                                                                              | 419 kB  00:00:00
(24/28): systemd-sysv-219-78.el7_9.7.x86_64.rpm                                                                              |  97 kB  00:00:00
(25/28): systemd-python-219-78.el7_9.7.x86_64.rpm                                                                            | 146 kB  00:00:00
(26/28): tuned-2.11.0-12.el7_9.noarch.rpm                                                                                    | 270 kB  00:00:00
(27/28): tzdata-2022e-1.el7.noarch.rpm                                                                                       | 495 kB  00:00:00     (28/28): xfsdump-3.1.7-2.el7_9.x86_64.rpm                                                                                    | 308 kB  00:00:00
----------------------------------------------------------------------------------------------------------------------------------------------------Total                                                                                                                57 MB/s | 107 MB  00:00:01
Running transaction check
Running transaction test
Transaction test succeeded
Running transactionUpdating   : nspr-4.34.0-3.1.el7_9.x86_64                                                                                                    1/54 Updating   : nss-util-3.79.0-1.el7_9.x86_64                                                                                                  2/54 Updating   : 32:bind-license-9.11.4-26.P2.el7_9.10.noarch                                                                                    3/54 Updating   : 32:bind-libs-lite-9.11.4-26.P2.el7_9.10.x86_64                                                                                  4/54 Updating   : systemd-libs-219-78.el7_9.7.x86_64                                                                                              5/54 Updating   : systemd-219-78.el7_9.7.x86_64                                                                                                   6/54 Updating   : 32:bind-libs-9.11.4-26.P2.el7_9.10.x86_64                                                                                       7/54 Updating   : nss-softokn-freebl-3.79.0-4.el7_9.x86_64                                                                                        8/54 Updating   : nss-softokn-3.79.0-4.el7_9.x86_64                                                                                               9/54 Updating   : nss-sysinit-3.79.0-4.el7_9.x86_64                                                                                              10/54 Updating   : nss-3.79.0-4.el7_9.x86_64                                                                                                      11/54 Updating   : python-perf-3.10.0-1160.76.1.el7.x86_64                                                                                        12/54 Updating   : expat-2.1.0-15.el7_9.x86_64                                                                                                    13/54 Updating   : expat-devel-2.1.0-15.el7_9.x86_64                                                                                              14/54 Updating   : tuned-2.11.0-12.el7_9.noarch                                                                                                   15/54 Updating   : nss-tools-3.79.0-4.el7_9.x86_64                                                                                                16/54 Updating   : 32:bind-utils-9.11.4-26.P2.el7_9.10.x86_64                                                                                     17/54 Updating   : rsync-3.1.2-11.el7_9.x86_64                                                                                                    18/54 Updating   : systemd-python-219-78.el7_9.7.x86_64                                                                                           19/54 Updating   : systemd-sysv-219-78.el7_9.7.x86_64                                                                                             20/54 Updating   : ca-certificates-2022.2.54-74.el7_9.noarch                                                                                      21/54 Updating   : kernel-headers-3.10.0-1160.76.1.el7.x86_64                                                                                     22/54 Installing : kernel-devel-3.10.0-1160.76.1.el7.x86_64                                                                                       23/54 Updating   : tzdata-2022e-1.el7.noarch                                                                                                      24/54 Updating   : bpftool-3.10.0-1160.76.1.el7.x86_64                                                                                            25/54 Updating   : 32:bind-export-libs-9.11.4-26.P2.el7_9.10.x86_64                                                                               26/54 Installing : kernel-3.10.0-1160.76.1.el7.x86_64                                                                                             27/54 Updating   : xfsdump-3.1.7-2.el7_9.x86_64                                                                                                   28/54 Cleanup    : tuned-2.11.0-11.el7_9.noarch                                                                                                   29/54 Cleanup    : systemd-sysv-219-78.el7_9.5.x86_64                                                                                             30/54 Cleanup    : expat-devel-2.1.0-14.el7_9.x86_64                                                                                              31/54 Cleanup    : nss-tools-3.67.0-4.el7_9.x86_64                                                                                                32/54 Cleanup    : nss-sysinit-3.67.0-4.el7_9.x86_64                                                                                              33/54 Cleanup    : nss-3.67.0-4.el7_9.x86_64                                                                                                      34/54 Cleanup    : nss-softokn-3.67.0-3.el7_9.x86_64                                                                                              35/54 Cleanup    : 32:bind-utils-9.11.4-26.P2.el7_9.9.x86_64                                                                                      36/54 Cleanup    : 32:bind-libs-9.11.4-26.P2.el7_9.9.x86_64                                                                                       37/54 Cleanup    : systemd-python-219-78.el7_9.5.x86_64                                                                                           38/54 Cleanup    : nss-softokn-freebl-3.67.0-3.el7_9.x86_64                                                                                       39/54 Cleanup    : nss-util-3.67.0-1.el7_9.x86_64                                                                                                 40/54 Cleanup    : 32:bind-libs-lite-9.11.4-26.P2.el7_9.9.x86_64                                                                                  41/54 Cleanup    : rsync-3.1.2-10.el7.x86_64                                                                                                      42/54 Cleanup    : 32:bind-license-9.11.4-26.P2.el7_9.9.noarch                                                                                    43/54 Cleanup    : ca-certificates-2021.2.50-72.el7_9.noarch                                                                                      44/54 Cleanup    : kernel-headers-3.10.0-1160.71.1.el7.x86_64                                                                                     45/54 Cleanup    : tzdata-2022a-1.el7.noarch                                                                                                      46/54 Cleanup    : systemd-219-78.el7_9.5.x86_64                                                                                                  47/54 Cleanup    : systemd-libs-219-78.el7_9.5.x86_64                                                                                             48/54 Cleanup    : nspr-4.32.0-1.el7_9.x86_64                                                                                                     49/54 Cleanup    : expat-2.1.0-14.el7_9.x86_64                                                                                                    50/54 Cleanup    : python-perf-3.10.0-1160.71.1.el7.x86_64                                                                                        51/54 Cleanup    : bpftool-3.10.0-1160.71.1.el7.x86_64                                                                                            52/54 Cleanup    : 32:bind-export-libs-9.11.4-26.P2.el7_9.9.x86_64                                                                                53/54 Cleanup    : xfsdump-3.1.7-1.el7.x86_64                                                                                                     54/54 Verifying  : 32:bind-libs-9.11.4-26.P2.el7_9.10.x86_64                                                                                       1/54 Verifying  : systemd-libs-219-78.el7_9.7.x86_64                                                                                              2/54 Verifying  : 32:bind-license-9.11.4-26.P2.el7_9.10.noarch                                                                                    3/54 Verifying  : expat-devel-2.1.0-15.el7_9.x86_64                                                                                               4/54 Verifying  : expat-2.1.0-15.el7_9.x86_64                                                                                                     5/54 Verifying  : nspr-4.34.0-3.1.el7_9.x86_64                                                                                                    6/54 Verifying  : python-perf-3.10.0-1160.76.1.el7.x86_64                                                                                         7/54 Verifying  : nss-softokn-3.79.0-4.el7_9.x86_64                                                                                               8/54 Verifying  : 32:bind-libs-lite-9.11.4-26.P2.el7_9.10.x86_64                                                                                  9/54 Verifying  : nss-tools-3.79.0-4.el7_9.x86_64                                                                                                10/54 Verifying  : 32:bind-utils-9.11.4-26.P2.el7_9.10.x86_64                                                                                     11/54 Verifying  : rsync-3.1.2-11.el7_9.x86_64                                                                                                    12/54 Verifying  : xfsdump-3.1.7-2.el7_9.x86_64                                                                                                   13/54 Verifying  : nss-sysinit-3.79.0-4.el7_9.x86_64                                                                                              14/54 Verifying  : systemd-python-219-78.el7_9.7.x86_64                                                                                           15/54 Verifying  : kernel-3.10.0-1160.76.1.el7.x86_64                                                                                             16/54 Verifying  : 32:bind-export-libs-9.11.4-26.P2.el7_9.10.x86_64                                                                               17/54 Verifying  : bpftool-3.10.0-1160.76.1.el7.x86_64                                                                                            18/54 Verifying  : tzdata-2022e-1.el7.noarch                                                                                                      19/54 Verifying  : nss-util-3.79.0-1.el7_9.x86_64                                                                                                 20/54 Verifying  : systemd-sysv-219-78.el7_9.7.x86_64                                                                                             21/54 Verifying  : systemd-219-78.el7_9.7.x86_64                                                                                                  22/54 Verifying  : kernel-devel-3.10.0-1160.76.1.el7.x86_64                                                                                       23/54 Verifying  : kernel-headers-3.10.0-1160.76.1.el7.x86_64                                                                                     24/54 Verifying  : ca-certificates-2022.2.54-74.el7_9.noarch                                                                                      25/54 Verifying  : nss-softokn-freebl-3.79.0-4.el7_9.x86_64                                                                                       26/54 Verifying  : tuned-2.11.0-12.el7_9.noarch                                                                                                   27/54 Verifying  : nss-3.79.0-4.el7_9.x86_64                                                                                                      28/54 Verifying  : expat-2.1.0-14.el7_9.x86_64                                                                                                    29/54 Verifying  : python-perf-3.10.0-1160.71.1.el7.x86_64                                                                                        30/54 Verifying  : kernel-headers-3.10.0-1160.71.1.el7.x86_64                                                                                     31/54 Verifying  : tuned-2.11.0-11.el7_9.noarch                                                                                                   32/54 Verifying  : ca-certificates-2021.2.50-72.el7_9.noarch                                                                                      33/54 Verifying  : 32:bind-libs-9.11.4-26.P2.el7_9.9.x86_64                                                                                       34/54 Verifying  : nss-softokn-freebl-3.67.0-3.el7_9.x86_64                                                                                       35/54 Verifying  : nspr-4.32.0-1.el7_9.x86_64                                                                                                     36/54 Verifying  : systemd-python-219-78.el7_9.5.x86_64                                                                                           37/54 Verifying  : bpftool-3.10.0-1160.71.1.el7.x86_64                                                                                            38/54 Verifying  : 32:bind-libs-lite-9.11.4-26.P2.el7_9.9.x86_64                                                                                  39/54 Verifying  : nss-3.67.0-4.el7_9.x86_64                                                                                                      40/54 Verifying  : nss-tools-3.67.0-4.el7_9.x86_64                                                                                                41/54 Verifying  : tzdata-2022a-1.el7.noarch                                                                                                      42/54 Verifying  : expat-devel-2.1.0-14.el7_9.x86_64                                                                                              43/54 Verifying  : 32:bind-export-libs-9.11.4-26.P2.el7_9.9.x86_64                                                                                44/54 Verifying  : systemd-sysv-219-78.el7_9.5.x86_64                                                                                             45/54 Verifying  : xfsdump-3.1.7-1.el7.x86_64                                                                                                     46/54 Verifying  : rsync-3.1.2-10.el7.x86_64                                                                                                      47/54 Verifying  : nss-util-3.67.0-1.el7_9.x86_64                                                                                                 48/54 Verifying  : nss-sysinit-3.67.0-4.el7_9.x86_64                                                                                              49/54 Verifying  : systemd-libs-219-78.el7_9.5.x86_64                                                                                             50/54 Verifying  : nss-softokn-3.67.0-3.el7_9.x86_64                                                                                              51/54 Verifying  : 32:bind-license-9.11.4-26.P2.el7_9.9.noarch                                                                                    52/54 Verifying  : 32:bind-utils-9.11.4-26.P2.el7_9.9.x86_64                                                                                      53/54 Verifying  : systemd-219-78.el7_9.5.x86_64                                                                                                  54/54 Installed:kernel.x86_64 0:3.10.0-1160.76.1.el7                                  kernel-devel.x86_64 0:3.10.0-1160.76.1.el7                                 Updated:bind-export-libs.x86_64 32:9.11.4-26.P2.el7_9.10   bind-libs.x86_64 32:9.11.4-26.P2.el7_9.10    bind-libs-lite.x86_64 32:9.11.4-26.P2.el7_9.10  bind-license.noarch 32:9.11.4-26.P2.el7_9.10       bind-utils.x86_64 32:9.11.4-26.P2.el7_9.10   bpftool.x86_64 0:3.10.0-1160.76.1.el7           ca-certificates.noarch 0:2022.2.54-74.el7_9        expat.x86_64 0:2.1.0-15.el7_9                expat-devel.x86_64 0:2.1.0-15.el7_9             kernel-headers.x86_64 0:3.10.0-1160.76.1.el7       nspr.x86_64 0:4.34.0-3.1.el7_9               nss.x86_64 0:3.79.0-4.el7_9                     nss-softokn.x86_64 0:3.79.0-4.el7_9                nss-softokn-freebl.x86_64 0:3.79.0-4.el7_9   nss-sysinit.x86_64 0:3.79.0-4.el7_9             nss-tools.x86_64 0:3.79.0-4.el7_9                  nss-util.x86_64 0:3.79.0-1.el7_9             python-perf.x86_64 0:3.10.0-1160.76.1.el7       rsync.x86_64 0:3.1.2-11.el7_9                      systemd.x86_64 0:219-78.el7_9.7              systemd-libs.x86_64 0:219-78.el7_9.7            systemd-python.x86_64 0:219-78.el7_9.7             systemd-sysv.x86_64 0:219-78.el7_9.7         tuned.noarch 0:2.11.0-12.el7_9                  tzdata.noarch 0:2022e-1.el7                        xfsdump.x86_64 0:3.1.7-2.el7_9              Complete!
设置yum源(阿里仓库)
  • yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo(阿里仓库
  • yum-config-manager --add-repo http://download.docker.com/linux/centos/docker-ce.repo(中央仓库)

yum-config-manager --add-repo

[root@VM-12-2-centos lighthouse]# yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
Loaded plugins: fastestmirror, langpacks
Repository epel is listed more than once in the configuration
adding repo from: http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
grabbing file http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo to /etc/yum.repos.d/docker-ce.repo
repo saved to /etc/yum.repos.d/docker-ce.repo
[root@VM-12-2-centos lighthouse]#
查看可安装的docker版本

yum list docker-ce --showduplicates | sort -r

[root@VM-12-2-centos lighthouse]# yum list docker-ce --showduplicates | sort -r
Repository epel is listed more than once in the configuration
Loading mirror speeds from cached hostfile
Loaded plugins: fastestmirror, langpacks
docker-ce.x86_64            3:20.10.9-3.el7                     docker-ce-stable
docker-ce.x86_64            3:20.10.8-3.el7                     docker-ce-stable
docker-ce.x86_64            3:20.10.7-3.el7                     docker-ce-stable
docker-ce.x86_64            3:20.10.6-3.el7                     docker-ce-stable
docker-ce.x86_64            3:20.10.5-3.el7                     docker-ce-stable
docker-ce.x86_64            3:20.10.4-3.el7                     docker-ce-stable
docker-ce.x86_64            3:20.10.3-3.el7                     docker-ce-stable
docker-ce.x86_64            3:20.10.2-3.el7                     docker-ce-stable
docker-ce.x86_64            3:20.10.21-3.el7                    docker-ce-stable
docker-ce.x86_64            3:20.10.20-3.el7                    docker-ce-stable
docker-ce.x86_64            3:20.10.19-3.el7                    docker-ce-stable
docker-ce.x86_64            3:20.10.18-3.el7                    docker-ce-stable
docker-ce.x86_64            3:20.10.17-3.el7                    docker-ce-stable
docker-ce.x86_64            3:20.10.16-3.el7                    docker-ce-stable
docker-ce.x86_64            3:20.10.15-3.el7                    docker-ce-stable
docker-ce.x86_64            3:20.10.14-3.el7                    docker-ce-stable
docker-ce.x86_64            3:20.10.1-3.el7                     docker-ce-stable
docker-ce.x86_64            3:20.10.13-3.el7                    docker-ce-stable
docker-ce.x86_64            3:20.10.12-3.el7                    docker-ce-stable
docker-ce.x86_64            3:20.10.11-3.el7                    docker-ce-stable
docker-ce.x86_64            3:20.10.10-3.el7                    docker-ce-stable
docker-ce.x86_64            3:20.10.0-3.el7                     docker-ce-stable
docker-ce.x86_64            3:19.03.9-3.el7                     docker-ce-stable
docker-ce.x86_64            3:19.03.8-3.el7                     docker-ce-stable
docker-ce.x86_64            3:19.03.7-3.el7                     docker-ce-stable
docker-ce.x86_64            3:19.03.6-3.el7                     docker-ce-stable
docker-ce.x86_64            3:19.03.5-3.el7                     docker-ce-stable
docker-ce.x86_64            3:19.03.4-3.el7                     docker-ce-stable
docker-ce.x86_64            3:19.03.3-3.el7                     docker-ce-stable
docker-ce.x86_64            3:19.03.2-3.el7                     docker-ce-stable
docker-ce.x86_64            3:19.03.15-3.el7                    docker-ce-stable
docker-ce.x86_64            3:19.03.14-3.el7                    docker-ce-stable
docker-ce.x86_64            3:19.03.1-3.el7                     docker-ce-stable
docker-ce.x86_64            3:19.03.13-3.el7                    docker-ce-stable
docker-ce.x86_64            3:19.03.12-3.el7                    docker-ce-stable
docker-ce.x86_64            3:19.03.11-3.el7                    docker-ce-stable
docker-ce.x86_64            3:19.03.10-3.el7                    docker-ce-stable
docker-ce.x86_64            3:19.03.0-3.el7                     docker-ce-stable
docker-ce.x86_64            3:18.09.9-3.el7                     docker-ce-stable
docker-ce.x86_64            3:18.09.8-3.el7                     docker-ce-stable
docker-ce.x86_64            3:18.09.7-3.el7                     docker-ce-stable
docker-ce.x86_64            3:18.09.6-3.el7                     docker-ce-stable
docker-ce.x86_64            3:18.09.5-3.el7                     docker-ce-stable
docker-ce.x86_64            3:18.09.4-3.el7                     docker-ce-stable
docker-ce.x86_64            3:18.09.3-3.el7                     docker-ce-stable
docker-ce.x86_64            3:18.09.2-3.el7                     docker-ce-stable
docker-ce.x86_64            3:18.09.1-3.el7                     docker-ce-stable
docker-ce.x86_64            3:18.09.0-3.el7                     docker-ce-stable
docker-ce.x86_64            18.06.3.ce-3.el7                    docker-ce-stable
docker-ce.x86_64            18.06.2.ce-3.el7                    docker-ce-stable
docker-ce.x86_64            18.06.1.ce-3.el7                    docker-ce-stable
docker-ce.x86_64            18.06.0.ce-3.el7                    docker-ce-stable
docker-ce.x86_64            18.03.1.ce-1.el7.centos             docker-ce-stable
docker-ce.x86_64            18.03.0.ce-1.el7.centos             docker-ce-stable
docker-ce.x86_64            17.12.1.ce-1.el7.centos             docker-ce-stable
docker-ce.x86_64            17.12.0.ce-1.el7.centos             docker-ce-stable
docker-ce.x86_64            17.09.1.ce-1.el7.centos             docker-ce-stable
docker-ce.x86_64            17.09.0.ce-1.el7.centos             docker-ce-stable
docker-ce.x86_64            17.06.2.ce-1.el7.centos             docker-ce-stable
docker-ce.x86_64            17.06.1.ce-1.el7.centos             docker-ce-stable
docker-ce.x86_64            17.06.0.ce-1.el7.centos             docker-ce-stable
docker-ce.x86_64            17.03.3.ce-1.el7                    docker-ce-stable
docker-ce.x86_64            17.03.2.ce-1.el7.centos             docker-ce-stable
docker-ce.x86_64            17.03.1.ce-1.el7.centos             docker-ce-stable
docker-ce.x86_64            17.03.0.ce-1.el7.centos             docker-ce-stable
Available Packages
[root@VM-12-2-centos lighthouse]# 
安装指定版本docker

yum install

[root@VM-12-2-centos lighthouse]#  yum install docker-ce-18.03.1.ce
Loaded plugins: fastestmirror, langpacks
Repository epel is listed more than once in the configuration
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package docker-ce.x86_64 0:18.03.1.ce-1.el7.centos will be installed
--> Processing Dependency: container-selinux >= 2.9 for package: docker-ce-18.03.1.ce-1.el7.centos.x86_64
--> Processing Dependency: pigz for package: docker-ce-18.03.1.ce-1.el7.centos.x86_64
--> Processing Dependency: libcgroup for package: docker-ce-18.03.1.ce-1.el7.centos.x86_64
--> Processing Dependency: libltdl.so.7()(64bit) for package: docker-ce-18.03.1.ce-1.el7.centos.x86_64
--> Running transaction check
---> Package container-selinux.noarch 2:2.119.2-1.911c772.el7_8 will be installed
--> Processing Dependency: policycoreutils-python for package: 2:container-selinux-2.119.2-1.911c772.el7_8.noarch
---> Package libcgroup.x86_64 0:0.41-21.el7 will be installed
---> Package libtool-ltdl.x86_64 0:2.4.2-22.el7_3 will be installed
---> Package pigz.x86_64 0:2.3.4-1.el7 will be installed
--> Running transaction check
---> Package policycoreutils-python.x86_64 0:2.5-34.el7 will be installed
--> Processing Dependency: setools-libs >= 3.3.8-4 for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: libsemanage-python >= 2.5-14 for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: audit-libs-python >= 2.1.3-4 for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: python-IPy for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: libqpol.so.1(VERS_1.4)(64bit) for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: libqpol.so.1(VERS_1.2)(64bit) for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: libapol.so.4(VERS_4.0)(64bit) for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: checkpolicy for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: libqpol.so.1()(64bit) for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: libapol.so.4()(64bit) for package: policycoreutils-python-2.5-34.el7.x86_64
--> Running transaction check
---> Package audit-libs-python.x86_64 0:2.8.5-4.el7 will be installed
---> Package checkpolicy.x86_64 0:2.5-8.el7 will be installed
---> Package libsemanage-python.x86_64 0:2.5-14.el7 will be installed
---> Package python-IPy.noarch 0:0.75-6.el7 will be installed
---> Package setools-libs.x86_64 0:3.3.8-4.el7 will be installed
--> Finished Dependency ResolutionDependencies Resolved====================================================================================================================================================Package                                 Arch                    Version                                    Repository                         Size
====================================================================================================================================================Installing:docker-ce                               x86_64                  18.03.1.ce-1.el7.centos                    docker-ce-stable                   35 M
Installing for dependencies:audit-libs-python                       x86_64                  2.8.5-4.el7                                os                                 76 kcheckpolicy                             x86_64                  2.5-8.el7                                  os                                295 kcontainer-selinux                       noarch                  2:2.119.2-1.911c772.el7_8                  extras                             40 klibcgroup                               x86_64                  0.41-21.el7                                os                                 66 klibsemanage-python                      x86_64                  2.5-14.el7                                 os                                113 klibtool-ltdl                            x86_64                  2.4.2-22.el7_3                             os                                 49 kpigz                                    x86_64                  2.3.4-1.el7                                epel                               81 kpolicycoreutils-python                  x86_64                  2.5-34.el7                                 os                                457 kpython-IPy                              noarch                  0.75-6.el7                                 os                                 32 ksetools-libs                            x86_64                  3.3.8-4.el7                                os                                620 kTransaction Summary
====================================================================================================================================================Install  1 Package (+10 Dependent packages)Total download size: 36 M
Installed size: 40 M
Is this ok [y/d/N]: y
Is this ok [y/d/N]: y
Downloading packages:
(1/11): container-selinux-2.119.2-1.911c772.el7_8.noarch.rpm                                                                 |  40 kB  00:00:00
(2/11): audit-libs-python-2.8.5-4.el7.x86_64.rpm                                                                             |  76 kB  00:00:00
(3/11): libcgroup-0.41-21.el7.x86_64.rpm                                                                                     |  66 kB  00:00:00
(4/11): checkpolicy-2.5-8.el7.x86_64.rpm                                                                                     | 295 kB  00:00:00
(5/11): libsemanage-python-2.5-14.el7.x86_64.rpm                                                                             | 113 kB  00:00:00
(6/11): libtool-ltdl-2.4.2-22.el7_3.x86_64.rpm                                                                               |  49 kB  00:00:00
(7/11): python-IPy-0.75-6.el7.noarch.rpm                                                                                     |  32 kB  00:00:00
(8/11): policycoreutils-python-2.5-34.el7.x86_64.rpm                                                                         | 457 kB  00:00:00
(9/11): pigz-2.3.4-1.el7.x86_64.rpm                                                                                          |  81 kB  00:00:00
(10/11): setools-libs-3.3.8-4.el7.x86_64.rpm                                                                                 | 620 kB  00:00:00
warning: /var/cache/yum/x86_64/7/docker-ce-stable/packages/docker-ce-18.03.1.ce-1.el7.centos.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 621e9f35: NOKEY
Public key for docker-ce-18.03.1.ce-1.el7.centos.x86_64.rpm is not installed(11/11): docker-ce-18.03.1.ce-1.el7.centos.x86_64.rpm                                                                        |  35 MB  00:00:02
----------------------------------------------------------------------------------------------------------------------------------------------------Total                                                                                                                15 MB/s |  36 MB  00:00:02
Retrieving key from https://mirrors.aliyun.com/docker-ce/linux/centos/gpg
Importing GPG key 0x621E9F35:Userid     : "Docker Release (CE rpm) <docker@docker.com>"Fingerprint: 060a 61c5 1b55 8a7f 742b 77aa c52f eb6b 621e 9f35From       : https://mirrors.aliyun.com/docker-ce/linux/centos/gpg
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transactionInstalling : libcgroup-0.41-21.el7.x86_64                                                                                                    1/11 Installing : setools-libs-3.3.8-4.el7.x86_64                                                                                                 2/11 Installing : audit-libs-python-2.8.5-4.el7.x86_64                                                                                            3/11 Installing : libtool-ltdl-2.4.2-22.el7_3.x86_64                                                                                              4/11 Installing : python-IPy-0.75-6.el7.noarch                                                                                                    5/11 Installing : libsemanage-python-2.5-14.el7.x86_64                                                                                            6/11 Installing : pigz-2.3.4-1.el7.x86_64                                                                                                         7/11 Installing : checkpolicy-2.5-8.el7.x86_64                                                                                                    8/11 Installing : policycoreutils-python-2.5-34.el7.x86_64                                                                                        9/11 Installing : 2:container-selinux-2.119.2-1.911c772.el7_8.noarch                                                                             10/11
setsebool:  SELinux is disabled.Installing : docker-ce-18.03.1.ce-1.el7.centos.x86_64                                                                                       11/11 Verifying  : checkpolicy-2.5-8.el7.x86_64                                                                                                    1/11 Verifying  : docker-ce-18.03.1.ce-1.el7.centos.x86_64                                                                                        2/11 Verifying  : pigz-2.3.4-1.el7.x86_64                                                                                                         3/11 Verifying  : libsemanage-python-2.5-14.el7.x86_64                                                                                            4/11 Verifying  : 2:container-selinux-2.119.2-1.911c772.el7_8.noarch                                                                              5/11 Verifying  : python-IPy-0.75-6.el7.noarch                                                                                                    6/11 Verifying  : libtool-ltdl-2.4.2-22.el7_3.x86_64                                                                                              7/11 Verifying  : policycoreutils-python-2.5-34.el7.x86_64                                                                                        8/11 Verifying  : audit-libs-python-2.8.5-4.el7.x86_64                                                                                            9/11 Verifying  : setools-libs-3.3.8-4.el7.x86_64                                                                                                10/11 Verifying  : libcgroup-0.41-21.el7.x86_64                                                                                                   11/11 Installed:docker-ce.x86_64 0:18.03.1.ce-1.el7.centos                                                                                                        Dependency Installed:audit-libs-python.x86_64 0:2.8.5-4.el7     checkpolicy.x86_64 0:2.5-8.el7                 container-selinux.noarch 2:2.119.2-1.911c772.el7_8    libcgroup.x86_64 0:0.41-21.el7             libsemanage-python.x86_64 0:2.5-14.el7         libtool-ltdl.x86_64 0:2.4.2-22.el7_3                  pigz.x86_64 0:2.3.4-1.el7                  policycoreutils-python.x86_64 0:2.5-34.el7     python-IPy.noarch 0:0.75-6.el7                        setools-libs.x86_64 0:3.3.8-4.el7         Complete!
启动docker

systemctl start docker

[root@VM-12-2-centos lighthouse]# systemctl start docker
[root@VM-12-2-centos lighthouse]#
设置开机启用

systemctl enable docker

[root@VM-12-2-centos lighthouse]# systemctl enable  docker
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
[root@VM-12-2-centos lighthouse]# 
查看docker版本

docker version

[root@VM-12-2-centos lighthouse]# docker version
Client:Version:      18.03.1-ceAPI version:  1.37Go version:   go1.9.5Git commit:   9ee9f40Built:        Thu Apr 26 07:20:16 2018OS/Arch:      linux/amd64Experimental: falseOrchestrator: swarmServer:Engine:Version:      18.03.1-ceAPI version:  1.37 (minimum version 1.12)Go version:   go1.9.5Git commit:   9ee9f40Built:        Thu Apr 26 07:23:58 2018OS/Arch:      linux/amd64Experimental: false
[root@VM-12-2-centos lighthouse]#
[root@VM-12-2-centos lighthouse]# 

【沉浸式腾讯云服务器部署安装docker】相关推荐

  1. 腾讯云服务器入门使用-docker安装

    博主在首次安装过程中,遇到了一个错误提示: Loaded plugins: fastestmirror, langpacks Repository epel is listed more than o ...

  2. php项目部署在腾讯云服务器,腾讯云服务器部署

    腾讯云服务器部署,我们以CentOS系统为例进行说明,其它系统类同 # 一键安装PHP运行环境 我们使用 oneinstack 一键安装包进行安装,oneinstack的官网地址是:https://o ...

  3. 腾讯云安装mysql本地主机名,腾讯云服务器上安装mysql,并用navicat连接

    腾讯云服务器上安装mysql,并用navicat连接 本文标签: 服务器安全 服务器被攻击 高防防火墙 数据库 腾讯云服务器上安装mysql,并用navicat连接, 1.用xshll连接腾讯云 用f ...

  4. 阿里云服务器ECS和腾讯云服务器如何安装宝塔面板?

    目录 1.腾讯云服务器如何安装宝塔面板? 2.阿里云服务器如何安装宝塔面板? 忘记宝塔面板登录信息怎么办 Windows系统云服务器 宝塔面板是一款简单好用的服务器运维面板管理软件,支持一键LAMP/ ...

  5. 云服务器如何打补丁,腾讯云服务器如何安装Windows更新

    腾讯云服务器如何安装Windows更新?当用户在使用Windows云服务器过程中,系统提示Windows需要更新那我们该如何进行操作,今天小编就来给大家分享安装腾讯云windows更新的方法,希望此方 ...

  6. 基于腾讯云服务器部署微信小程序后台服务(Python+Django)

    一 前言 微信小程序,相信大家早已熟知,它是一种无需下载安装即可使用的轻型应用,具有跨平台和接近Native App性能体验的优势.从开发模式上说,它是前后端分离的,微信小程序负责实现前端应用,后端服 ...

  7. 腾讯云服务器部署python项目(阿里云通用)

    腾讯云服务器宝塔面板部署python项目(阿里云通用) 老师留的一项web作业完成的时候踩了很多坑,所以出个教程,大家一起学习进步. ## 购买云服务器 查看了腾讯云和阿里云的学生服务器的相关活动,为 ...

  8. 腾讯云服务器部署FTP

    腾讯云服务器,在申请成功后就可以使用远程桌面了. FTP服务器端软件 下载地址:https://filezilla-project.org/download.php?type=server FTP客户 ...

  9. 腾讯云服务器nginx安装配置

    开始配置前,需要购买一个服务器 腾讯云官网,购买过后还需要你先去备案,从提交备案到管理局通过正常大概一个星期,下面是我的备案操作记录,被腾讯云客服打电话驳回一次,因为填写的备用电话打不通,需要注意:提 ...

最新文章

  1. 2013年3月百度之星B题
  2. JS ES6 实用笔记
  3. 使用cURL执行HTTP请求(使用PROXY)
  4. VSS (Visual Source Safe 2005) 用法详解
  5. 一些关于mathematica的tips
  6. Maven下载、配置环境变量、配置本地仓库、国内镜像源、在IDEA中配置Maven
  7. 配置Exchange Server 2010数据库高可用性组(DAG)
  8. 小心陷入MySQL索引的坑
  9. 剑指 Offer 03——10
  10. Java并发编程实战————恢复中断
  11. 阳黎盛:4.11美联储预计加息,脱欧被顺延!
  12. shiro 单点登录_Shiro权限管理框架(一):Shiro的基本使用
  13. php+mysql实例注入,PHP+MYSQL注入实例与防范措施总结
  14. 液晶指定位置显示 c语言,大家看看该怎么改才能让12864液晶显示屏显示21个字符啊?...
  15. 让机器学习“如何学习”!从零开始读懂MAML!
  16. 双频wifi是什么意思 双频wifi好处有哪些
  17. 用opencv在图片上面添加水印
  18. java 字符串排列组合_java实现字符串排列组合问题
  19. php怎么给图片添加文字,使用php怎么给图片添加文字水印
  20. unbalanced enable irq

热门文章

  1. MAC 常用终端命令
  2. easypoi 语法_高中英语 | 必修1选修8必须掌握的语法重难点汇总 (全八册)
  3. jmeter-性能测试-学习笔记1
  4. MPI实现求解10的八次方内素数的个数(版本一)
  5. mysql中的整除和取余函数
  6. Android 隐藏 返回键 Home键 隐藏最下面的NAVIGATION栏
  7. html滚动条自动翻页,10款无限滚动自动翻页jquery插件
  8. SaaS平台产品架构设计
  9. 开启微信悬浮窗权限有什么用_新版微信功能!微信也可以设置主题皮肤了,不再是单调的白色,这也太好看了吧!...
  10. 开源全平台版知识付费系统源码 支持微信小程序+公众号+H5+PC端