VirtualBox最新下载地址:https://www.virtualbox.org/wiki/Linux_Downloads (文章译自官网)
方法一:下载对应系统的安装包,自行手动安装。【这个比较合适对系统优化追求完美的使用者】 方法就是下载好安装包后,上传到服务器上面,再通过相关的安装语句进行安装即可, 比如redhat的可以这样安装: #yum install dkms #yum localinstall ****.rpm ubuntu的可以用 #sudo apt-get install dkms #sudo dpkg -i ***.deb
方法二:自动安装,主要是yum与apt-get系列 1、对于yum自动化安装 Oracle-Linux 4, Update 6 or Newer# cd /etc/yum.repos.d # mv Oracle-Base.repo Oracle-Base.repo.disabled # wget http://public-yum.oracle.com/public-yum-el4.repo Oracle-Linux 5# cd /etc/yum.repos.d # wget http://public-yum.oracle.com/public-yum-el5.repo Oracle-Linux 6【现在多是6后】# cd /etc/yum.repos.d # wget http://public-yum.oracle.com/public-yum-ol6.repo Oracle-VM 2# cd /etc/yum.repos.d # wget http://public-yum.oracle.com/public-yum-ovm2.repo Download下来这个yum源后,我们就可以直接通过yum来自动化安装了!见下面几条命令: #yum clean all #yum list all #yum install VirtualBox-4.2* 2、对于apt-get自动化安装: 首先添加源列表,路径为/etc/apt/source.list $sudo cp /etc/apt/source.list /etc/apt/source.listbak #注意先备份一下配置文档 $sudo vim /etc/apt/source.list 源为下面的中的一个或全部: deb http://download.virtualbox.org/virtualbox/debian precise contrib deb http://download.virtualbox.org/virtualbox/debian oneiric contrib deb http://download.virtualbox.org/virtualbox/debian natty contrib deb http://download.virtualbox.org/virtualbox/debian maverick contrib non-free deb http://download.virtualbox.org/virtualbox/debian lucid contrib non-free deb http://download.virtualbox.org/virtualbox/debian karmic contrib non-free deb http://download.virtualbox.org/virtualbox/debian hardy contrib non-free deb http://download.virtualbox.org/virtualbox/debian wheezy contrib deb http://download.virtualbox.org/virtualbox/debian squeeze contrib non-free deb http://download.virtualbox.org/virtualbox/debian lenny contrib non-free 添加后,就可以更新安装了! $sudo apt-get update $sudo apt-get install dkms 【必须安装的】 $sudo apt-get install virtualbox-4.2 下面附些命令: $sudo apt-get clean ---清空缓存 $sudo rm /var/lib/apt/lists/* ---删除缓存 $sudo rm /var/lib/apt/lists/partial/* ---同上 $sduo apt-get update ---更新(责任编辑:IT) |