tar zxvf mcrypt-2.6.8.tar.gz
LD_LIBRARY_PATH=/usr/local/lib64 ./configure
make
make install
cd /home/data/install/lnmp/php-5.3.16/ext/mcrypt/
/home/data/websrv/php/bin/phpize
./configure --with-php-config=/home/data/websrv/php/bin/php-config
make
make install
echo "extension=mcrypt.so" >>/home/data/websrv/php/etc/php.ini
cd /etc/php.d/
echo 'extension=mcrypt.so' > mcrypt.ini
service nginx restart
service php-fpm restart

给php加拓展包