网易镜像centos 7
阿里云centos7
清华centos 7
配置仓库
1 | rm -rf /etc/yum.repo.d/* |
安装 wget
1 | yum install provides wget -y |
1 2 | cd /etc/yum.repo.d/ wget http: //mirrors.163.com/.help/CentOS7-Base-163.repo |
安装阿里云
1 | wget -O /etc/yum.repos.d/CentOS-Base.repo http: //mirrors.aliyun.com/repo/Centos-7.repo |
安装 清华的
1 2 | yum install yum-ytils -y yum-config-manager --add-repo=https: //mirrors.tuna.tsinghua.edu.cn/centos/7/os/x86_64/ |
1 2 3 4 5 | [wangyi] name=Centos wangyi repo baseurl=http: //mirrors.163.com/centos/7/os/x86_64/ gpgcheck= 1 gpgkey=http: //mirrors.163.com/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7 |
查看 生成缓存 (可能 要开启某个配置)本地yum源 配置 本地yum
1 2 3 4 5 6 7 8 9 | yum repolist yum malecache mkdir -p /mnt/cdrom mount /dev/cdrom /mnt/cdrom vim /etc/yum.repo.d/local-centos.repo [local] name=local centos7 repo baseurl=file: ///mnt/cdrom yum repolist |