手记

编译LAMP 环境之PHP


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 $?

0

3.$ make 

4.$ echo $?

0

5.$ make install

6.$ echo $?

0


完成


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目录


0人推荐
随时随地看视频
慕课网APP