首页 > 系统相关 >Centos7.9 安装 Docker

Centos7.9 安装 Docker

时间:2024-09-23 09:48:24浏览次数:1  
标签:docker 00 x86 ce Centos7.9 64 Docker 安装 el7

由于docker被封,直接使用docker官方的教程安装会被墙,所以使用阿里云的源进行安装
参考文档:https://help.aliyun.com/zh/ecs/use-cases/install-and-use-docker-on-a-linux-ecs-instance

安装Docker

  1. 运行以下命令,下载docker-ce的yum源。
sudo wget -O /etc/yum.repos.d/docker-ce.repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
  1. 运行以下命令,安装Docker。
sudo yum -y install docker-ce

遇到的问题

1. 依赖问题 container-selinux >= 2:2.74

[root@VMS-WL001131 ~]#y yum -y install docker-ce                           
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
file:///mnt/cdrom/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /mnt/cdrom/repodata/repomd.xml"
Trying other mirror.
Resolving Dependencies
--> Running transaction check
---> Package docker-ce.x86_64 3:26.1.4-1.el7 will be installed
--> Processing Dependency: container-selinux >= 2:2.74 for package: 3:docker-ce-26.1.4-1.el7.x86_64
--> Processing Dependency: containerd.io >= 1.6.24 for package: 3:docker-ce-26.1.4-1.el7.x86_64
--> Processing Dependency: libseccomp >= 2.3 for package: 3:docker-ce-26.1.4-1.el7.x86_64
--> Processing Dependency: docker-ce-cli for package: 3:docker-ce-26.1.4-1.el7.x86_64
--> Processing Dependency: docker-ce-rootless-extras for package: 3:docker-ce-26.1.4-1.el7.x86_64
--> Processing Dependency: libcgroup for package: 3:docker-ce-26.1.4-1.el7.x86_64
--> Running transaction check
---> Package containerd.io.x86_64 0:1.6.33-3.1.el7 will be installed
--> Processing Dependency: container-selinux >= 2:2.74 for package: containerd.io-1.6.33-3.1.el7.x86_64
---> Package docker-ce.x86_64 3:26.1.4-1.el7 will be installed
--> Processing Dependency: container-selinux >= 2:2.74 for package: 3:docker-ce-26.1.4-1.el7.x86_64
---> Package docker-ce-cli.x86_64 1:26.1.4-1.el7 will be installed
--> Processing Dependency: docker-buildx-plugin for package: 1:docker-ce-cli-26.1.4-1.el7.x86_64
--> Processing Dependency: docker-compose-plugin for package: 1:docker-ce-cli-26.1.4-1.el7.x86_64
---> Package docker-ce-rootless-extras.x86_64 0:26.1.4-1.el7 will be installed
--> Processing Dependency: fuse-overlayfs >= 0.7 for package: docker-ce-rootless-extras-26.1.4-1.el7.x86_64
--> Processing Dependency: slirp4netns >= 0.4 for package: docker-ce-rootless-extras-26.1.4-1.el7.x86_64
---> Package libcgroup.x86_64 0:0.41-21.el7 will be installed
---> Package libseccomp.x86_64 0:2.3.1-4.el7 will be installed
--> Running transaction check
---> Package containerd.io.x86_64 0:1.6.33-3.1.el7 will be installed
--> Processing Dependency: container-selinux >= 2:2.74 for package: containerd.io-1.6.33-3.1.el7.x86_64
---> Package docker-buildx-plugin.x86_64 0:0.14.1-1.el7 will be installed
---> Package docker-ce.x86_64 3:26.1.4-1.el7 will be installed
--> Processing Dependency: container-selinux >= 2:2.74 for package: 3:docker-ce-26.1.4-1.el7.x86_64
---> Package docker-ce-rootless-extras.x86_64 0:26.1.4-1.el7 will be installed
--> Processing Dependency: fuse-overlayfs >= 0.7 for package: docker-ce-rootless-extras-26.1.4-1.el7.x86_64
--> Processing Dependency: slirp4netns >= 0.4 for package: docker-ce-rootless-extras-26.1.4-1.el7.x86_64
---> Package docker-compose-plugin.x86_64 0:2.27.1-1.el7 will be installed
--> Finished Dependency Resolution
Error: Package: containerd.io-1.6.33-3.1.el7.x86_64 (docker-ce-stable)
           Requires: container-selinux >= 2:2.74
