日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > centos >内容正文

centos

Centos/RedHat 7/6/5切换阿里云源并安装EPEL/IUS/REMI仓库

發布時間:2025/7/14 centos 48 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Centos/RedHat 7/6/5切换阿里云源并安装EPEL/IUS/REMI仓库 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

Centos/RedHat 7/6/5切換阿里云源并安裝EPEL/IUS/REMI倉庫

CentOS安裝完畢后,默認的yum源是國外的,國內訪問速度很慢,需要切換為國內的源,這里選用的是阿里云的源。此外,一些常用的倉庫,如epel和ius,最好也一并安裝了。

切換基本源為阿里云源

備份

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

下載新的CentOS-Base.repo 到/etc/yum.repos.d/

  • CentOS 5

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
  • CentOS 6

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
  • CentOS 7

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

安裝第三方源

安裝EPEL倉庫

yum install -y epel-release

如果以上命令不起作用:

  • CentOS/RHEL 7

rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
  • CentOS/RHEL 6

rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
  • CentOS/RHEL 5

rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm

安裝IUS倉庫

RHEL

  • RHEL 5

rpm -Uvh https://rhel5.iuscommunity.org/ius-release.rpm
  • RHEL 6

rpm -Uvh https://rhel6.iuscommunity.org/ius-release.rpm
  • RHEL 7

rpm -Uvh https://rhel7.iuscommunity.org/ius-release.rpm

?

CentOS

  • CentOS 5

rpm -Uvh https://centos5.iuscommunity.org/ius-release.rpm
  • CentOS 6

rpm -Uvh https://centos6.iuscommunity.org/ius-release.rpm
  • CentOS 7

rpm -Uvh https://centos7.iuscommunity.org/ius-release.rpm

安裝REMI倉庫

  • CentOS/RHEL 7

rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
  • CentOS/RHEL 6

rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
  • CentOS/RHEL 5

rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm

查看yum軟件倉庫列表

yum repolist

生成緩存

yum makecache

總結

以上是生活随笔為你收集整理的Centos/RedHat 7/6/5切换阿里云源并安装EPEL/IUS/REMI仓库的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。