国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

Red Hat Enterprise Linux 7 / 8 / 9 更換 Centos 源鏡像

這篇具有很好參考價值的文章主要介紹了Red Hat Enterprise Linux 7 / 8 / 9 更換 Centos 源鏡像。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點擊"舉報違法"按鈕提交疑問。

Red Hat? YUM 源是需要注冊付費的,如果要使用 Red Hat 系統(tǒng)安裝軟件,需要將Red Hat 源替換為CentOS對應(yīng)的源,在替換 YUM 源的過程以及所遇到的問題;如不一定要使用 Red Hat 系統(tǒng),建議直接下載使用 CentOS?

redhat.repo編輯,linux,運維,服務(wù)器

當(dāng)前Red Hat 版本 測試環(huán)境三臺,分別為??Red Hat 7 /8 9.2 /?

[root@localhost ~]# vi /etc/hosts? 修改計算機名稱
[root@localhost ~]# nmcli general hostname xx 修改計算機名稱
[root@localhost ~]# cat /etc/redhat-release  查看系統(tǒng)版本信息

Red Hat Enterprise Linux Server release 7.9 (Maipo)

Red Hat Enterprise Linux release 8.8 (Ootpa)

Red Hat Enterprise Linux release 9.2 (Plow)?

一、Red Hat Enterprise Linux 7?更換方式:

This system is not registered with an entitlement server. You can use subscription-manager to register.

redhat.repo編輯,linux,運維,服務(wù)器

1.1??先刪除系統(tǒng)自帶的?yum?軟件包

[root@redHatEnterpriseLinux7 ~]# rpm -qa |grep yum

redhat.repo編輯,linux,運維,服務(wù)器

[root@redHatEnterpriseLinux7 ~]# rpm -qa|grep yum|xargs rpm -e --nodeps
[root@redHatEnterpriseLinux7 ~]# rpm -qa|grep python-urlgrabber|xargs rpm -e --nodeps

1.2?.?下載?centos7??6個相關(guān)的軟件包

http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-3.4.3-168.el7.centos.noarch.rpm
http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-54.el7_8.noarch.rpm
http://mirrors.163.com/centos/7/os/x86_64/Packages/python-iniparse-0.4-9.el7.noarch.rpm
http://mirrors.163.com/centos/7/os/x86_64/Packages/python-urlgrabber-3.10-10.el7.noarch.rpm
http://mirrors.163.com/centos/7/os/x86_64/Packages/wget-1.14-18.el7_6.1.x86_64.rpm

redhat.repo編輯,linux,運維,服務(wù)器

1.3? 將 rmp 6個包上傳到 opt 的目錄 需要注意安裝順序:

----安裝順序:
rpm -ivh python-iniparse-0.4-9.el7.noarch.rpm
rpm -ivh python-urlgrabber-3.10-10.el7.noarch.rpm
rpm -ivh yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
----這兩個要一起安裝
rpm -ivh yum-plugin-fastestmirror-1.1.31-54.el7_8.noarch.rpm yum-3.4.3-168.el7.centos.noarch.rpm
----最后安裝 wget
[root@redHatEnterpriseLinux7 opt]# rpm -ivh wget-1.14-18.el7_6.1.x86_64.rpm 

redhat.repo編輯,linux,運維,服務(wù)器

1.4?通過?wget?下載配置文件 Centos

[root@redHatEnterpriseLinux7 opt]# wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo

redhat.repo編輯,linux,運維,服務(wù)器

1.5 修改 剛剛 wget 下載來的 CentOS-Base.repo 配置 文件 位于 /etc/yum.repos.d 目錄

# 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-7 - Base - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/7/os/$basearch/
        http://mirrors.aliyuncs.com/centos/7/os/$basearch/
        http://mirrors.cloud.aliyuncs.com/centos/7/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
 
#released updates 
[updates]
name=CentOS-7 - Updates - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/7/updates/$basearch/
        http://mirrors.aliyuncs.com/centos/7/updates/$basearch/
        http://mirrors.cloud.aliyuncs.com/centos/7/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
 
#additional packages that may be useful
[extras]
name=CentOS-7 - Extras - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/7/extras/$basearch/
        http://mirrors.aliyuncs.com/centos/7/extras/$basearch/
        http://mirrors.cloud.aliyuncs.com/centos/7/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
 
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-7 - Plus - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/7/centosplus/$basearch/
        http://mirrors.aliyuncs.com/centos/7/centosplus/$basearch/
        http://mirrors.cloud.aliyuncs.com/centos/7/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
 
