ASCII码 ASCII码

配置阿里云RepoForge 镜像

发布于:2022-03-11 09:51:31  栏目:技术文档

镜像下载、域名解析、时间同步请点击 阿里云开源镜像站

一、RepoForge 镜像介绍

Repoforge 是 RHEL 系统下的软件仓库,拥有 10000 多个软件包,被认为是最安全、最稳定的一个软件仓库。

下载地址: https://mirrors.aliyun.com/repoforge/

二、RepoForge 镜像配置

1、运行uname 获取 OS 版本号(

  1. [root@centos ~]# uname -a
  2. Linux centos 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

2、向系统中添加 Repoforge 的 GPG 公钥

  1. [root@centos ~]# rpm --import https://mirrors.aliyun.com/repoforge/RPM-GPG-KEY.dag.txt
  2. [root@centos ~]#

3、运行下列命令(以 OS 版本 7 为例):

  1. sudo cat > /etc/yum.repos.d/rpmforge.repo << EOF
  2. [rpmforge]
  3. name = RHEL $releasever - RPMforge.net - dag
  4. baseurl = https://mirrors.aliyun.com/repoforge/redhat/el7/en/$basearch/rpmforge
  5. mirrorlist = http://mirrorlist.repoforge.org/el7/mirrors-rpmforge
  6. enabled = 1
  7. protect = 0
  8. gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
  9. gpgcheck = 1
  10. [rpmforge-extras]
  11. name = RHEL $releasever - RPMforge.net - extras
  12. baseurl = https://mirrors.aliyun.com/repoforge/redhat/el7/en/$basearch/extras
  13. mirrorlist = http://mirrorlist.repoforge.org/el7/mirrors-rpmforge-extras
  14. enabled = 0
  15. protect = 0
  16. gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
  17. gpgcheck = 1
  18. [rpmforge-testing]
  19. name = RHEL $releasever - RPMforge.net - testing
  20. baseurl = https://mirrors.aliyun.com/repoforge/redhat/el7/en/$basearch/testing
  21. mirrorlist = http://mirrorlist.repoforge.org/el7/mirrors-rpmforge-testing
  22. enabled = 0
  23. protect = 0
  24. gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
  25. gpgcheck = 1
  26. EOF

file

4、更新YUM源

  1. [root@centos ~]# yum repolist
  2. Loaded plugins: fastestmirror, versionlock
  3. Loading mirror speeds from cached hostfile
  4. * base: mirrors.aliyun.com
  5. * extras: mirrors.aliyun.com
  6. * rpmforge: mirrors.aliyun.com
  7. * updates: mirrors.aliyun.com
  8. repo id repo name status
  9. base/7/x86_64 CentOS-7 - Base - mirrors.aliyun.com 10,072
  10. extras/7/x86_64 CentOS-7 - Extras - mirrors.aliyun.com 500
  11. rpmforge RHEL - RPMforge.net - dag 245
  12. updates/7/x86_64 CentOS-7 - Updates - mirrors.aliyun.com 3,242
  13. repolist: 14,059
  14. [root@centos ~]#
  15. S-7 - Updates - mirrors.aliyun.com 3,242
  16. repolist: 14,059
  17. [root@centos ~]#

本文转自:https://blog.csdn.net/qq_45392321/article/details/122099058

相关推荐
阅读 +