centos7安装docker,更换阿里源

    科技2024-12-03  19

    1)yum更换为阿里源

    cd /etc/yum.repos.d

    #备份原来的

    mv CentOS-Base.repo CentOS-Base.repo.bak

    #下载阿里的yum源配置文件

    wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

    #生成缓存

    yum clean all

    yum makecache

    2)安装doctor

    yum -y install docker

    #启动docker

    systemctl start docker

    #查看

    systemctl status docker

    #开机自启

    systemctl enable docker

    Processed: 0.010, SQL: 8