Centos8Stream更換國內(nèi)源

1、備份系統(tǒng)自帶的源
mkdir -p /etc/yum.repos.d/bak
mv /etc/yum.repos.d/* /etc/yum.repos.d/bak
2息裸、添加新的yum源
vim /etc/yum.repos.d/CentOS-Base.repo
添加如下內(nèi)容:

[base]
name=CentOS-8.5.2111 - Base - mirrors.aliyun.com
baseurl=http://mirrors.aliyun.com/centos-vault/8.5.2111/BaseOS/$basearch/os/
        http://mirrors.aliyuncs.com/centos-vault/8.5.2111/BaseOS/$basearch/os/
        http://mirrors.cloud.aliyuncs.com/centos-vault/8.5.2111/BaseOS/$basearch/os/
gpgcheck=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official
 
#additional packages that may be useful
[extras]
name=CentOS-8.5.2111 - Extras - mirrors.aliyun.com
baseurl=http://mirrors.aliyun.com/centos-vault/8.5.2111/extras/$basearch/os/
        http://mirrors.aliyuncs.com/centos-vault/8.5.2111/extras/$basearch/os/
        http://mirrors.cloud.aliyuncs.com/centos-vault/8.5.2111/extras/$basearch/os/
gpgcheck=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official
 
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-8.5.2111 - Plus - mirrors.aliyun.com
baseurl=http://mirrors.aliyun.com/centos-vault/8.5.2111/centosplus/$basearch/os/
        http://mirrors.aliyuncs.com/centos-vault/8.5.2111/centosplus/$basearch/os/
        http://mirrors.cloud.aliyuncs.com/centos-vault/8.5.2111/centosplus/$basearch/os/
gpgcheck=0
enabled=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official
 
[PowerTools]
name=CentOS-8.5.2111 - PowerTools - mirrors.aliyun.com
baseurl=http://mirrors.aliyun.com/centos-vault/8.5.2111/PowerTools/$basearch/os/
        http://mirrors.aliyuncs.com/centos-vault/8.5.2111/PowerTools/$basearch/os/
        http://mirrors.cloud.aliyuncs.com/centos-vault/8.5.2111/PowerTools/$basearch/os/
gpgcheck=0
enabled=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official


[AppStream]
name=CentOS-8.5.2111 - AppStream - mirrors.aliyun.com
baseurl=http://mirrors.aliyun.com/centos-vault/8.5.2111/AppStream/$basearch/os/
        http://mirrors.aliyuncs.com/centos-vault/8.5.2111/AppStream/$basearch/os/
        http://mirrors.cloud.aliyuncs.com/centos-vault/8.5.2111/AppStream/$basearch/os/
gpgcheck=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official

3、添加appstream
vim /etc/yum.repos.d/CentOS-AppStream.repo
添加如下內(nèi)容

[AppStream]
name=CentOS-8.5.2111 - AppStream - mirrors.aliyun.com
baseurl=http://mirrors.aliyun.com/centos-vault/8.5.2111/AppStream/$basearch/os/
        http://mirrors.aliyuncs.com/centos-vault/8.5.2111/AppStream/$basearch/os/
        http://mirrors.cloud.aliyuncs.com/centos-vault/8.5.2111/AppStream/$basearch/os/
gpgcheck=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official

4垒玲、添加epel源
vim /etc/yum.repos.d/epel-archive-8.repo
添加如下內(nèi)容

[epel-archive]
name=Extra Packages for Enterprise Linux 8 - $basearch
baseurl=http://mirrors.aliyun.com/epel-archive/8/Everything/$basearch
enabled=1
gpgcheck=0

[epel-archive-debuginfo]
name=Extra Packages for Enterprise Linux 8 - $basearch - Debug
baseurl=http://mirrors.aliyun.com/epel-archive/8/Everything/$basearch/debug
enabled=0
gpgcheck=0

[epel-archive-source]
name=Extra Packages for Enterprise Linux 8 - $basearch - Source
baseurl=http://mirrors.aliyun.com/epel-archive/8/Everything/SRPMS
enabled=0
gpgcheck=0

5坐昙、生成新的緩存
yum clean all && yum makecache

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末亏栈,一起剝皮案震驚了整個濱河市顾翼,隨后出現(xiàn)的幾起案子投放,更是在濱河造成了極大的恐慌,老刑警劉巖适贸,帶你破解...
    沈念sama閱讀 218,204評論 6 506
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件灸芳,死亡現(xiàn)場離奇詭異,居然都是意外死亡拜姿,警方通過查閱死者的電腦和手機烙样,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 93,091評論 3 395
  • 文/潘曉璐 我一進店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來蕊肥,“玉大人谒获,你說我怎么就攤上這事∏绻。” “怎么了究反?”我有些...
    開封第一講書人閱讀 164,548評論 0 354
  • 文/不壞的土叔 我叫張陵,是天一觀的道長儒洛。 經(jīng)常有香客問我,道長狼速,這世上最難降的妖魔是什么琅锻? 我笑而不...
    開封第一講書人閱讀 58,657評論 1 293
  • 正文 為了忘掉前任,我火速辦了婚禮向胡,結(jié)果婚禮上恼蓬,老公的妹妹穿的比我還像新娘。我一直安慰自己僵芹,他們只是感情好处硬,可當(dāng)我...
    茶點故事閱讀 67,689評論 6 392
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著拇派,像睡著了一般荷辕。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上件豌,一...
    開封第一講書人閱讀 51,554評論 1 305
  • 那天疮方,我揣著相機與錄音,去河邊找鬼茧彤。 笑死骡显,一個胖子當(dāng)著我的面吹牛,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播惫谤,決...
    沈念sama閱讀 40,302評論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼壁顶,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了溜歪?” 一聲冷哼從身側(cè)響起博助,我...
    開封第一講書人閱讀 39,216評論 0 276
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎痹愚,沒想到半個月后富岳,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 45,661評論 1 314
  • 正文 獨居荒郊野嶺守林人離奇死亡拯腮,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 37,851評論 3 336
  • 正文 我和宋清朗相戀三年窖式,在試婚紗的時候發(fā)現(xiàn)自己被綠了。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片动壤。...
    茶點故事閱讀 39,977評論 1 348
  • 序言:一個原本活蹦亂跳的男人離奇死亡萝喘,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出琼懊,到底是詐尸還是另有隱情阁簸,我是刑警寧澤,帶...
    沈念sama閱讀 35,697評論 5 347
  • 正文 年R本政府宣布哼丈,位于F島的核電站启妹,受9級特大地震影響,放射性物質(zhì)發(fā)生泄漏醉旦。R本人自食惡果不足惜饶米,卻給世界環(huán)境...
    茶點故事閱讀 41,306評論 3 330
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望车胡。 院中可真熱鬧檬输,春花似錦、人聲如沸匈棘。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,898評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽主卫。三九已至逃默,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間队秩,已是汗流浹背笑旺。 一陣腳步聲響...
    開封第一講書人閱讀 33,019評論 1 270
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留馍资,地道東北人筒主。 一個月前我還...
    沈念sama閱讀 48,138評論 3 370
  • 正文 我出身青樓关噪,卻偏偏與公主長得像,于是被迫代替她去往敵國和親乌妙。 傳聞我的和親對象是個殘疾皇子使兔,可洞房花燭夜當(dāng)晚...
    茶點故事閱讀 44,927評論 2 355

推薦閱讀更多精彩內(nèi)容