Installing php5-fpm on Debian

First of all, we get the server key:
cd /tmp
cat dotdeb.gpg | apt-key add –

Then we update the sources.list file so apt will find the packages:
echo "deb squeeze all" >> /etc/apt/sources.list
echo "deb-src squeeze all" >> /etc/apt/sources.list

Or for Debian Wheezy:
echo "deb wheezy all" >> /etc/apt/sources.list
echo "deb-src wheezy all" >> /etc/apt/sources.list

Then install php5-fpm:
apt-get update
apt-get install php5 php5-fpm php-pear php5-common php5-mcrypt php5-mysql php5-cli php5-gd php5-suhosin

More on php5-fpm: