centos5.4源

1.Yum用法
# yum check-update
# yum update
# yum update kernel kernel-source  更新指定包
# yum upgrade 大规模升级
# yum remove [package]
修改yum仓库的镜象地址,以提高下载速度,如有其它更快的地址,将 http://centos.ustc.edu.cn改掉即可
cd /etc/yum.repos.d/
mv CentOS-Base.repo CentOS-Base.repo.bak
gedit CentOS-Base.repo
[base]
name=CentOS-5.4 - Base
baseurl=http://centos.ustc.edu.cn/centos/5.4/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

#released updates
[update]
name=CentOS-5.4 - Updates
baseurl=http://centos.ustc.edu.cn/centos/5.4/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-5.4 - Addons
baseurl=http://centos.ustc.edu.cn/centos/5.4/addons/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
#additional packages that may be useful
[extras]
name=CentOS-5.4 - Extras
baseurl=http://centos.ustc.edu.cn/centos/5.4/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-5.4 - Plus
baseurl=http://centos.ustc.edu.cn/centos/5.4/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

#contrib - packages by Centos Users
[contrib]
name=CentOS-5.4 - Contrib
baseurl=http://centos.ustc.edu.cn/centos/5.4/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

#packages in testing
[testing]
name=CentOS-5.4 - Testing
baseurl=http://centos.ustc.edu.cn/centos/5.4/testing/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
最开始用的是中国科技大学的服务器,主服务器在合肥,也就是火车采集器公司所在地。
后来找到一个新的源,服务器位于山东,移动线路,一测试,速度飞快,于是抛弃科大。
看到网上其它人推荐的更新源,我也Ping了一下速度,都整理于后。
有好源的朋友可以向俺推荐下下。
  1. http://ftp.sjtu.edu.cn/centos/,上海交大,但服务器位于北京,中国教育网网络中心,我看像是朝阳区那边的IP,以前在那边上过班,下载速度高达十M。
    北方用户与教育网用户推荐,速度飞快。
    CentOS版本也挺多,现在用5.2和5.3的用户较新。
    CenOS-Base.repo:无连接,麻烦手动
  2. http://centos.ustc.edu.cn,中国科技大学,服务器位于合肥。
    南方用户推荐。
    同样的,CenOS版本非常丰富,适合长期使用。
    CenOS-Base.repo:http://centos.ustc.edu.cn/CentOS-Base.repo
  3. http://mirrors.sohu.com/,sohu的开源镜像服务器,服务器位于山东省联通。
    速度飞快,全国用户推荐,经常用FireFox下载CD镜像。
    我看几乎支持目前所有的开源项目,可以看到该镜像服务器为FreeBSD、archlinux、fedora、CentOS、ubuntu、debian、gentoo、 slackware主流开源系统,以及cygwin、mysql、php、nginx等主流的开源程序提供更新。
    这个镜像服务器更新还比较及时的,频率为每两天更新一次。
    顺道贴上CentOS的CD和DVD下载地址:
    http://mirrors.sohu.com/centos/5.4/isos/i386/CentOS-5.4-i386-bin-DVD.iso
    http://mirrors.sohu.com/centos/5.4/isos/i386/CentOS-5.4-i386-LiveCD.iso
    下载CentOS-Base-sohu.repo, 放入/etc/yum.repos.d/
  4. http://mirrors.163.com/centos,网易的开源服务器镜像
    速度也不错,全国用户推荐.
    下载CentOS-Base-163.repo, 放入/etc/yum.repos.d/
以下是手动更新YUM配置文件的方法:
修改/etc/yum.repos.d/CentOS-Base.repo:
[base]
name=CentOS-5 - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever5&arch=$basearch&
repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
baseurl=http://ftp.sjtu.edu.cn/centos/5.0/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
#released updates
[update]
name=CentOS-5 - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=updates
baseurl=http://ftp.sjtu.edu.cn/centos/5.0/updates/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
#packages used/produced in the build but not released
[addons]
name=CentOS-5 - Addons
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=addons
baseurl=http://ftp.sjtu.edu.cn/centos/5.0/addons/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
#additional packages that may be useful
[extras]
name=CentOS-5 - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=extras
baseurl=http://ftp.sjtu.edu.cn/centos/5.0/extras/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-5 - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=centosplus
baseurl=http://ftp.sjtu.edu.cn/centos/5.0/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
#contrib - packages by Centos Users
[contrib]
name=CentOS-5 - Contrib
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=contrib
baseurl=http://ftp.sjtu.edu.cn/centos/5.0/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
2.执行
64位:
rpm --import http://ftp.sjtu.edu.cn/centos/5.0/os/x86_64/RPM-GPG-KEY-CentOS-5
32位:
rpm --import http://ftp.sjtu.edu.cn/centos/5.0/os/i386/RPM-GPG-KEY-CentOS-5
3.执行
yum update
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
[base]
name=CentOS-$releasever - Base
baseurl=http://centos.ustc.edu.cn/centos/5.4/os/$basearch/
http://centos.candishosting.com.cn/5.4/os/$basearch/
gpgcheck=0
gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5

#released updates
[update]
name=CentOS-$releasever - Updates
baseurl=http://centos.ustc.edu.cn/centos/5.4/updates/$basearch/
http://centos.candishosting.com.cn/5.4/updates/$basearch/
gpgcheck=0
gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5

#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
baseurl=http://centos.ustc.edu.cn/centos/5.4/addons/$basearch/
http://centos.candishosting.com.cn/5.4/addons/$basearch/
gpgcheck=0
gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=http://centos.ustc.edu.cn/centos/5.4/extras/$basearch/
http://centos.candishosting.com.cn/5.4/extras/$basearch/
gpgcheck=0
gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5

你可能感兴趣的:(redhat,centos,centos,职场,yum,休闲)