【金沙澳门官网7817网址】CentOS纯IPv6境况下设置更新源

替换/etc/yum.repos.d/CentOS-Base.repo,CentOS-Base.repo,五、设置优先级别,在这些文件中插入顺序指令,下修改DNS配置文件,DNS服务器,name=CentOS-$releasever – Base //所使用的.repo文件的名字,文件免费下载地址

#released updates
[updates]
name=CentOS-$releasever – Updates
#mirrorlist=
baseurl=
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

[base]
name=CentOS-$releasever – Base
mirrorlist=
#baseurl=
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
priority=1

# CentOS-Base.repo

#其间url补助的合计有 http:// ftp://
file://两种。baseurl后得以跟五个url,你能够和睦改为速度比非常的慢的镜像站,但baseurl只好有八个

修改CentOS
5.4的更新源为上海电影高校FTP的方式:将/etc/yum.repos.d/CentOS-Base.repo为一下剧情,也许直接下载CentOS-Base.repo替换/etc/yum.repos.d/CentOS-Base.repo,

2、vi /etc/yum.repos.d/rpmforge.repo
添加 priority=11

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

[base] //独一标记的称号
name=CentOS-$releasever – Base //所使用的.repo文件的名字
mirrorlist=

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever – Plus
#mirrorlist=
baseurl=
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

        设置/etc/yum.repos.d/
目录下的.repo相关文件(如CentOS-Base.repo),在那个文件中插入顺序指令:priority=N
(N为1到99的正整数,数值越小越优先)一般的安排是这么的:

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

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

[base]
name=CentOS-$releasever - Base - 163.com
baseurl=http://mirrors.163.com/centos/$releasever/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#released updates 
[updates]
name=CentOS-$releasever - Updates - 163.com
baseurl=http://mirrors.163.com/centos/$releasever/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras - 163.com
baseurl=http://mirrors.163.com/centos/$releasever/extras/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus - 163.com
baseurl=http://mirrors.163.com/centos/$releasever/centosplus/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib - 163.com
baseurl=http://mirrors.163.com/centos/$releasever/contrib/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

[base]
name=CentOS-$releasever – Base
#mirrorlist=
baseurl=
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

[epel]
name=Extra Packages for Enterprise Linux 5 – $basearch
#baseurl=
mirrorlist=
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
priority=12

#additional packages that may be useful

#gpg密钥的职位,应内定本机的密钥文件独有可以与服务器上的密钥进行校验。

#additional packages that may be useful
[extras]
name=CentOS-$releasever – Extras
#mirrorlist=
baseurl=
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

rpmfusion:

#mirrorlist=

#mirrorlist 是由 yum 程式自行去捉映射站台, baseurl
则是钦点固定的一個器皿网站

#contrib – packages by Centos Users
[contrib]
name=CentOS-$releasever – Contrib
#mirrorlist=
baseurl=
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

轮换镜像

enabled=0

#baseurl=

金沙澳门官网7817网址 1

#contrib – packages by Centos Users
[contrib]
name=CentOS-$releasever – Contrib
mirrorlist=
#baseurl=
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
priority=2

d. yum update 即可

#该段指向的门路是系统使用者所进献的软件

执行 yum update Ok了,搞定。

#

//该路径对应服务器上的update文件夹,即活动到服务器updates文件夹里找软件包

#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever – Addons
#mirrorlist=
baseurl=
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#released updates
[updates]
name=CentOS-$releasever – Updates
“/etc/yum.repos.d/CentOS-Base.repo” 66L, 2311C
# 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.
#
#

#mirrorlist=

[centosplus]
name=CentOS-$releasever – Plus
mirrorlist=
#baseurl=
gpgcheck=1
enabled=0 #enabled=0表示那一个源停用 假若enabled不写 表示enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

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

RPMforge is a collaboration of Dag and other packagers. They provide
over 5000 packages for CentOS, including wine, vlc, mplayer, xmms-mp3,
and other popular media tools. It is not part of Red Hat or CentOS but
is designed to work with those distributions. See also Using RPMforge
and Repoforge.

baseurl=

修改/etc/yum.repos.d/Centos-Base.repo

[base], [addons], [updates], [extras] … priority=1
[CentOSplus],[contrib] … priority=2
别的第三的软件源为:priority=N (推荐N>10)
[base]
name=CentOS-$releasever – Base
mirrorlist=
#baseurl=
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
priority=1

a. 注释掉 mirrorlist选项

#additional packages that may be useful

五、设置优先等级

#released updates

[updates]
name=CentOS-$releasever – Updates
mirrorlist=

3、vi /etc/yum.repos.d/epel.repo

#mirrorlist=

文件免费下载地址:

:

DAGs CentOS
yum repository rpmforge http://…

# unless you are manually picking other mirrors.

#该段指向的路子是唯恐使得的别样的软件

[epel-source]
name=Extra Packages for Enterprise Linux 5 – $basearch – Source
#baseurl=
mirrorlist=
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
gpgcheck=1
priority=12

baseurl=

#additional packages that extend functionality of existing packages

3、vi /etc/yum.repos.d/epel.repo

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

[addons]
name=CentOS-$releasever – Addons
mirrorlist=
#baseurl=
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5