今天一個小伙伴詢問博主,想換個163源(阿里源、亞馬遜應該都是一樣,博主沒有一一驗證)怎么換!博主當然興致勃勃的准備好了指點小伙伴...但是,你沒猜錯,打臉了。而且最后還是和小伙伴一起配置好的,所以就寫下了這篇文章:
這里的環境是linux的Redhat,不過其他的大致也是一樣的
配置源的思路簡介:
配置163源
配置epel源
一:配置163源
刪除本身的源:
1 [root@localhost ~]# cd /etc/yum.repos.d 2 [root@localhost yum.repos.d]# ls 3 rhel-source.repo
將rhel-source.repo放到Redhat文件下:
1 [root@localhost yum.repos.d]# mkdir redhat 2 [root@localhost yum.repos.d]# ls 3 redhat rhel-source.repo 4 [root@localhost yum.repos.d]# mv rhel-source.repo redhat/ 5 [root@localhost yum.repos.d]# ls 6 redhat
創建163源文件:
1 [root@localhost yum.repos.d]# vim 163.repo
編輯文件內容:
[163repo] name=linux redhat 163.repo baseurl=http://mirrors.163.com/centos/6/os/x86_64/(這里選擇163的源,這里是Redhat6的源) gpgcheck=0 enabled=1
配置epel源:
rpm -ivh http://mirrors.sohu.com/fedora-epel/6/x86_64/epel-release-6-8.noarch.rpm
查詢結果:
1 [root@localhost yum.repos.d]# ls 2 163.repo epel.repo epel-testing.repo redhat
