最近虛擬機中安裝了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
最終效果:
---------------------
作者:羅漢爺
來源:CSDN
原文:https://blog.csdn.net/indexman/article/details/80640803
版權聲明:本文為博主原創文章,轉載請附上博文鏈接!