由于redhat商业化,注册才能使用其源,这里用阿里的centos源代替


1 .下载CentOS-Base.repo文件 该文件会下载到 /etc/yum.repos.d 这个目录下面

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

redhat7 rhel7怎么修改镜像源 阿里源 源


2. 将$releaseserve替换为7, 双击CentOS-Base.repo文件打开后按ctr+h键 查找后全部替换

redhat7 rhel7怎么修改镜像源 阿里源 源


3. 执行 yum clean all 清楚原来的缓存

redhat7 rhel7怎么修改镜像源 阿里源 源


4. 执行 yum makecache 建立元数据缓存

redhat7 rhel7怎么修改镜像源 阿里源 源


配置成功啦


相关文章:

  • 2022-01-16
  • 2021-11-27
  • 2021-05-24
  • 2021-06-21
  • 2022-12-23
  • 2022-02-07
  • 2022-12-23
  • 2021-11-09
猜你喜欢
  • 2021-07-07
  • 2021-10-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案