編譯LAMP環境之PHP

技術小胖子發表於2017-11-08

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

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

      本文轉自筆下生輝  51CTO部落格,原文連結:http://blog.51cto.com/752030200/1722379,如需轉載請自行聯絡原作者


相關文章