如何安装 mcrypt

    #cd libmcrypt-2.5.8
#./configure
#make
#make install
说明:libmcript默认安装在/usr/local
3.安装mhash
#tar -zxvf mhash-0.9.9.9.tar.gz
#cd mhash-0.9.9.9
#./configure
#make
#make install
4.安装mcrypt
#tar -zxvf mcrypt-2.6.8.tar.gz
#cd mcrypt-2.6.8
#LD_LIBRARY_PATH=/usr/local/lib ./configure
#make
#make install
说明:因为在配置Mcrypt时,会找不到libmcrypt的连接库,致使没法编译,由于Libmcrypt的连接库在/usr/local/文件夹下。
所以在配置mcrypt时要加入LD_LIBRARY_PATH=/usr/local导入键接库
5.安装PHP
在配置PHP是加入:
#./configure --with-mcrypt --with-mhash
或者经过php的phpize动态添加的方式,到源码的ext/的相应目录,执行
/usr/bin/phpize
./configure --with-php-config=/usr/bin/php-config
make
make install
而后把生成的.so文件在php.ini文件里引用后重启apache就能够了!