一区二区三区在线-一区二区三区亚洲视频-一区二区三区亚洲-一区二区三区午夜-一区二区三区四区在线视频-一区二区三区四区在线免费观看

服務器之家:專注于服務器技術及軟件下載分享
分類導航

Linux|Centos|Ubuntu|系統進程|Fedora|注冊表|Bios|Solaris|Windows7|Windows10|Windows11|windows server|

服務器之家 - 服務器系統 - Centos - RHEL配置Centos yum源的方法

RHEL配置Centos yum源的方法

2019-06-11 10:45腳本之家服務器之家 Centos

RHEL的yum在線更新是收費的;沒有注冊不能在線安裝軟件;這種情況該怎么辦呢?我們可以借助CentOS的YUM源來滿足我們的需求。下面小編將為大家帶來RHEL配置Centos yum源的方法;有需要的朋友一起去看看吧

由于RHEL的yum在線更新是收費的,如果沒有注冊的話是不能使用的,即不能在線安裝軟件。在這種情況下,如果我們使用的機器安裝的是RHEL系統要是每次安裝軟件先掛載本地光盤會很繁瑣,而且有些軟件也是老版本的,這種情況下我們可以借助CentOS的YUM源來滿足我們的需求。

一、刪除RHEL原有的YUM

rpm -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]

name=CentOS-5 - Base - 163.com

mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=os

baseurl=http://mirrors.163.com/centos/5/os/$basearch/

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#released updates

[updates]

name=CentOS-5 - Updates - 163.com

mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=updates

baseurl=http://mirrors.163.com/centos/5/updates/$basearch/

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#packages used/produced in the build but not released

[addons]

name=CentOS-5 - Addons - 163.com

mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=addons

baseurl=http://mirrors.163.com/centos/5/addons/$basearch/

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#additional packages that may be useful

[extras]

name=CentOS-5 - Extras - 163.com

mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=extras

baseurl=http://mirrors.163.com/centos/5/extras/$basearch/

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#additional packages that extend functionality of existing packages

[centosplus]

name=CentOS-5 - Plus - 163.com

mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=centosplus

baseurl=http://mirrors.163.com/centos/5/centosplus/$basearch/

gpgcheck=1

enabled=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#contrib - packages by Centos Users

[contrib]

name=CentOS-5 - Contrib - 163.com

mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=contrib

baseurl=http://mirrors.163.com/centos/5/contrib/$basearch/

gpgcheck=1

enabled=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

六、清理

yum clean all

yum makecache

七、更新

yum update

延伸 · 閱讀

精彩推薦
  • CentosCentOS6.5下Redis安裝與配置詳細步驟

    CentOS6.5下Redis安裝與配置詳細步驟

    本篇文章主要介紹了CentOS6.5下Redis安裝與配置詳細步驟,詳細介紹redis單機單實例安裝與配置,服務及開機自啟動。有興趣的可以了解一下。...

    飛流11452021-12-24
  • Centoscentos 安裝與操作方法

    centos 安裝與操作方法

    這篇文章主要介紹了centos 安裝與操作方法,需要的朋友可以參考下...

    centos之家5272019-07-11
  • CentosCentos7運用/dev/shm進行網站優化

    Centos7運用/dev/shm進行網站優化

    這篇文章主要介紹了LINUX中Centos7運用/dev/shm進行網站優化相關知識點,對此有興趣的朋友參考學習下。...

    彬菌9912022-03-02
  • Centoscentos不小心刪除/root目錄該如何解決?

    centos不小心刪除/root目錄該如何解決?

    一些朋友最近在問小編centos不小心刪除/root目錄該如何解決?今天小編就為大家分享centos不小心刪除/root目錄解決辦法;希望對大家會有幫助,有需要的朋友...

    腳本之家8022019-05-29
  • CentosCentos 7開啟網卡自動獲取IP的詳細方法

    Centos 7開啟網卡自動獲取IP的詳細方法

    本篇文章主要介紹了Centos 7開啟網卡自動獲取IP的詳細方法,小編覺得挺不錯的,現在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧...

    凌鋒8972021-12-29
  • CentosCentOS下Uptime命令詳解

    CentOS下Uptime命令詳解

    在Linux下,我們可以使用uptime命令,而且此命令不必使用root權限。uptime命令在系統中已經默認安裝了。今天小編為大家帶來的是CentOS下Uptime命令詳解;希望...

    CentOS之家11482019-06-19
  • CentosCentOS7設置日期和時間方法以及基本概念介紹

    CentOS7設置日期和時間方法以及基本概念介紹

    這篇文章主要介紹了CentOS7設置日期和時間方法以及基本概念介紹,本文講解使用CentOS7中的新命令timedatectl設置日期時間方法,需要的朋友可以參考下 ...

    CentOS之家6522019-09-19
  • CentosCentOS 6.6實現永久修改DNS地址的方法

    CentOS 6.6實現永久修改DNS地址的方法

    這篇文章主要介紹了CentOS 6.6實現永久修改DNS地址的方法,涉及針對CentOS配置文件的相關設置技巧,具有一定參考借鑒價值,需要的朋友可以參考下 ...

    Linux社區4472020-08-21
主站蜘蛛池模板: 校草让我脱了内裤给全班看 | 女人全身裸露无遮挡免费观看 | 日本中文字幕在线精品 | 闺蜜的样子小说安沁在线阅读 | 久久影院中文字幕 | 我的好妈妈7中字在线观看韩国 | 1024国产高清精品推荐 | 亚洲视频在线免费 | 亚洲嫩模吧粉嫩粉嫩冒白浆 | 免费高清特黄a 大片 | 午夜国产| 美国女艳星brandilove | 欧美日韩国产亚洲一区二区 | 国产清纯白嫩大学生正在播放 | 韩国美女主播在线 | 国产老妇| 欧美爽妇| 男人狂擦女人的下面视频 | 好大好爽好硬我要喷水了 | 我的年轻漂亮继坶三级 | chinese老头和老太交hd | 丝瓜茄子绿巨人秋葵榴莲污 | 白丝美女用胸伺候主人 | 免费99精品国产自在现线 | 黑帮少爷爱上我第8集在线观看 | 九九爱这里只有精品 | 午夜亚洲 | 大学生按摩黄a级中文片 | 男人天堂国产 | 日本一区二区在线不卡 | 九九爱这里只有精品 | 手机在线观看国产精选免费 | 欧美精品久久一区二区三区 | 亚洲H成年动漫在线观看不卡 | 欧美另类杂交a | 第一次破女视频国产一级 | 国产原创一区二区 | 精品一区二区视频 | 色淫影院| 白丝出水| 性欧美xxxxxxx另类 |