Kangle安装MCrypt加密扩展的方法
一、首先安装Libmcrypt支持库
wget http://jaist.dl.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz
tar zxf libmcrypt-2.5.8.tar.gz
cd libmcrypt-2.5.8
./configure
make -s
make -s install
cd
二、安装mhash支持库
wget https://nchc.dl.sourceforge.net/project/mhash/mhash/0.9.9.9/mhash-0.9.9.9.tar.gz
tar zxf mhash-0.9.9.9.tar.gz
cd mhash-0.9.9.9
./configure
make -s
make -s install
cd
为避免/vhs/kangle/ext/tpl_php52/bin/phpize 报错。
比如提示:Cannot find autoconf
我们提前编译两个工具:
wget http://ftp.gnu.org/gnu/m4/m4-1.4.9.tar.gz
tar -zvxf m4-1.4.9.tar.gz
cd m4-1.4.9/
./configure && make && make install
cd ../
wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.62.tar.gz
tar -zvxf autoconf-2.62.tar.gz
cd autoconf-2.62/
./configure && make && make install
三、开始安装MCrypt
wget https://nchc.dl.sourceforge.net/project/mcrypt/MCrypt/2.6.8/mcrypt-2.6.8.tar.gz
tar zxf mcrypt-2.6.8.tar.gz
cd mcrypt-2.6.8
LD_LIBRARY_PATH=/usr/local/lib ./configure
make -s
make -s install
cd
wget http://www.lmcjl.com/php-5.3.29.tar.gz
tar zxf php-5.3.29.tar.gz
cd php-5.3.29
cd ext
cd mcrypt
/vhs/kangle/ext/tpl_php52/bin/phpize
./configure --with-php-config=/vhs/kangle/ext/tpl_php52/bin/php-config
make
make install
我这提示mcrypt.so文件在这个路径
/vhs/kangle/ext/tpl_php52/lib/php/extensions/no-debug-non-zts-20090626
php.ini加入如下
extension = "/vhs/kangle/ext/tpl_php52/lib/php/extensions/no-debug-non-zts-20090626/mcrypt.so"
然后重启即可生效。