1。修改升级脚本
#vi /etc/yum.repos.d/CentOS-Base.repo
把mirrorlist=开头的行全部删除.
接着把替换为
接着把#baseurl=替换为baseurl=
接下来把$releasever替换成的你CentOS的版本,这里可以用4.4的更新.4.3的不支持。
最好是把$basearch替换成你的系统的相应的字窜。
########################################################
#比较有效的方法:
[root@host ~]#mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak (先做个备份)
[root@host ~]#kate /etc/yum.repos.d/CentOS-Base.repo
########################################################
-----------------------------------------------------------------------------------------------------------------------
yum默认的下载站点在国外,速度往往比较慢,为了加快yum的下载速度,可以将yum的“源”修改成国内镜像
#mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak (先做个备份)
#vi /etc/yum.repos.d/CentOS-Base.repo
修改过的i386的4.4 版本
[base]
name=CentOS-4.4 - Base
baseurl=centos/4.4/os/i386/
gpgcheck=1
gpgkey=centos/RPM-GPG-KEY-centos4
#released updates
[update]
name=CentOS-4.4 - Updates
baseurl=centos/4.4/updates/i386/
gpgcheck=1
gpgkey=centos/RPM-GPG-KEY-centos4
#packages used/produced in the build but not released
[addons]
name=CentOS-4.4 - Addons
baseurl=centos/4.4/addons/i386/
gpgcheck=1
gpgkey=centos/RPM-GPG-KEY-centos4
#additional packages that may be useful
[extras]
name=CentOS-4.4 - Extras
baseurl=centos/4.4/extras/i386/
gpgcheck=1
gpgkey=centos/RPM-GPG-KEY-centos4
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-4.4 - Plus
baseurl=centos/4.4/centosplus/i386/
gpgcheck=1
enabled=0
gpgkey=centos/RPM-GPG-KEY-centos4
#contrib - packages by Centos Users
[contrib]
name=CentOS-4.4 - Contrib
baseurl=centos/4.4/contrib/i386/
gpgcheck=1
enabled=0
gpgkey=centos/RPM-GPG-KEY-centos4
系统原始脚本
[base]
name=CentOS-$releasever - Base
mirrorlist=
#baseurl=centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=centos/RPM-GPG-KEY-centos4
#released updates
[update]
name=CentOS-$releasever - Updates
mirrorlist=
#baseurl=centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=centos/RPM-GPG-KEY-centos4
#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
mirrorlist=
#baseurl=centos/$releasever/addons/$basearch/
gpgcheck=1
gpgkey=centos/RPM-GPG-KEY-centos4
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=
#baseurl=centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=centos/RPM-GPG-KEY-centos4
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=
#baseurl=centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=centos/RPM-GPG-KEY-centos4
#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
mirrorlist=
#baseurl=centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=centos/RPM-GPG-KEY-centos4
阅读(959) | 评论(0) | 转发(0) |