Linux 修改yum源
Linux 修改yum源
第一种方式:
|
1
|
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo |
第二种方式:
|
1
|
vi yum.sh |
|
1
2
3
4
5
6
7
8
9
10
|
#!/bin/bashmv /etc/yum.repos.d/* /mnta=`cat /etc/redhat-release |awk '{print $3}'|awk -F . '{print $1}'`if [ $a == 6 ];then wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repoelse wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repofiyum clean allyum makecache |
|
1
|
chmod 777 yum.sh |
|
1
|
./yum.sh |
异国有风雪,天涯莫思君
分享一些学Java开发路上的疑难疑点,希望关注方便采纳

浙公网安备 33010602011771号