centos5.6下virtualbox安裝手記(1)

來源:互聯網
上載者:User

最近伺服器被大量外借,所以想藉此推進一下虛擬化技術。虛擬機器軟體特別選用了比較簡單的Virtualbox。但是居然被告知軟體裝不上,無奈之下自己動手,中間確實遇到點小問題,記錄下來以做備忘。

1. 安裝軟體環境

  1. yum install gcc 
  2. yum install kernel-devel 
  3. yum install kernel-headers 

這裡需要注意一下當前系統使用的kernel版本與安裝相應kernel-headers和kernel-devel要對應上。如果找不到相應的 包,那麼就用yum install kernel把伺服器也升級到同一個版本,然後選擇新核心重啟。遠程安裝可以通過下面的對/boot/grub/grub.conf編輯實現切換指定內 核)

2. 安裝virtualbox軟體

rpm -ivh VirtualBox-4.1-4.1.6_74727_rhel5-1.x86_64.rpm

但是隨便調用了下vboxmanage list vms就發現驅動沒有編譯,根據提示執行編譯命令,見到如下報錯:

  1. [root@localhost home]#  sudo /etc/init.d/vboxdrv setup 
  2.  
  3. Stopping VirtualBox kernel modules                         [確定] 
  4.  
  5. Uninstalling old VirtualBox DKMS kernel modules            [確定] 
  6.  
  7. Removing old VirtualBox pci kernel module                  [確定] 
  8.  
  9. Removing old VirtualBox netadp kernel module               [確定] 
  10.  
  11. Removing old VirtualBox netflt kernel module               [確定] 
  12.  
  13. Removing old VirtualBox kernel module                      [確定] 
  14.  
  15. Trying to register the VirtualBox kernel modules using DKMS[失敗] 
  16.  
  17.   (Failed, trying without DKMS) 
  18.  
  19. Recompiling VirtualBox kernel modules                      [確定] 
  20.  
  21. Starting VirtualBox kernel modules                         [失敗] 
  22.  
  23.   (Running VirtualBox in a Xen environment is not supported) 
簡單看了一下,是dkms沒安裝引起的

3. 安裝dkms

這個比較簡單,到這裡http://linux.dell.com/dkms/去下載一個安裝就行了。

然後再執行驅動編譯命令,發現還是出錯:


聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.