RHEL5.4 公网源配置

 

RHEL是一个非常稳定的企业级Linux操作系统,红帽的看家产品,呵呵,但是使用起来却不如Ubuntu方便,毕竟Ubuntu是要桌面化。

光是RHEL5.4的公网源配置就花了我俩小时,可能跟我的网速也有关系,反正到现在源的速度也很不令人满意,无奈,将就着用吧。

公网的源有上交的,科大的还有163的。三个源我都配置了一遍,速度都差不多,相比来说上交的还是比较快的。

 

首先将RHEL5自带的yum删除 ,RHEL5 使用centos5的源来更新更快些,以下都是centos的公网源在rhel上的配置使用

rpm -qa|grep yum 

找到所有的yum软件包,使用命令 

rpm -e yum-XXX --nodeps 

 

接下来从科大的网站上下载 yum软件包

http://centos.ustc.edu.cn/centos/5.4/os/i386/CentOS/ 

 

yum-3.2.22-20.el5.centos.noarch.rpm 

yum-fastestmirror-1.1.16-13.el5.centos.noarch.rpm 

yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm  

yum-security-1.1.16-13.el5.centos.noarch.rpm

yum-updatesd-0.9-2.el5.noarch.rpm  

 

在超级用户下安装上述RPM包

 

现在进入

cd /etc/yum.repo.d/

备份rhel自带源

mv rhel-debuginfo.repo rhel-debuginfo.repo.bak

 

创建Centos科大源

将如下内容保存到CentosUSTC.repop

  # 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-5.4 - Base baseurl=http://centos.ustc.edu.cn/centos/5.4/os/$basearch/ gpgcheck=1 gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5 #released updates [updates] name=CentOS-5.4 - Updates baseurl=http://centos.ustc.edu.cn/centos/5.4/updates/$basearch/ gpgcheck=1 gpgkey=http://centos.ustc.edu.cn/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://centos.ustc.edu.cn/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://centos.ustc.edu.cn/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://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5

创建上交源,将如下内容复制到CentosSJTU.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/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/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/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/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/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/contrib/$basearch/ gpgcheck=1 enabled=0 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5 # vi dag.repo #[dag] #name=Dag RPM Repository for RHEL5 #baseurl=http://ftp.riken.jphttp://Linux.bitscn.com/dag/redhat/el5/en/$basearch/dag/ #enabled=1 #gpgcheck=1 #gpgkey=http://ftp.riken.jphttp://Linux.bitscn.com/dag/packages/RPM-GPG-KEY.dag.txt 

创建163的源163.repo

[base] name=CentOS-5.4 - Base baseurl=http://mirrors.163.com/centos/5.4/os/$basearch/ gpgcheck=1 gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-5 [update] name=CentOS-5.4 - Updates baseurl=http://mirrors.163.com/centos/5.4/updates/$basearch/ gpgcheck=1 gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-5 [extras] name=CentOS-5.4 - Extras baseurl=http://mirrors.163.com/centos/5.4/extras/$basearch/ gpgcheck=1 gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-5 [addons] name=CentOS-5.4 - Addons baseurl=http://mirrors.163.com/centos/5.4/addons/$basearch/ gpgcheck=1 gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-5 [centosplus] name=CentOS-5.4 - Plus baseurl=http://mirrors.163.com/centos/5.4/centosplus/$basearch/ gpgcheck=1 enabled=0 gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-5

 

然后,yum update

接下来就可以使用yum安装软件了~~enjoy Linux Desktop

你可能感兴趣的:(linux,centos,ubuntu,System,Build,each)