Error: Package: docker-ce-rootless-extras-26.1.4-1.el7.x86_64 (docker-ce-stable)
           Requires: slirp4netns >= 0.4
Error: Package: 3:docker-ce-26.1.4-1.el7.x86_64 (docker-ce-stable)
           Requires: container-selinux >= 2:2.74
Error: Package: docker-ce-rootless-extras-26.1.4-1.el7.x86_64 (docker-ce-stable)
           Requires: fuse-overlayfs >= 0.7
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

下载安装container-selinux

https://linuxsoft.cern.ch/cern/centos/7/extras/x86_64/repoview/container-selinux.html
鼠标右键超链接,复制需要下载的rpm地址

wget https://linuxsoft.cern.ch/cern/centos/7/extras/x86_64/Packages/container-selinux-2.107-3.el7.noarch.rpm
rpm -ivh container-selinux-2.107-3.el7.noarch.rpm

再次遇到问题了,如果你没遇到就跳过

[root@VMS-WL001131 ~]# rpm -ivh container-selinux-2.107-3.el7.noarch.rpm 
warning: container-selinux-2.107-3.el7.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
error: Failed dependencies:
        policycoreutils-python is needed by container-selinux-2:2.107-3.el7.noarch

安装policycoreutils-python

[root@VMS-WL001131 ~]# yum install policycoreutils-python
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfil

源有问题,配置阿里云源

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

yum clean all
yum makecache

重试安装 policycoreutils-python

[root@VMS-WL001131 ~]# yum install policycoreutils-python
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
Resolving Dependencies
--> 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: libcgroup 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 libcgroup.x86_64 0:0.41-21.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 Resolution

Dependencies Resolved

============================================================================================================================================================================================================================================
 Package                                                             Arch                                                Version                                                    Repository                                         Size
============================================================================================================================================================================================================================================
Installing:
 policycoreutils-python                                              x86_64                                              2.5-34.el7                                                 base                                              457 k
Installing for dependencies:
 audit-libs-python                                                   x86_64                                              2.8.5-4.el7                                                base                                               76 k
 checkpolicy                                                         x86_64                                              2.5-8.el7                                                  base                                              295 k
 libcgroup                                                           x86_64                                              0.41-21.el7                                                base                                               66 k
 libsemanage-python                                                  x86_64                                              2.5-14.el7                                                 base                                              113 k
 python-IPy                                                          noarch                                              0.75-6.el7                                                 base                                               32 k
 setools-libs                                                        x86_64                                              3.3.8-4.el7                                                base                                              620 k

Transaction Summary
============================================================================================================================================================================================================================================
Install  1 Package (+6 Dependent packages)