#contrib - packages by Centos Users
[contrib]
name=CentOS-7 - Contrib - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/7/contrib/$basearch/
        http://mirrors.aliyuncs.com/centos/7/contrib/$basearch/
        http://mirrors.cloud.aliyuncs.com/centos/7/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
[root@redHatEnterpriseLinux7 yum.repos.d]# vi CentOS-Base.repo
[root@redHatEnterpriseLinux7 yum.repos.d]# mv CentOS-Base.repo redhat.repo
[root@redHatEnterpriseLinux7 ~]# yum clean all 
[root@redHatEnterpriseLinux7 ~]# yum makecache

redhat.repo編輯,linux,運維,服務(wù)器

1.6? 清理一下緩存 和 生成一下 緩存??yum?clean?all? &? yum?makecache

redhat.repo編輯,linux,運維,服務(wù)器?1.7? 測試?yum 安裝 yum install -y lrzsz? ?yum -y install vim*? ?和 yum update 是否安裝成功

[root@redHatEnterpriseLinux7 ~]# yum repolist

redhat.repo編輯,linux,運維,服務(wù)器

redhat.repo編輯,linux,運維,服務(wù)器

redhat.repo編輯,linux,運維,服務(wù)器

redhat.repo編輯,linux,運維,服務(wù)器

二、Red Hat Enterprise Linux 8?更換方式:

2.1 在配置文件中關(guān)閉這個官方的訂閱? 編輯配置文件“? 更改參數(shù)“?enabled?=?1”到“?enabled?=?0”

vi /etc/yum/pluginconf.d/subscription-manager.conf
[main]
enabled=0

2.2 將 Red Hat ?官方訂閱刪除

yum remove subscription-manager

redhat.repo編輯,linux,運維,服務(wù)器

2.3 red hat 8 更換 Centos 8?阿里云鏡像源;

備份一下 redhat.repo 文件
mv /etc/yum.repos.d/redhat.repo /etc/yum.repos.d/redhat.repo.bak

獲取新的 CentOS-Base.repo 到 /etc/yum.repos.d/ 
curl -o /etc/yum.repos.d/redhat.repo http://mirrors.aliyun.com/repo/Centos-8.repo

也可以使用 wget -O 來獲取,但需要手動下在 rpm -ivh wget-1.14-18.el7_6.1.x86_64 來安裝 
wget -O /etc/yum.repos.d/redhat.repo http://mirrors.aliyun.com/repo/Centos-8.repo

下載新的CentOS-Base.repo 到 /etc/yum.repos.d/ (這里用的CentOS 8.0)

redhat.repo編輯,linux,運維,服務(wù)器

2.4 更換完成之后要 進行清除緩存,生成緩存;

[root@redHatEnterpriseLinux8 ~]# yum clean all
[root@redHatEnterpriseLinux8 ~]# yum makecache

redhat.repo編輯,linux,運維,服務(wù)器

2.5??測試?yum 安裝 yum -y install wget? &? yum install -y lrzsz? ?看看能否安裝成功;

redhat.repo編輯,linux,運維,服務(wù)器

redhat.repo編輯,linux,運維,服務(wù)器

三、Red Hat Enterprise Linux 9?更換方式:

redhat.repo編輯,linux,運維,服務(wù)器3.1? 修改紅帽的訂閱管理配置文件? vi?subscription-manager.conf
? ? ? ?把enabled的置改成0,然后保存? , 再刪除 官方訂閱??yum remove subscription-manager

[root@RedHatEnterpriseLinux9 ~]# cd /etc/yum/pluginconf.d/
[root@RedHatEnterpriseLinux9 ~]# vi subscription-manager.conf 
[root@RedHatEnterpriseLinux9 ~]# yum remove subscription-manager

redhat.repo編輯,linux,運維,服務(wù)器

redhat.repo編輯,linux,運維,服務(wù)器

3.2?再刪除 cd?/etc/yum.repos.d 目錄下的 redhat.repo 文件 ,? ?rm -rf? redhat.repo?
? ? ? 如沒有?redhat.repo 這個文件了,就不用管:

3.3? 使用 vi ?redhat.repo?編輯一個新的配置文件:

vi  redhat.repo  添加如下內(nèi)容:

[AppStream]
name=AppStream
baseurl=http://mirrors.aliyun.com/almalinux/9.2/AppStream/x86_64/os/
gpgcheck=0
enabled=1

[BaseOS]
name=BaseOS
baseurl=http://mirrors.aliyun.com/almalinux/9.2/BaseOS/x86_64/os/
gpgcheck=0
enabled=1

