1. 程式人生 > >CentOS新增163映象

CentOS新增163映象

1、下載CentOS相應發行版的映象

檢視發行版本:

shell> cat /etc/centos-release

如下載CentOS7的映象:

shell> cd /opt
shell> wget http://mirrors.163.com/.help/CentOS7-Base-163.repo

2、備份預設源,並拷貝163源到源管理目錄

shell> mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
shell> cp /opt/CentOS7-Base-163.repo /etc/yum.repos
.d/

3、生成快取

yum clean all
yum makecache