Total download size: 1.6 M
Installed size: 5.3 M
Is this ok [y/d/N]: y
Downloading packages:
warning: /var/cache/yum/x86_64/7/base/packages/audit-libs-python-2.8.5-4.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
Public key for audit-libs-python-2.8.5-4.el7.x86_64.rpm is not installed
(1/7): audit-libs-python-2.8.5-4.el7.x86_64.rpm                                                                                                                                                                      |  76 kB  00:00:00     
(2/7): libcgroup-0.41-21.el7.x86_64.rpm                                                                                                                                                                              |  66 kB  00:00:00     
(3/7): checkpolicy-2.5-8.el7.x86_64.rpm                                                                                                                                                                              | 295 kB  00:00:00     
(4/7): libsemanage-python-2.5-14.el7.x86_64.rpm                                                                                                                                                                      | 113 kB  00:00:00     
(5/7): policycoreutils-python-2.5-34.el7.x86_64.rpm                                                                                                                                                                  | 457 kB  00:00:00     
(6/7): python-IPy-0.75-6.el7.noarch.rpm                                                                                                                                                                              |  32 kB  00:00:00     
(7/7): setools-libs-3.3.8-4.el7.x86_64.rpm                                                                                                                                                                           | 620 kB  00:00:00     
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                       4.5 MB/s | 1.6 MB  00:00:00     
Retrieving key from http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
Importing GPG key 0xF4A80EB5:
 Userid     : "CentOS-7 Key (CentOS 7 Official Signing Key) <[email protected]>"
 Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
 From       : http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : libcgroup-0.41-21.el7.x86_64                                                                                                                                                                                             1/7 
  Installing : setools-libs-3.3.8-4.el7.x86_64                                                                                                                                                                                          2/7 
  Installing : audit-libs-python-2.8.5-4.el7.x86_64                                                                                                                                                                                     3/7 
  Installing : python-IPy-0.75-6.el7.noarch                                                                                                                                                                                             4/7 
  Installing : libsemanage-python-2.5-14.el7.x86_64                                                                                                                                                                                     5/7 
  Installing : checkpolicy-2.5-8.el7.x86_64                                                                                                                                                                                             6/7 
  Installing : policycoreutils-python-2.5-34.el7.x86_64                                                                                                                                                                                 7/7 
  Verifying  : checkpolicy-2.5-8.el7.x86_64                                                                                                                                                                                             1/7 
  Verifying  : libsemanage-python-2.5-14.el7.x86_64                                                                                                                                                                                     2/7 
  Verifying  : python-IPy-0.75-6.el7.noarch                                                                                                                                                                                             3/7 
  Verifying  : policycoreutils-python-2.5-34.el7.x86_64                                                                                                                                                                                 4/7 
  Verifying  : audit-libs-python-2.8.5-4.el7.x86_64                                                                                                                                                                                     5/7 
  Verifying  : setools-libs-3.3.8-4.el7.x86_64                                                                                                                                                                                          6/7 
  Verifying  : libcgroup-0.41-21.el7.x86_64                                                                                                                                                                                             7/7 

Installed:
  policycoreutils-python.x86_64 0:2.5-34.el7                                                                                                                                                                                                

Dependency Installed:
  audit-libs-python.x86_64 0:2.8.5-4.el7      checkpolicy.x86_64 0:2.5-8.el7      libcgroup.x86_64 0:0.41-21.el7      libsemanage-python.x86_64 0:2.5-14.el7      python-IPy.noarch 0:0.75-6.el7      setools-libs.x86_64 0:3.3.8-4.el7     

Complete!
[root@VMS-WL001131 ~]# rpm -ivh container-selinux-2.107-3.el7.noarch.rpm 
Preparing...                          ################################# [100%]
Updating / installing...
   1:container-selinux-2:2.107-3.el7  ################################# [100%]
[root@VMS-WL001131 ~]#  yum -y install docker-ce                     
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
Resolving Dependencies
--> Running transaction check
---> Package docker-ce.x86_64 3:26.1.4-1.el7 will be installed
--> Processing Dependency: containerd.io >= 1.6.24 for package: 3:docker-ce-26.1.4-1.el7.x86_64
--> Processing Dependency: libseccomp >= 2.3 for package: 3:docker-ce-26.1.4-1.el7.x86_64
--> Processing Dependency: docker-ce-cli for package: 3:docker-ce-26.1.4-1.el7.x86_64
--> Processing Dependency: docker-ce-rootless-extras for package: 3:docker-ce-26.1.4-1.el7.x86_64
--> Running transaction check
---> Package containerd.io.x86_64 0:1.6.33-3.1.el7 will be installed
---> Package docker-ce-cli.x86_64 1:26.1.4-1.el7 will be installed
--> Processing Dependency: docker-buildx-plugin for package: 1:docker-ce-cli-26.1.4-1.el7.x86_64
--> Processing Dependency: docker-compose-plugin for package: 1:docker-ce-cli-26.1.4-1.el7.x86_64
---> Package docker-ce-rootless-extras.x86_64 0:26.1.4-1.el7 will be installed
--> Processing Dependency: fuse-overlayfs >= 0.7 for package: docker-ce-rootless-extras-26.1.4-1.el7.x86_64
--> Processing Dependency: slirp4netns >= 0.4 for package: docker-ce-rootless-extras-26.1.4-1.el7.x86_64
---> Package libseccomp.x86_64 0:2.3.1-4.el7 will be installed
--> Running transaction check
---> Package docker-buildx-plugin.x86_64 0:0.14.1-1.el7 will be installed
---> Package docker-compose-plugin.x86_64 0:2.27.1-1.el7 will be installed
---> Package fuse-overlayfs.x86_64 0:0.7.2-6.el7_8 will be installed
--> Processing Dependency: libfuse3.so.3(FUSE_3.2)(64bit) for package: fuse-overlayfs-0.7.2-6.el7_8.x86_64
--> Processing Dependency: libfuse3.so.3(FUSE_3.0)(64bit) for package: fuse-overlayfs-0.7.2-6.el7_8.x86_64
--> Processing Dependency: libfuse3.so.3()(64bit) for package: fuse-overlayfs-0.7.2-6.el7_8.x86_64
---> Package slirp4netns.x86_64 0:0.4.3-4.el7_8 will be installed
--> Running transaction check
---> Package fuse3-libs.x86_64 0:3.6.1-4.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

