RHEL 运用 CentOS 的 yum 源itjob - 千亿集团

RHEL 运用 CentOS 的 yum 源itjob

2019-02-08 09:56:00 | 作者: 天蓉 | 标签: 运用,装置,体系 | 浏览: 4022

=
由于自己的 RHEL 没有注册,因而不能运用自带的 yum 来晋级体系或许装置软件。
由于 CentOS 是 RHEL 的完好从头编译版别(当然要彼此对应相同的版别号),所以 RHEL 是必定可以用 CentOS 的 yum 源的。
=
【删去 RHEL 自带的 yum】
# rpm -aq|grep yum|xargs rpm -e nodeps
=
【下载】以下四个文件:
# wget https://mirrors.163.com/centos/5/os/i386/CentOS/yum-3.2.19-18.el5.centos.noarch.rpm
# wget https://mirrors.163.com/centos/5/os/i386/CentOS/yum-metadata-parser-1.1.2-2.el5.i386.rpm
# wget https://mirrors.163.com/centos/5/os/i386/CentOS/python-iniparse-0.2.3-4.el5.noarch.rpm
# wget https://mirrors.163.com/centos/5/os/i386/CentOS/yum-fastestmirror-1.1.16-13.el5.centos.noarch.rpm
=
【装置】
# rpm -ivh python-iniparse-0.2.3-4.el5.noarch.rpm
# rpm -ivh yum-metadata-parser-1.1.2-2.el5.i386.rpm
# rpm -ivh yum-3.2.19-18.el5.centos.noarch.rpm
warning: yum-3.2.19-18.el5.centos.noarch.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
error: Failed dependencies:
yum-fastestmirror is needed by yum-3.2.19-18.el5.centos.noarch
# wget ftp://ftp.muug.mb.ca/mirror/centos/5.3/os/x86_64/CentOS/yum-fastestmirror-1.1.16-13.el5.centos.noarch.rpm
# rpm -ivh yum-fastestmirror-1.1.16-13.el5.centos.noarch.rpm
warning: yum-fastestmirror-1.1.16-13.el5.centos.noarch.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
error: Failed dependencies:
yum = 3.0 is needed by yum-fastestmirror-1.1.16-13.el5.centos.noarch
留意:装置的时分最好几个一同装置,假如单个装置的话可能会呈现依靠问题。
呈现了彼此依靠的问题。

混在一同
# rpm -ihv xxx.rpm yyyy.rpm
# rpm -ivh yum-3.2.19-18.el5.centos.noarch.rpm yum-fastestmirror-1.1.16-13.el5.centos.noarch.rpm


最终,下载配置文件:
# wget https://sudone.com/download/CentOS-Base.repo -O /etc/yum.repos.d/CentOS-Base.repo
这样就可以用 CentOS 的 yum 源来更新体系和装置软件了。

别的,附上 x86_64 体系运用 CentOS 的 yum 源需求下载的四个包:
wget https://mirrors.163.com/centos/5/os/x86_64/CentOS/yum-3.2.19-18.el5.centos.noarch.rpm
wget https://mirrors.163.com/centos/5/os/x86_64/CentOS/yum-metadata-parser-1.1.2-2.el5.x86_64.rpm
wget https://mirrors.163.com/centos/5/os/x86_64/CentOS/python-iniparse-0.2.3-4.el5.noarch.rpm
wget https://mirrors.163.com/centos/5/os/x86_64/CentOS/yum-fastestmirror-1.1.16-13.el5.centos.noarch.rpm
=
【主动运转 yum】
# chkconfig list yum
# chkconfig level 3 yum on

操控脚本 /etc/rc.d/init.d/yum,这个操控脚本激活了 /etc/cron.daily/yum.cron,而它又会使 cron 效劳来在每日清晨四点时进行主动的体系更新。
=
/etc/yum.repos.d/CentOS-Base.repo
CentOS-5 yum 国内镜像效劳 配置文件:

[base]
name=CentOS-5 - Base
#mirrorlist=https://mirrorlist.centos.org/?release=$releasever5 arch=$basearch
repo=os
#baseurl=https://mirror.centos.org/centos/$releasever/os/$basearch/
baseurl=https://mirror.be10.com/centos/5.0/os/$basearch/
$basearch/
$basearch/
gpgcheck=1
gpgkey=https://mirror.centos.org/centos/RPM-GPG-KEY-centos5

#released updates
[update]
name=CentOS-5 - Updates
#mirrorlist=https://mirrorlist.centos.org/?release=4 arch=$basearch repo=updates
baseurl=https://mirror.be10.com/centos/5.0/updates/$basearch/
$basearch/
$basearch/
gpgcheck=1
gpgkey=https://mirror.centos.org/centos/RPM-GPG-KEY-centos5

#packages used/produced in the build but not released
[addons]
name=CentOS-5 - Addons
#mirrorlist=https://mirrorlist.centos.org/?release=4 arch=$basearch repo=addons
baseurl=https://mirror.be10.com/centos/5.0/addons/$basearch/
$basearch/
$basearch/
gpgcheck=1
gpgkey=https://mirror.centos.org/centos/RPM-GPG-KEY-centos5

#additional packages that may be useful
[extras]
name=CentOS-5 - Extras
#mirrorlist=https://mirrorlist.centos.org/?release=4 arch=$basearch repo=extras

baseurl=https://mirror.be10.com/centos/5.0/extras/$basearch/
$basearch/
$basearch/
gpgcheck=1
gpgkey=https://mirror.centos.org/centos/RPM-GPG-KEY-centos5

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-5 - Plus
#mirrorlist=https://mirrorlist.centos.org/?release=4 arch=$basearch repo=centosplus
baseurl=https://mirror.be10.com/centos/5.0/centosplus/$basearch/
$basearch/
$basearch/
gpgcheck=1
enabled=0
gpgkey=https://mirror.centos.org/centos/RPM-GPG-KEY-centos5

#contrib - packages by Centos Users
[contrib]
name=CentOS-5 - Contrib
#mirrorlist=https://mirrorlist.centos.org/?release=4 arch=$basearch repo=contrib
baseurl=https://mirror.be10.com/centos/5.0/contrib/$basearch/
$basearch/
$basearch/
gpgcheck=1
enabled=0
gpgkey=https://mirror.centos.org/centos/RPM-GPG-KEY-centos5
=
参阅:
https://withpython.appspot.com/2009/07/25/Linux.html
https://linux.chinaunix.net/bbs/viewthread.php?tid=845200
https://linux.chinaunix.net/bbs/archiver/?tid-1141321.html
https://kpshare.blog.51cto.com/1195439/274730
https://wirless.blog.51cto.com/933360/309915
https://kpshare.blog.51cto.com/1195439/274733


原文:

版权声明
本文来源于网络,版权归原作者所有,其内容与观点不代表千亿集团立场。转载文章仅为传播更有价值的信息,如采编人员采编有误或者版权原因,请与我们联系,我们核实后立即修改或删除。

猜您喜欢的文章

阅读排行

  • 1

    squid更新缓存csdn

    服务器,地址
  • 2

    几个有用的开源镜像环球

    体系,探究,总结
  • 3
  • 4

    用户指令alibaba

    用户,指令,修正
  • 5

    两台linux文件复制环球

    文件,运用,地址
  • 6
  • 7
  • 8
  • 9
  • 10