> CentOS > CentOS入门 >

CentOS利用yum升级操作系统版本(目前最新6.6)

1. 查看操作系统版本
[it@Centos1 ~]# cat /etc/redhat-release
CentOS release 6.4 (Final)


2. 让操作系统能够与外网通信
[it@Centos1 ~]# ping www.baidu.com
PING www.a.shifen.com (119.75.218.70) 56(84) bytes of data.
64 bytes from 119.75.218.70: icmp_seq=1 ttl=128 time=4.90 ms
64 bytes from 119.75.218.70: icmp_seq=2 ttl=128 time=5.33 ms


3. 配置yum源
[it@Centos1 ~]# vim /etc/yum.repos.d/CentOS-Base.repo
[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6


4. 利用yum升级操作系统版本
[it@Centos1 ~]# yum update
Total download size: 121 M
Is this ok [y/N]: y        

                         
5. 安装完后查看操作系统版本
[it@Centos1 ~]# cat /etc/redhat-release
CentOS release 6.6 (Final) (责任编辑:IT)