============================================================================================================================================================================================================================================
 Package                                                            Arch                                            Version                                                 Repository                                                 Size
============================================================================================================================================================================================================================================
Installing:
 docker-ce                                                          x86_64                                          3:26.1.4-1.el7                                          docker-ce-stable                                           27 M
Installing for dependencies:
 containerd.io                                                      x86_64                                          1.6.33-3.1.el7                                          docker-ce-stable                                           35 M
 docker-buildx-plugin                                               x86_64                                          0.14.1-1.el7                                            docker-ce-stable                                           14 M
 docker-ce-cli                                                      x86_64                                          1:26.1.4-1.el7                                          docker-ce-stable                                           15 M
 docker-ce-rootless-extras                                          x86_64                                          26.1.4-1.el7                                            docker-ce-stable                                          9.4 M
 docker-compose-plugin                                              x86_64                                          2.27.1-1.el7                                            docker-ce-stable                                           13 M
 fuse-overlayfs                                                     x86_64                                          0.7.2-6.el7_8                                           extras                                                     54 k
 fuse3-libs                                                         x86_64                                          3.6.1-4.el7                                             extras                                                     82 k
 libseccomp                                                         x86_64                                          2.3.1-4.el7                                             base                                                       56 k
 slirp4netns                                                        x86_64                                          0.4.3-4.el7_8                                           extras                                                     81 k

Transaction Summary
============================================================================================================================================================================================================================================
Install  1 Package (+9 Dependent packages)

