apt-get install build-essential autoconf
apt-get install libxml2-dev libevent-dev libgmp-dev libmysqlclient-dev libgd-dev libssl-dev libpng12-dev libjpeg-dev libbz2-dev libicu-dev libmcrypt-dev libreadline-dev libxslt-dev libltdl-dev libpq-dev libcurl4-openssl-dev libvmime-dev
ln -s /usr/include/freetype2 /usr/include/freetype2/freetype
phpbrew install 5.3.29 +default+dbs +gd +fpm +pdo +curl +json +hash +mbstring +fileinfo +soap +session +opcache +imap +readline +iconv
then vim /etc/rc.loal
replace #!/bin/sh -e
to #!/bin/bash -e
in it,then
add: