天天看点

编译LAMP 环境之PHP

版本PHP-5.3.27 ./configure 参数全摘自《跟阿铭一起学Linux第二版》

1. [root@KAKA php-5.3.27]# ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql  --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-bz2 --with-openssl --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-mbstring --enable-sockets --enable-exif --disable-ipv6

2.$ echo $?

3.$ make 

4.$ echo $?

5.$ make install

6.$ echo $?

完成

1.  ./configure前先根据参数选项,安装依赖包:

yum install -y libxml2-devel openssl openssl-devel  bzip2 bzip2-devel  libpng libpng-devel freetype freetype-devel libjpeg libjpeg-devel

2.[root@yaho php-5.3.27]# yum install -y libtool-ltdl libtool-ltdl-devel #解决找不到lltdl文件问题

3.安装加密模块:libmcrypt

wget http://nchc.dl.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz

$ tar zxf libmcrypt

$ cd libmcrypt

$ ./configure

提示需要缺少c++库

$ yum install -ygcc-c++

$ make &&make install

$ cd ..                               #回到PHP目录

      本文转自笔下生辉  51CTO博客,原文链接:http://blog.51cto.com/752030200/1722379,如需转载请自行联系原作者