歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> CentOS安裝VirtualBox

CentOS安裝VirtualBox

日期:2017/2/28 15:29:09   编辑:Linux教程
1 檢查系統內核版本

[root@CentOS ~]# uname -a

Linux centos 2.6.18-194.el5 #1 SMP Fri Apr 2 14:58:35 EDT 2010 i686 i686 i386 GNU/Linux



2 安裝軟件環境

yum install gcc

yum install kernel-devel

yum install kernel-headers

注:這步執行後的版kernel-devel和kernel-headers 的版本為

======================================================================================================

Package Arch Version Repository Size

======================================================================================================

Installing:

kernel-devel x86_64 2.6.18-308.16.1.el5 updates 5.7 M

Transaction Summary

======================================================================================================

Install 1 Package(s)

Upgrade 0 Package(s)



3 升級系統內核

注:如果不升級內核的話,那麼”kernel-devel和kernel-headers”與kenerl內核的版本不一致在第一步uname -a我們看到內核版本為2.6.18-194.el5

[root@centos ~]# yum install kernel

Loaded plugins: fastestmirror

Loading mirror speeds from cached hostfile

* base: mirrors.163.com

* extras: mirrors.163.com

* updates: mirrors.163.com

Setting up Install Process

Resolving Dependencies

--> Running transaction check

---> Package kernel.x86_64 0:2.6.18-308.16.1.el5 set to be installed

--> Finished Dependency Resolution

Dependencies Resolved

======================================================================================================

Package Arch Version Repository Size

======================================================================================================

Installing:

kernel x86_64 2.6.18-308.16.1.el5 updates 21 M

Transaction Summary

======================================================================================================

Install 1 Package(s)

Upgrade 0 Package(s)

Total download size: 21 M

Is this ok [y/N]: y

Downloading Packages:

kernel-2.6.18-308.16.1.el5.x86_64.rpm | 21 MB 00:20

Running rpm_check_debug

Running Transaction Test

Finished Transaction Test

Transaction Test Succeeded

Running Transaction

Installing : kernel 1/1

Installed:

kernel.x86_64 0:2.6.18-308.16.1.el5

Complete!

升級完了內核,現在在來看下內核的版本變更過來了沒有

[root@centos ~]# uname -a

Linux centos 2.6.18-194.el5 #1 SMP Fri Apr 2 14:58:14 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

還是沒有變過來,這裡要注意了。升級內核後一定要重啟
Copyright © Linux教程網 All Rights Reserved