Total download size: 114 M
Installed size: 402 M
Downloading packages:
warning: /var/cache/yum/x86_64/7/docker-ce-stable/packages/docker-buildx-plugin-0.14.1-1.el7.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 621e9f35: NOKEY                                           ] 9.8 MB/s |  15 MB  00:00:10 ETA 
Public key for docker-buildx-plugin-0.14.1-1.el7.x86_64.rpm is not installed
(1/10): docker-buildx-plugin-0.14.1-1.el7.x86_64.rpm                                                                                                                                                                 |  14 MB  00:00:00     
(2/10): docker-ce-26.1.4-1.el7.x86_64.rpm                                                                                                                                                                            |  27 MB  00:00:01     
(3/10): containerd.io-1.6.33-3.1.el7.x86_64.rpm                                                                                                                                                                      |  35 MB  00:00:02     
(4/10): docker-ce-rootless-extras-26.1.4-1.el7.x86_64.rpm                                                                                                                                                            | 9.4 MB  00:00:00     
(5/10): docker-ce-cli-26.1.4-1.el7.x86_64.rpm                                                                                                                                                                        |  15 MB  00:00:00     
(6/10): fuse3-libs-3.6.1-4.el7.x86_64.rpm                                                                                                                                                                            |  82 kB  00:00:00     
(7/10): libseccomp-2.3.1-4.el7.x86_64.rpm                                                                                                                                                                            |  56 kB  00:00:00     
(8/10): fuse-overlayfs-0.7.2-6.el7_8.x86_64.rpm                                                                                                                                                                      |  54 kB  00:00:00     
(9/10): slirp4netns-0.4.3-4.el7_8.x86_64.rpm                                                                                                                                                                         |  81 kB  00:00:00     
(10/10): docker-compose-plugin-2.27.1-1.el7.x86_64.rpm                                                                                                                                                               |  13 MB  00:00:00     
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                        26 MB/s | 114 MB  00:00:04     
Retrieving key from https://mirrors.aliyun.com/docker-ce/linux/centos/gpg
Importing GPG key 0x621E9F35:
 Userid     : "Docker Release (CE rpm) <[email protected]>"
 Fingerprint: 060a 61c5 1b55 8a7f 742b 77aa c52f eb6b 621e 9f35
 From       : https://mirrors.aliyun.com/docker-ce/linux/centos/gpg
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
  Installing : libseccomp-2.3.1-4.el7.x86_64                                                                                                                                                                                           1/10 
  Installing : slirp4netns-0.4.3-4.el7_8.x86_64                                                                                                                                                                                        2/10 
  Installing : containerd.io-1.6.33-3.1.el7.x86_64                                                                                                                                                                                     3/10 
  Installing : docker-buildx-plugin-0.14.1-1.el7.x86_64                                                                                                                                                                                4/10 
  Installing : fuse3-libs-3.6.1-4.el7.x86_64                                                                                                                                                                                           5/10 
  Installing : fuse-overlayfs-0.7.2-6.el7_8.x86_64                                                                                                                                                                                     6/10 
  Installing : docker-compose-plugin-2.27.1-1.el7.x86_64                                                                                                                                                                               7/10 
  Installing : 1:docker-ce-cli-26.1.4-1.el7.x86_64                                                                                                                                                                                     8/10 
  Installing : docker-ce-rootless-extras-26.1.4-1.el7.x86_64                                                                                                                                                                           9/10 
  Installing : 3:docker-ce-26.1.4-1.el7.x86_64                                                                                                                                                                                        10/10 
  Verifying  : docker-compose-plugin-2.27.1-1.el7.x86_64                                                                                                                                                                               1/10 
  Verifying  : fuse3-libs-3.6.1-4.el7.x86_64                                                                                                                                                                                           2/10 
  Verifying  : fuse-overlayfs-0.7.2-6.el7_8.x86_64                                                                                                                                                                                     3/10 
  Verifying  : slirp4netns-0.4.3-4.el7_8.x86_64                                                                                                                                                                                        4/10 
  Verifying  : containerd.io-1.6.33-3.1.el7.x86_64                                                                                                                                                                                     5/10 
  Verifying  : libseccomp-2.3.1-4.el7.x86_64                                                                                                                                                                                           6/10 
  Verifying  : 3:docker-ce-26.1.4-1.el7.x86_64                                                                                                                                                                                         7/10 
  Verifying  : 1:docker-ce-cli-26.1.4-1.el7.x86_64                                                                                                                                                                                     8/10 
  Verifying  : docker-ce-rootless-extras-26.1.4-1.el7.x86_64                                                                                                                                                                           9/10 
  Verifying  : docker-buildx-plugin-0.14.1-1.el7.x86_64                                                                                                                                                                               10/10 

Installed:
  docker-ce.x86_64 3:26.1.4-1.el7                                                                                                                                                                                                           

Dependency Installed:
  containerd.io.x86_64 0:1.6.33-3.1.el7      docker-buildx-plugin.x86_64 0:0.14.1-1.el7      docker-ce-cli.x86_64 1:26.1.4-1.el7      docker-ce-rootless-extras.x86_64 0:26.1.4-1.el7      docker-compose-plugin.x86_64 0:2.27.1-1.el7     
  fuse-overlayfs.x86_64 0:0.7.2-6.el7_8      fuse3-libs.x86_64 0:3.6.1-4.el7                 libseccomp.x86_64 0:2.3.1-4.el7          slirp4netns.x86_64 0:0.4.3-4.el7_8                  

