免费行情软件app网站mnw直,网站图片加载优化,如何做购物网站的后台,wordpress 排行榜网站 主题由于RHEL的yum在线更新是收费的#xff0c;如果没有注册的话是不能使用的#xff0c;即不能在线安装软件。在这种情况下#xff0c;如果我们使用的机器安装的是RHEL系统要是每次安装软件先挂载本地光盘会很繁琐#xff0c;而且有些软件也是老版本的#xff0c;这种情况下我… 由于RHEL的yum在线更新是收费的如果没有注册的话是不能使用的即不能在线安装软件。在这种情况下如果我们使用的机器安装的是RHEL系统要是每次安装软件先挂载本地光盘会很繁琐而且有些软件也是老版本的这种情况下我们可以借助CentOS的YUM源来满足我们的需求。一、删除RHEL原有的YUMrpm -aq|grep yum|xargs rpm -e --nodeps二、下载CentOS的yum安装包163源wget http://mirrors.163.com/centos/5/os/x86_64/CentOS/yum-3.2.22-40.el5.centos.noarch.rpm
wget http://mirrors.163.com/centos/5/os/x86_64/CentOS/yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm
wget http://mirrors.163.com/centos/5/os/x86_64/CentOS/yum-metadata-parser-1.1.2-4.el5.x86_64.rpm
wget http://mirrors.163.com/centos/5/os/x86_64/RPM-GPG-KEY-CentOS-5三、安装CentOS的YUM安装包yum和yum-plugin-fastestmirror需要一起安装这两个包存在依赖关系分开安装会失败安装之前先把RPM-GPG-KEY导入系统否则会出现警告信息rpm -ivh yum-metadata-parser-1.1.2-4.el5.x86_64.rpm
rpm --import RPM-GPG-KEY-CentOS-5
rpm –ivh yum-3.2.22-40.el5.centos.noarch.rpm yum-fastestmirror-1.1.16-21.el5.centos.noarch.rm至此我们就可以在线使用yum了四、修改yum源为了使用在线使用Yum安装软件更快我们可以使用国内的网易Yum源或者其他国内yum源五、更改yum源 #我们使用网易的CentOS镜像源cd /etc/yum.repos.d/
vi rhel-debuginfo.repo
# 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]
nameCentOS-5 - Base - 163.com
mirrorlisthttp://mirrorlist.centos.org/?release5arch$basearchrepoos
baseurlhttp://mirrors.163.com/centos/5/os/$basearch/
gpgcheck1
gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#released updates
[updates]
nameCentOS-5 - Updates - 163.com
mirrorlisthttp://mirrorlist.centos.org/?release5arch$basearchrepoupdates
baseurlhttp://mirrors.163.com/centos/5/updates/$basearch/
gpgcheck1
gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#packages used/produced in the build but not released
[addons]
nameCentOS-5 - Addons - 163.com
mirrorlisthttp://mirrorlist.centos.org/?release5arch$basearchrepoaddons
baseurlhttp://mirrors.163.com/centos/5/addons/$basearch/
gpgcheck1
gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#additional packages that may be useful
[extras]
nameCentOS-5 - Extras - 163.com
mirrorlisthttp://mirrorlist.centos.org/?release5arch$basearchrepoextras
baseurlhttp://mirrors.163.com/centos/5/extras/$basearch/
gpgcheck1
gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#additional packages that extend functionality of existing packages
[centosplus]
nameCentOS-5 - Plus - 163.com
mirrorlisthttp://mirrorlist.centos.org/?release5arch$basearchrepocentosplus
baseurlhttp://mirrors.163.com/centos/5/centosplus/$basearch/
gpgcheck1
enabled0
gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#contrib - packages by Centos Users
[contrib]
nameCentOS-5 - Contrib - 163.com
mirrorlisthttp://mirrorlist.centos.org/?release5arch$basearchrepocontrib
baseurlhttp://mirrors.163.com/centos/5/contrib/$basearch/
gpgcheck1
enabled0
gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5六、清理yum clean all
yum makecache七、更新yum update博文参考http://pvbutler.blog.51cto.com/7662323/1320908 转载于:https://blog.51cto.com/zhuqianwei/1678772