[extras]
name=extras
baseurl=http://mirrors.aliyun.com/almalinux/9.2/extras/x86_64/os/
gpgcheck=0
enabled=1

[plus]
name=plus
baseurl=http://mirrors.aliyun.com/almalinux/9.2/plus/x86_64/os/
gpgcheck=0
enabled=1

[devel]
name=devel
baseurl=http://mirrors.aliyun.com/almalinux/9.2/devel/x86_64/os/
gpgcheck=0
enabled=1

[NFV]
name=NFV
baseurl=https://mirrors.aliyun.com/almalinux/9.2/NFV/x86_64/os/
gpgcheck=0
enabled=1

[CRB]
name=CRB
baseurl=https://mirrors.aliyun.com/almalinux/9.2/CRB/x86_64/os/
gpgcheck=0
enabled=1

[HighAvailability]
name=HighAvailability
baseurl=https://mirrors.aliyun.com/almalinux/9.2/HighAvailability/x86_64/os/
gpgcheck=0
enabled=1

3.4? 執(zhí)行? yum?clean?all? &? yum?makecache

[root@RedHatEnterpriseLinux9 ~]# yum?clean?all? 
[root@RedHatEnterpriseLinux9 ~]# yum makecache

redhat.repo編輯,linux,運維,服務(wù)器

3.5?測試 dnf 安裝 yum?install wget? &? yum?install lrzsz? &? yum?update 看看能否安裝成功;?

redhat.repo編輯,linux,運維,服務(wù)器redhat.repo編輯,linux,運維,服務(wù)器

redhat.repo編輯,linux,運維,服務(wù)器文章來源地址http://www.zghlxwxcb.cn/news/detail-776647.html

到了這里,關(guān)于Red Hat Enterprise Linux 7 / 8 / 9 更換 Centos 源鏡像的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實不符,請點擊違法舉報進行投訴反饋,一經(jīng)查實,立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費用

