centos升级到特定的版本

  • 从centos找到centos7.6的地址
  • 国内大部分都没有历史版本 无法进行特定版本的升级,这里直接使用官网的,稳定
  • 使用官网镜像下载会慢,配合小飞机加速下载, 如果国内有镜像就从国内下载
  • proxy=socks5://192.168.2.43:1080 代理加速写在/etc/yum.conf中
cat >>/etc/yum.repos.d/CentOS-Base.repo <<\EOF
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the 
# remarked out baseurl= line instead.
#
#
 
[base]
name=CentOS-$releasever - Base - mirrors.aliyun.com
failovermethod=priority
baseurl=http://vault.centos.org/7.6.1810/os/$basearch/
        http://vault.centos.org/7.6.1810/os/$basearch/
        http://vault.centos.org/7.6.1810/os/$basearch/
gpgcheck=1
gpgkey=http://vault.centos.org/RPM-GPG-KEY-CentOS-7
 
#released updates 
[updates]
name=CentOS-$releasever - Updates - mirrors.aliyun.com
failovermethod=priority
baseurl=http://vault.centos.org/7.6.1810/updates/$basearch/
        http://vault.centos.org/7.6.1810/updates/$basearch/
        http://vault.centos.org/7.6.1810/updates/$basearch/
gpgcheck=1
gpgkey=http://vault.centos.org/RPM-GPG-KEY-CentOS-7
 
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras - mirrors.aliyun.com
failovermethod=priority
baseurl=http://vault.centos.org/7.6.1810/extras/$basearch/
        http://vault.centos.org/7.6.1810/extras/$basearch/
        http://vault.centos.org/7.6.1810/extras/$basearch/
gpgcheck=1
gpgkey=http://vault.centos.org/RPM-GPG-KEY-CentOS-7
 
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus - mirrors.aliyun.com
failovermethod=priority
baseurl=http://vault.centos.org/7.6.1810/centosplus/$basearch/
        http://vault.centos.org/7.6.1810/centosplus/$basearch/
        http://vault.centos.org/7.6.1810/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://vault.centos.org//RPM-GPG-KEY-CentOS-7
 
#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib - mirrors.aliyun.com
failovermethod=priority
baseurl=http://vault.centos.org/7.6.1810/contrib/$basearch/
        http://vault.centos.org/7.6.1810/contrib/$basearch/
        http://vault.centos.org/7.6.1810/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=https://vault.centos.org/RPM-GPG-KEY-CentOS-7
EOF

你可能感兴趣的:(centos升级到特定的版本)