First you need to install some dependencies

linux-headers-“yourversion here” (to know your version type “uname -r”)

in my case it is 2.6.35-22-generic

uname -r 


To install dependencies

sudo apt-get install dkms build-essential linux-headers-2.6.35-22-generic

Now from my second computer I open my web browser, went to, click on downloads, linux, and right click on the one corresponding to my linux (in my case is Ubuntu 10.10 maverik i386) and copy the link. Now open putty, ssh to the server, authenticate. Now type wget space and paste the link previously copied, hit enter.



Now install virtualbox 4.0.0

sudo dpkg -i virtualbox-4.0_4.0.0-69151~Ubuntu~maverick_i386.deb

if it ask for some dependencies do the following: (perryg was helping me to complete my setup and he recommend me to use the “–nox11” when installing virtualbox but I didn’t have that right so I installed all the dependencies and it works)
If you know how to put –nox11 good luck if not the do the following, this will install some X packages but they will be ignored.

sudo apt-get -f install

edited :: When you run “sudo apt-get -f install” it should install the dependencies and then virtualbox setup, If the VBox setup does not Start.
Then run the installation again. 上面安装好依赖后,再次执行:

sudo dpkg -i virtualbox-4.0_4.0.0-69151~Ubuntu~maverick_i386.deb

After that you have Virtualbox headless installed but you need to add the Extension Pack in order to have vrde and usb support.

First download the Extension Pack


(note that this link is for the 4.0.2 and I installed the 4.0.0, this is only informational you should change all of the command according with your linux version and VirtualBox version that you want to install. So if you install Vbox 4.0.0 you should install ExtcPack 4.0.0 or if you install VBox 4.0.2 you should install ExtcPack 4.0.2).

to install it type: VBoxManage extpack install “the name of the extension Pack file”
for example


VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.0.2-69518.vbox-extpack

Now yo can create configure and add vrde capabilities to your VMs.



VBoxManage registervm ~/win2003/win2003.vbox


vboxmanage startvm ~/win2003/win2003.vbox -type headless

注意无UI的server需要加参数 -type headless,否则会提示错误。

推荐一个很棒的第三方精简的 Laravel console

个人喜好经常写些命令行工具,laravel 很方便,但脚手架工程就 45M左右,使用 composer install --no-dev 也要24M左右,很笨重。 也尝试过 symfony 的 compos...


有关 PHP 和 js 浮点运算的坑

javascript 0.1 + 0.2 为啥不等于 0.3 ? (正确结果:0.30000000000000004) 0.8 * 7 为啥不等于 5.6 ? (正确结果:5.6000000000000005) PHP var_dump(intv...


彻底搞懂 PHP 变量结构体,多数文章观点不准确

PHP5 中的 zval // 1. zval typedef struct _zval_struct { zvalue_value value; zend_uint refcount__gc; zend_uchar type; zend_uchar is...