编译LAMP 环境之PHP
版本PHP-5.3.27 ./configure 参数全摘自《跟阿铭一起学Linux第二版》1. # ./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 $?
0
3.$ make
4.$ echo $?
0
5.$ make install
6.$ echo $?
0
完成
1../configure前先根据参数选项,安装依赖包:
yum install -y libxml2-devel openssl openssl-develbzip2 bzip2-devellibpng libpng-devel freetype freetype-devel libjpeg libjpeg-devel
2.# 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目录
页:
[1]