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
    

      

  • 相关阅读:
    前后端分离基于Oauth2的SSO单点登录怎样做?
    Spring Security基于Oauth2的SSO单点登录怎样做?一个注解搞定
    微服务业务监控和行为分析怎么做?试试日志埋点
    Spring Cloud Gateway的动态路由怎样做?集成Nacos实现很简单
    Spring Cloud异步场景分布式事务怎样做?试试RocketMQ
    Apache RocketMQ 消息队列部署与可视化界面安装
    Spring Cloud同步场景分布式事务怎样做?试试Seata
    实施微服务架构的关键技术
    Spring Cloud开发人员如何解决服务冲突和实例乱窜?(IP实现方案)
    独立博客,从零到千万访问,这三年我都做了什么
  • 原文地址:https://www.cnblogs.com/gfbzs/p/13845639.html
Copyright © 2011-2022 走看看