admin 管理员组

文章数量: 1184232

mcrypt拓展

#tar -zxvf libmcrypt-2.5.8.tar.gz

#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 -j 4

#make install

说明:由于在配置Mcrypt时,会找不到libmcrypt的链接库,导致无法编译,因为Libmcrypt的链接库在/usr/local/lib文件夹下。所以在配置mcrypt时要加入LD_LIBRARY_PATH=/usr/local/lib导入连接库 或者:执行export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH,然后在安装mcrypt在任意PHP文件中加入函数 phpinfo(),即可取得目前PHP的配置在这些配置后面新增需要加入的配置:./configure --with-apxs2=/usr/local/web/apache/bin/apxs --with-mcrypt --with-mhash

./configure --with-apxs2=/usr/local/web/apache/bin/apxs --with-mcrypt --with-mhash --with-libxml-dir --enable-bcmath --enable-sockets

然后进入php源代码目录,执行这条完整的configure命令

配置完成,下面进行源码包的制作和安装

make clean (一定需要)

make

make install

本文标签: mcrypt拓展