最近虚拟机中安装了redhat6.3企业版,自带的yum用不起来,软件都找不到。

网上搜了一下说是没付钱。。。,需要改下yum源。操作步骤如下:

 

1.切换到yum源存放目录
[root@rhel6 ~]# cd /etc/yum.repos.d/

 

2.wget方式下载网易Centos yum源
[root@rhel6 yum.repos.d]# wget http://mirrors.163.com/.help/CentOS6-Base-163.repo

 

3.修改文件名,备份自带redhat源
[root@rhel6 yum.repos.d]# mv rhel-source.repo rhel-source.repo.bak

[root@rhel6 yum.repos.d]# mv CentOS6-Base-163.repo rhel-source.repo

 

4.修改repo文件中的版本号
[root@rhel6 yum.repos.d]# sed -i "s;\$releasever;6;g" rhel-source.repo

 

5.清除原有缓存
[root@rhel6 yum.repos.d]# yum clean all


6.获取yum列表


[root@rhel6 yum.repos.d]# yum makecache

 

 

最终效果:

Redhat6更改yum源 (转)

 


---------------------
作者:罗汉爷
来源:CSDN
原文:https://blog.csdn.net/indexman/article/details/80640803
版权声明:本文为博主原创文章,转载请附上博文链接!

相关文章:

  • 2021-10-23
  • 2022-01-18
  • 2021-12-18
  • 2021-11-27
  • 2022-12-23
  • 2022-12-23
  • 2021-11-27
  • 2022-01-07
猜你喜欢
  • 2021-05-18
  • 2021-08-19
  • 2021-11-06
  • 2021-11-29
  • 2021-11-27
  • 2021-11-27
  • 2021-08-25
相关资源
相似解决方案