相關(guān)文章

  • VMware安裝Red Hat7.9及Red Hat Enterprise Linux7.9下載

    VMware安裝Red Hat7.9及Red Hat Enterprise Linux7.9下載

    【百度網(wǎng)盤下載】 鏈接:https://pan.baidu.com/s/1567NfZRF48PBXfUqxumvDA 提取碼:bm7u 【點擊創(chuàng)建虛擬機】 【自定義高級】 【選擇光盤映像安裝】 全名自定義即可 【虛擬機命名+處理器配置】 【內(nèi)存配置+網(wǎng)絡(luò)類型】 【I/O控制器+磁盤類型】 【磁盤選擇+磁盤容量】 【磁盤文件+完成創(chuàng)建

    2024年04月17日
    瀏覽(24)
  • Red Hat Enterprise Linux 7.9 安裝圖解

    Red Hat Enterprise Linux 7.9 安裝圖解

    風(fēng)險告知 本人及本篇博文不為任何人及任何行為的任何風(fēng)險承擔(dān)責(zé)任,圖解僅供參考,請悉知! 本次安裝圖解是在一個全新的演示環(huán)境下進行的,演示環(huán)境中沒有任何有價值的數(shù)據(jù),但這并不代表擺在你面前的環(huán)境也是如此。 生產(chǎn)環(huán)境全新安裝或者自行測試都可放心參考該

    2024年01月23日
    瀏覽(26)
  • Red Hat Enterprise Linux 9.3 安裝圖解

    Red Hat Enterprise Linux 9.3 安裝圖解

    風(fēng)險告知 本人及本篇博文不為任何人及任何行為的任何風(fēng)險承擔(dān)責(zé)任,圖解僅供參考,請悉知! 本次安裝圖解是在一個全新的演示環(huán)境下進行的,演示環(huán)境中沒有任何有價值的數(shù)據(jù),但這并不代表擺在你面前的環(huán)境也是如此。 生產(chǎn)環(huán)境全新安裝或者自行測試都可放心參考該

    2024年01月23日
    瀏覽(20)
  • Red Hat Enterprise Linux 6.10 安裝圖解

    Red Hat Enterprise Linux 6.10 安裝圖解

    風(fēng)險告知 本人及本篇博文不為任何人及任何行為的任何風(fēng)險承擔(dān)責(zé)任,圖解僅供參考,請悉知! 本次安裝圖解是在一個全新的演示環(huán)境下進行的,演示環(huán)境中沒有任何有價值的數(shù)據(jù),但這并不代表擺在你面前的環(huán)境也是如此。 生產(chǎn)環(huán)境全新安裝或者自行測試都可放心參考該

    2024年01月20日
    瀏覽(25)
  • Red Hat Enterprise Linux 9/8/7/6合集下載

    Red Hat Enterprise Linux 9/8/7/6合集下載

    各位朋友: 大家好!小武studio帶大家了解一下紅帽系統(tǒng): 紅帽公司成立于1993年,是全球首家收入超10億美元的開源公司,總部位于美國,分支機構(gòu)遍布全球。紅帽公司作為全球領(lǐng)先的開源和Linux系統(tǒng)提供商,其產(chǎn)品已被業(yè)界廣泛認(rèn)可并使用,尤其是RHEL系統(tǒng)在業(yè)內(nèi)擁有超高的

    2024年04月27日
    瀏覽(26)
  • Red Hat Enterprise Linux (RHEL) 9.2 (x86_64, aarch64) - 紅帽企業(yè) Linux 9.2 發(fā)布

    Red Hat Enterprise Linux (RHEL) 9.2 (x86_64, aarch64) - 紅帽企業(yè) Linux 9.2 發(fā)布

    Red Hat Enterprise Linux (RHEL) 9.2 (x86_64, aarch64) 紅帽企業(yè) Linux 9.2 請訪問原文鏈接:https://sysin.org/blog/rhel-9/,查看最新版。原創(chuàng)作品,轉(zhuǎn)載請保留出處。 作者主頁:sysin.org 紅帽企業(yè) Linux 9 紅帽 2023-05-11 12:10 發(fā)表于北京 紅帽企業(yè) Linux 9.2 和 8.8 推動混合云中更大規(guī)模的 Linux 自動化,有

    2024年02月04日
    瀏覽(53)
  • 在 CentOS 或 Red Hat 系統(tǒng)上安裝 Citus 組件

    要在 CentOS 或 Red Hat 系統(tǒng)上安裝 Citus 組件,你可以按照以下步驟操作: 首先,使用 curl 命令下載 Citus 社區(qū)版的安裝腳本: 接著,使用 sudo 權(quán)限運行這個腳本來添加 Citus 的倉庫: 安裝 Citus。這里的示例是安裝 citus121_16 ,但你應(yīng)該根據(jù)你的 PostgreSQL 版本和需求選擇合適的版本

    2024年02月04日
    瀏覽(21)
  • 如何將 ONLYOFFICE 桌面版編輯器 7.5 安裝到 Red Hat、CentOS 及衍生產(chǎn)品上

    如何將 ONLYOFFICE 桌面版編輯器 7.5 安裝到 Red Hat、CentOS 及衍生產(chǎn)品上

    ?使用桌面版的?ONLYOFFICE?在線編輯器,您可使用本地文件操作,無需保持互聯(lián)網(wǎng)連接狀態(tài)。 ONLYOFFICE 桌面編輯器 是一款全面的辦公工具,提供了文本文檔、電子表格、演示文稿、可填寫表單和 PDF 查看和編輯功能。它高度兼容微軟 Office 格式,包括 .docx、.xlsx 和 .pptx 等文件格

    2024年02月07日
    瀏覽(15)
  • Linux Red Hat 9.0使用源代碼編譯安裝Nginx

    Linux Red Hat 9.0使用源代碼編譯安裝Nginx

    目錄 前言 編譯安裝Nginx源代碼 下載安裝必須的依賴項(GCC編譯器,GNU make工具,PCRE庫和zlib庫) 創(chuàng)建nginx組和用戶賬戶 進入瀏覽器,拉取nginx源碼(Nginx 1.20.2版本) 上傳到Red Hat(此處上傳在/home/zyz下) 移動源碼到root用戶下 解壓 進入nginx-1.20.2目錄下 檢查平臺安裝環(huán)境 執(zhí)行

    2024年03月10日
    瀏覽(27)
  • RedHat Enterprise Linux8如何重置root密碼

    RedHat Enterprise Linux8如何重置root密碼

    本博客將提供兩種方式來更改root用戶密碼,按需取用~ 目錄 方法一: 1.啟動系統(tǒng)進入GRUB2界面 2.找到以Liunx開頭的那一行使用init=/bin/bash替換末尾的rhgb quiet 3.按Ctrl+X鍵啟動系統(tǒng) 4.執(zhí)行passwd root修改密碼 5.執(zhí)行touch /.autorelabel用于重新標(biāo)記SELinux環(huán)境值 6.執(zhí)行exec /sbin/init命令啟動系

    2024年04月25日
    瀏覽(26)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包