centos

```language CentOs设置国内源 1、切用户、切到原文件件 su root cd /etc/yum.repos.d/ 2、下载源文件 wget http://mirrors.aliyun.com/repo/Centos-7.repo 3、重命名 mv CentOS-Base.repo CentOS-Base.repo.bak mv Centos-7.repo CentOS-Base.repo 4、更新缓存 yum clean all yum makecache yum update yum install net-tools yum install -y yum-utils yum provides '*/applydeltarpm' yum install deltarpm -y $ sudo yum-config-manager \ --add-repo \ https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo yum-config-manager \ --add-repo \ https://download.docker.com/linux/centos/docker-ce.repo yum install docker-ce docker-ce-cli containerd.io systemctl start docker mkdir -p /etc/docker tee /etc/docker/daemon.json <<-'EOF' { "registry-mirrors": [ "https://78mwycsx.mirror.aliyuncs.com", "https://registry.hub.docker.com", "http://hub-mirror.c.163.com", "https://docker.mirrors.ustc.edu.cn", "https://registry.docker-cn.com" ] } EOF systemctl restart docker mv docker-compose-linux-x86_64 /usr/local/bin/docker-compose chmod +x /usr/local/bin/docker-compose ```