> CentOS > CentOS教程 >

Centos6.7换源教程

下载bin-DVD版的才有packet目录,方便搭建yum本地源。

CentOS-6.7-x86_64-bin-DVD1.iso

1,yum本地源





[base]

name=base

baseurl=file:///mnt/

enabled=1

gpgcheck=0




2,换为外网源





wget -O /etc/yum.repos.d/CentOS-Base.repo



-0 下载并以不同的文件名保存








wget http://mirrors.163.com/.help/CentOS6-Base-163.repo

[root@localhost ~]# cd /etc/yum.repos.d/

[root@localhost ~]# mv CentOS-Base.repo CentOS-Base.repo.bak

[root@localhost ~]# mv CentOS6-Base-163.repo CentOS-Base.repo




 

yum clean all

yum makecache

yum update #一般没必要





yum list |grep xxx

yum search xxx



yum grouplist

yum group install “包名”

(责任编辑:IT)