最全centos源

前端之家收集整理的这篇文章主要介绍了最全centos源前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

原文地址:http://blog.51cto.com/cyhow/491392

第一个比较好用 (楼下新增了PHP5.2版本的源),添加搜狐的源

1、vi /etc/yum.repos.d/Dag.repo###定义第三方源

[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
http://rh-mirror.linux.iastate.edu/pub/dag/redhat/el$releasever/en/$basearch/dag
http://wftp.tu-chemnitz.de/pub/linux/dag/redhat/el$releasever/en/$basearch/dag
http://archive.cs.uu.nl/mirror/dag.wieers/redhat/el$releasever/en/$basearch/dag
http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
http://mirror.cpsc.ucalgary.ca/mirror/dag/redhat/el$releasever/en/$basearch/dag
http://rpmfind.net/linux/dag/redhat/el$releasever/en/$basearch/dag
http://ftp.riken.jp/Linux/dag/redhat/el$releasever/en/$basearch/dag
http://mirrors.ircam.fr/pub/dag/redhat/el$releasever/en/$basearch/dag
gpgcheck=0
enabled=1
protect=0
gpgcheck=1
gpgkey=http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt
2、PHP5.2版本的源

vi /etc/yum.repos.d/CentOS-Testing.repo
[c5-testing]
name=CentOS-5 Testing
baseurl=http://dev.centos.org/centos/$releasever/testing/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing
priority=1

3、一个比较好的源
vi CentOS-Base.repo
[base]
name=CentOS-$releasever - Base
baseurl=http://mirror.be10.com/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.be10.com/centos/RPM-GPG-KEY-centos-5
#released updates
[update]
name=CentOS-$releasever - Updates
baseurl=http://mirror.be10.com/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirror.be10.com/centos/RPM-GPG-KEY-centos-5
#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
baseurl=http://mirror.be10.com/centos/$releasever/addons/$basearch/
gpgcheck=1
gpgkey=http://mirror.be10.com/centos/RPM-GPG-KEY-centos-5
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=http://mirror.be10.com/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://mirror.be10.com/centos/RPM-GPG-KEY-centos-5
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
baseurl=http://mirror.be10.com/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.be10.com/centos/RPM-GPG-KEY-centos-5
#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
baseurl=http://mirror.be10.com/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.be10.com/centos/RPM-GPG-KEY-centos-5

4、网易 163源

[root@CentOS ~]#cd /etc/yum.repos.d/
[root@CentOS ~]#cp -a CentOS-Base.repo CentOS-Base.repo.bak
[root@CentOS ~]#vim CentOS-Base.repo

CentOS-Base.repo内容如下:
# CentOS-Base.repo
#
# This file uses a new mirrorlist system developed by Lance Davis for CentOS.
# 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
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
baseurl=http://mirrors.163.com/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

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

#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
#baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/
baseurl=http://mirrors.163.com/centos/$releasever/addons/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

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

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

5、搜狐源

vi /etc/yum.repos.d/CentOS-Base-sohu.repo

运行yum makecache生成缓存

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

mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os

baseurl=http://mirrors.sohu.com/centos/$releasever/os/$basearch/

gpgcheck=1

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

#released updates

[updates]

name=CentOS-$releasever - Updates - sohu.com

mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates

baseurl=http://mirrors.sohu.com/centos/$releasever/updates/$basearch/

#packages used/produced in the build but not released

[addons]

name=CentOS-$releasever - Addons - sohu.com

mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons

baseurl=http://mirrors.sohu.com/centos/$releasever/addons/$basearch/

#additional packages that may be useful

[extras]

name=CentOS-$releasever - Extras - sohu.com

mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras

baseurl=http://mirrors.sohu.com/centos/$releasever/extras/$basearch/

#additional packages that extend functionality of existing packages

[centosplus]

name=CentOS-$releasever - Plus - sohu.com

mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus

baseurl=http://mirrors.sohu.com/centos/$releasever/centosplus/$basearch/

enabled=0

#contrib - packages by Centos Users

[contrib]

name=CentOS-$releasever - Contrib - sohu.com

mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib

baseurl=http://mirrors.sohu.com/centos/$releasever/contrib/$basearch/

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

猜你在找的CentOS相关文章