最近不知道是不是网络的问题,在更新CentOS4.4的时候非常慢,等的我脖子都长的。
然后就自己把升级的脚本修改的一下,直接使用国内镜像升级。速度非常快。
大家可以下载下面的文件进行替换,然后进行更新。或者看下面的修改方法吧:)
1。修改升级脚本
#vi /etc/yum.repos.d/CentOS-Base.repo
把mirrorlist=http://mirrorlist.centos.org.....开头的行全部删除.
接着把
http://mirror.centos.org/替换为
http://mirror.be10.com/接着把#baseurl=替换为baseurl=
接下来把$releasever替换成的你CentOS的版本,这里可以用4.4的更新.4.3的不支持。
最好是把$basearch替换成你的系统的相应的字窜。我的是i386的。服务器是x86_64的
大家按自己的情况替换就行了:)
CentOS4.4国内更新镜像脚本下载系统原始脚本
[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/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
#released updates
[update]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
#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/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
#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/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
#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/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
我修改过的i386的4.4 版本
[base]
name=CentOS-4.4 - Base
baseurl=http://mirror.be10.com/centos/4.4/os/i386/
gpgcheck=1
gpgkey=http://mirror.be10.com/centos/RPM-GPG-KEY-centos4
#released updates
[update]
name=CentOS-4.4 - Updates
baseurl=http://mirror.be10.com/centos/4.4/updates/i386/
gpgcheck=1
gpgkey=http://mirror.be10.com/centos/RPM-GPG-KEY-centos4
#packages used/produced in the build but not released
[addons]
name=CentOS-4.4 - Addons
baseurl=http://mirror.be10.com/centos/4.4/addons/i386/
gpgcheck=1
gpgkey=http://mirror.be10.com/centos/RPM-GPG-KEY-centos4
#additional packages that may be useful
[extras]
name=CentOS-4.4 - Extras
baseurl=http://mirror.be10.com/centos/4.4/extras/i386/
gpgcheck=1
gpgkey=http://mirror.be10.com/centos/RPM-GPG-KEY-centos4
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-4.4 - Plus
baseurl=http://mirror.be10.com/centos/4.4/centosplus/i386/
gpgcheck=1
enabled=0
gpgkey=http://mirror.be10.com/centos/RPM-GPG-KEY-centos4
#contrib - packages by Centos Users
[contrib]
name=CentOS-4.4 - Contrib
baseurl=http://mirror.be10.com/centos/4.4/contrib/i386/
gpgcheck=1
enabled=0
gpgkey=http://mirror.be10.com/centos/RPM-GPG-KEY-centos4