zoukankan      html  css  js  c++  java
  • 11、centos8安装docker中的坑

    centos8很坑的就是要更换yum源

     /etc/yum.repos.d

    # CentOS-Base.repo
    #
    # The mirror system uses the connecting IP address of the client and the
    # update status of each mirror to pick mirrors that are updated to and
    # geographically close to the client.  You should use this for CentOS updates
    # unless you are manually picking other mirrors.
    #
    # If the mirrorlist= does not work for you, as a fall back you can try the
    # remarked out baseurl= line instead.
    #
    #
    
    [BaseOS]
    name=CentOS-8 - Base
    #mirrorlist=http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=BaseOS&infra=$infra
    baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/8/BaseOS/x86_64/os/
    gpgcheck=1
    enabled=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
    
    #additional packages that may be useful
    [extras]
    name=CentOS-8 - Extras
    #mirrorlist=http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=extras&infra=$infra
    baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/8/extras/x86_64/os/
    gpgcheck=1
    enabled=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
    
    #additional packages that extend functionality of existing packages
    [centosplus]
    name=CentOS-8 - Plus
    #mirrorlist=http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=centosplus&infra=$infra
    baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/8/centosplus/x86_64/os/
    gpgcheck=1
    enabled=0
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
    
    [AppStream]
    name=CentOS-8 - AppStream
    #mirrorlist=http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=AppStream&infra=$infra
    baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/8/AppStream/x86_64/os/
    gpgcheck=1
    enabled=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
    
    [PowerTools]
    name=CentOS-8 - PowerTools
    #mirrorlist=http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=PowerTools&infra=$infra
    baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/8/PowerTools/x86_64/os/
    gpgcheck=1
    enabled=0
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
    

    都配置好了安装docker 会爆错,明明我的版本是CentOS 系统的内核版本高于 3.10,还报错

    解决办法

    yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
    

    然后

    yum install -y yum-utils device-mapper-persistent-data lvm2

    yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

    yum install -y docker-ce

    systemctl start docker

    systemctl enable docker

    在执行yum install -y docker-ce 中又出现了问题

    解决办法 

    sudo yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
    

    然后继续执行就行了

    yum install -y docker-ce 
    systemctl start docker
    systemctl enable docker
    

      

  • 相关阅读:
    HDU 3339 In Action 最短路+01背包
    hash与map的区别联系应用(转)
    POJ
    欧几里德与扩展欧几里德算法(转)
    POJ
    第三届蓝桥杯C++B组省赛
    第四届蓝桥杯C++B组省赛
    第五届蓝桥杯C++B组省赛
    第六届蓝桥杯C++B组省赛
    线段树为什么要开4倍空间
  • 原文地址:https://www.cnblogs.com/gfbzs/p/13845639.html
Copyright © 2011-2022 走看看