首页 > 代码库 > Linux系统升级
Linux系统升级
首先查看当前版本信息
# uname -a
Linux localhost.localdomain3.10.0-123.el7.x86_64 #1 SMP Mon Jun 30 12:09:22 UTC 2014 x86_64 x86_64 x86_64GNU/Linux
# cat/etc/redhat-release
CentOS Linux release 7.0.1406 (Core)
通过yum命令进行系统升级
[root@ZZSRV2 ~]# yum update →更新软件包不带任何参数的选项update可以更新所有已安装的软件包
Loaded plugins: fastestmirror, langpacks
base | 3.6 kB 00:00
extras | 3.3 kB 00:00
updates | 3.4 kB 00:00
updates/7/x86_64/primary_db | 2.8 MB 00:03
Loading mirror speeds from cached hostfile
* base: mirrors.neusoft.edu.cn
* extras: mirrors.skyshe.cn
* updates: mirrors.neusoft.edu.cn
Resolving Dependencies
--> Running transaction check
---> Package dhclient.x86_64 12:4.2.5-27.el7.centos will be updated
---> Package dhclient.x86_64 12:4.2.5-27.el7.centos.1 will be an update
---> Package dhcp-common.x86_64 12:4.2.5-27.el7.centos will be updated
---> Package dhcp-common.x86_64 12:4.2.5-27.el7.centos.1 will be an update
........
.......(部分省略)
Dependencies Resolved
================================================================================
Package Arch Version Repository
Size
================================================================================
Updating:
dhclient x86_64 12:4.2.5-27.el7.centos.1 updates 276 k
dhcp-common x86_64 12:4.2.5-27.el7.centos.1 updates 169 k
dhcp-libs x86_64 12:4.2.5-27.el7.centos.1 updates 126 k
kpatch noarch 0.1.10-1.el7_0 updates 8.2 k
nss-util x86_64 3.16.2-1.el7_0 updates 69 k
openssl x86_64 1:1.0.1e-34.el7_0.4 updates 705 k
openssl-libs x86_64 1:1.0.1e-34.el7_0.4 updates 940 k
yum-plugin-fastestmirror noarch 1.1.31-25.el7_0 updates 28 k
yum-utils noarch 1.1.31-25.el7_0 updates 111 k
.................
.........(部分省略)
Transaction Summary
================================================================================
Upgrade 17 Packages
Total download size: 4.6 M
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/17): dhcp-common-4.2.5-27.el7.centos.1.x86_64.rpm | 169 kB 00:00
(2/17): dhclient-4.2.5-27.el7.centos.1.x86_64.rpm | 276 kB 00:01
(3/17): kpatch-0.1.10-1.el7_0.noarch.rpm | 8.2 kB 00:00
(4/17): libgcc-4.8.2-16.2.el7_0.x86_64.rpm | 86 kB 00:00
(5/17): dhcp-libs-4.2.5-27.el7.centos.1.x86_64.rpm | 126 kB 00:01
(6/17): libstdc++-4.8.2-16.2.el7_0.x86_64.rpm | 288 kB 00:00
.................
...........(部分省略)
--------------------------------------------------------------------------------
Total 649 kB/s | 4.6 MB 00:07
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
Updating : nss-util-3.16.2-1.el7_0.x86_64 1/34
Updating : 12:dhcp-libs-4.2.5-27.el7.centos.1.x86_64 2/34
Updating : nss-softokn-freebl-3.16.2-1.el7_0.x86_64 3/34
Updating : nss-softokn-3.16.2-1.el7_0.x86_64 4/34
.......................
.....................
.................(部分省略)
Verifying : yum-utils-1.1.31-24.el7.noarch 34/34
Updated:
dhclient.x86_64 12:4.2.5-27.el7.centos.1
dhcp-common.x86_64 12:4.2.5-27.el7.centos.1
dhcp-libs.x86_64 12:4.2.5-27.el7.centos.1
kpatch.noarch 0:0.1.10-1.el7_0
libgcc.x86_64 0:4.8.2-16.2.el7_0
libgomp.x86_64 0:4.8.2-16.2.el7_0
libstdc++.x86_64 0:4.8.2-16.2.el7_0
nss.x86_64 0:3.16.2-2.el7_0
nss-softokn.x86_64 0:3.16.2-1.el7_0
...........
(部分省略)
Complete!
重新启动之后,进行验证
[root@ZZSRV2 ~]# uname -a
Linux localhost.localdomain3.10.0-123.6.3.el7.x86_64 #1 SMP Wed Aug 6 21:12:36 UTC 2014 x86_64 x86_64x86_64 GNU/Linux
[root@ZZSRV2 ~]# cat /etc/redhat-release
CentOS Linux release 7.0.1406 (Core)