centos自带的yum源经常下载很慢,今天将其换成了163的源,现在记录一下
163官网说明:http://mirrors.163.com/.help/centos.html
#我安装的是centos6.5mini的版本,为了后面的下载163的源,先安装wget yum install -y wget #进入相应的目录 cd /etc/yum.repos.d/ #备份 [[email protected] yum.repos.d]# mv CentOS-Base.repo CentOS-Base.repo.bak #下载163的源(这个是centos6的源) [[email protected] yum.repos.d]# wget http://mirrors.163.com/.help/CentOS6-Base-163.repo #重命名 [[email protected] yum.repos.d]# mv CentOS6-Base-163.repo CentOS-Base.repo #清除缓存 [[email protected] yum.repos.d]# yum clean all #生成缓存 [[email protected] yum.repos.d]# yum makecache
时间: 2024-10-04 17:51:36