歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> CentOS純IPv6環境下設置更新源

CentOS純IPv6環境下設置更新源

日期:2017/2/28 15:47:35   编辑:Linux教程

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.linuxidc.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

Copyright © Linux教程網 All Rights Reserved