apt-get install nginx spawn-fcgi
apt-get install php5-cli php5-cgi php5-gd php5-mcrypt
#change locale from C to EN UTF-8 by selecting en_US.UTF-8
dpkg-reconfigure locales
modify .brshrc by adding
export LANG=en_US.UTF-8
#config php5 nginx by install a pre-configed deb package
dpkg -i php-nginx_0.2_all.deb
# restart nginx and php
/etc/init.d/php-fastcgi stop
/etc/init.d/nginx restart
/etc/init.d/php-fastcgi start