Complete!
[root@VMS-WL001131 ~]# systemctl start docker
[root@VMS-WL001131 ~]# systemctl enable docker
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
[root@VMS-WL001131 ~]# docker -v
Docker version 26.1.4, build 5650f9b

标签:docker,00,x86,ce,Centos7.9,64,Docker,安装,el7
From: https://www.cnblogs.com/springhgui/p/18426400

相关文章

  • 为何我安装完提示这个报错?:Array and string offset access syntax with curly braces
    错误信息 Arrayandstringoffsetaccesssyntaxwithcurlybracesisdeprecated 表明你在使用的PHP版本较高,而你的程序代码中使用了一些在较新版本中已弃用的语法。具体来说,这是PHP7.4及以上版本对数组和字符串偏移量访问语法 {} 的弃用警告。解决方案1.降低PHP......
  • DockerFile参数
    指令描述ADD添加本地或远程文件和目录。ARG使用构建时变量。CMD指定default命令。COPY复制文件和目录。ENTRYPOINT指定默认可执行文件。ENV设置环境变量。EXPOSE描述您的应用程序正在侦听的端口。FROM从基础映像创建新的构建阶段。HEA......
  • Python 虚拟环境安装使用(Anaconda 完整实操版)
    1.安装安装anaconda(包含python和pip等,支持创建及管理多个python虚拟环境)注:miniconda可能也可以,但是没用过,优先anaconda1.1linux1.1.1ubuntuMac、Windows及其他Linux系统类似注:一般不使用root用户,使用其他非root用户(方便使用homebrew等)Anaconda3......
  • Ubuntu24.04安装及初始化配置
    一、系统简介Ubuntu基于debian以桌面应用为主的开源操作系统,长期支持版本LTS通常每两年发布一次,如最新的版本24.04,上一个版本22.04,每个版本有5年支持周期,适合企业生产服务器使用,另外对容器支持较好,很多docker基础镜像采用utuntu。国产替代操作系统基于debian的有银河麒麟V10、统信U......
  • 基于目前Centos停止维护后安装文件出错的解决方案
    问题报错提示:DeterminingfastestmirrorsCouldnotretrievemirrorlisthttp://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stockerrorwas14:curl#6-"Couldnotresolvehost:mirrorlist.centos.org;未知的错误" 基于目前Centos7已经停止维......
  • Docker方式搭建Maven私服
    私服搭建如下讲解如何基于Docker方式快速搭建Nexus3私服。编写docker-compose.yaml文件,内容如下:version:'2'services:nexus3:image:sonatype/nexus3:3.72.0container_name:nexus3restart:alwaysports:-'8081:8081'volumes:......
  • 30分钟从零开始入门 Redis (包含 Redis 安装教程 Ubuntu 版)
     ......
  • 手把手教你用linux安装Gromacs(2024 GPU-CUDA)
    文章目录1.Gromacs介绍2.Gromacs安装一、基础软件1.gcc下载安装2.g++下载安装3.python4.Cmake二、显卡驱动和CUDA安装1.显卡驱动2.CUDA安装3.Gromacs-2024GPU-CUDA安装可能遇到的问题1.错误一原因:解决方法:2.错误二原因:解决方法:3.错误三4.错误四结束语1.G......
  • maven安装及配置
    1.官网下载、解压缩 2.配置环境变量mvn-version检查环境变量是否生效 3.配置本地仓库新建文件夹如下 修改配置文件,增加如下配置 4.配置镜像和jdk<mirror><id>alimaven</id><name>aliyunmaven</name><url>http://maven.aliyun.com......
  • Abaqus 2024百度云下载:附中文安装包+教程
    正如大家所熟知的,Abaqus是一款有限元分析软件,能够高效的配合工程师完成创作。它可以高精度地实现包括金属、橡胶、高分子材料、复合材料、钢筋混凝土、可压缩超弹性泡沫材料以及土壤和岩石等地质材料的工程仿真计算。“Abaqus”不仅具有出色的仿真计算能力,由于其基于Python开......