cd /root/php-5.2.6/ext/mcrypt
运行phpize
/usr/local/php5/bin/phpize
[ansi]root@Web2 11 mcrypt $/usr/local/php5/bin/phpize
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519
#make
Installing shared extensions: /usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613/
[ansi]root@Web2 20 mcrypt $cd /usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613/
[ansi]root@Web2 21 no-debug-non-zts-20060613 $ls
eaccelerator.so mcrypt.so memcache.so
然后编辑php.ini(如果php安装在/usr/local/php5 则php.ini在/usr/local/php5/lib/php.ini中添加
extension_dir = "/usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613/"
extension = "mcrypt.so"