参考网站:https://www.cnblogs.com/haoyufeng/p/4393005.html
rhel的版本号::::::::::
[root@LinuxS04 yum.repos.d]# cat /etc/os-release
NAME="Red Hat Enterprise Linux Server"
VERSION="7.0 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="7.0"
PRETTY_NAME="Red Hat Enterprise Linux Server 7.0 (Maipo)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.0:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.0
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION=7.0
[root@LinuxS04 yum.repos.d]#
下载163的源::::::::
[root@localhost yum.repos.d]# wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
编辑repo [root@LinuxS04 yum.repos.d]# vim CentOS6-Base-163.repo
修改: 用vim在一般模式使用下面的命令把$releasever全部替换为版本号,即7
:1,$s/$releasever/7/g
最后,:wq保存退出vim