CentOS纯IPv6环境下设置更新源


1. CentOS下修改DNS配置文件,设置为北邮的IPv6 DNS服务器 :

[root@localhost ~]# cat /etc/resolv.conf

nameserver 2001:da8:202:10::36

2. 修改更新源配置文件:

[root@localhost ~]# vi /etc/yum.repos.d/CentOS-Base.repo

a. 注释掉 mirrorlist选项

b. 取消注释 baseurl选项

c. 修改配置文件中的URL为北交更新源地址.

d. yum update 即可

e. 安装文件: yum install PACKAGENAME


# CentOS-Base.repo

#

# The mirror system uses the connecting IP address of the client and the

# update status of each mirror to pick mirrors that are updated to and

# geographically close to the client.  You should use this for CentOS updates

# unless you are manually picking other mirrors.

#

# If the mirrorlist= does not work for you, as a fall back you can try the

# remarked out baseurl= line instead.

# http://www.bkjia.com

#

 


[base]

name=CentOS-$releasever - Base

#mirrorlist=http://mirror6.bjtu.edu.cn/?release=$releasever&arch=$basearch&repo=os

baseurl=http://mirror6.bjtu.edu.cn/centos/$releasever/os/$basearch/

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

 


#released updates

[updates]

name=CentOS-$releasever - Updates

#mirrorlist=http://mirror6.bjtu.edu.cn/?release=$releasever&arch=$basearch&repo=updates

baseurl=http://mirror6.bjtu.edu.cn/centos/$releasever/updates/$basearch/

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

 


#additional packages that may be useful

[extras]

name=CentOS-$releasever - Extras

#mirrorlist=http://mirror6.bjtu.edu.cn/?release=$releasever&arch=$basearch&repo=extras

baseurl=http://mirror6.bjtu.edu.cn/centos/$releasever/extras/$basearch/

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

 


#additional packages that extend functionality of existing packages

[centosplus]

name=CentOS-$releasever - Plus

#mirrorlist=http://mirror6.bjtu.edu.cn/?release=$releasever&arch=$basearch&repo=centosplus

baseurl=http://mirror6.bjtu.edu.cn/centos/$releasever/centosplus/$basearch/

gpgcheck=1

enabled=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

 


#contrib - packages by Centos Users

[contrib]

name=CentOS-$releasever - Contrib

#mirrorlist=http://mirror6.bjtu.edu.cn/?release=$releasever&arch=$basearch&repo=contrib

baseurl=http://mirror6.bjtu.edu.cn/centos/$releasever/contrib/$basearch/

gpgcheck=1

enabled=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

相关内容