3
3

关于编译PHP5.2.12+php-fpm-0.6的问题

Author Jessica     Category PHP     Tags ,

看了张宴大哥的文章..自己学着编译 犹豫他的版本有点旧了 所以我都用的是新的版本 但是途中遇到一些问题..

下面做一下笔记.

PHP5.2.12的版本可以下载php-fpm-0.6~5.2.patch.

编译前先给PHP打补丁 查阅了php-fpm官方wiki 下面的方法我已经测试成功

patch -d php-5.2.12 -p1 <php-fpm-0.6~5.2.patch

然后这时候 不要直接configure 会出错(至少我是出了:(..)

官方wiki上让先buildconf

但是在执行这一步的时候 autoconf的版本太低..

所以要先安装autoconf-2.13.tar.gz

# tar -zxvf autoconf-2.13.tar.gz
# cd autoconf-2.13
# ./configure –prefix=/usr/local/autoconf
# make
# make install
# export PHP_AUTOCONF=/usr/local/autoconf/bin/autoconf
# export PHP_AUTOHEADER=/usr/local/autoconf/bin/autoheader

另外php-fpm的wiki上也说了 要求libevent的版本大于1.4.12 查看了我的版本非常低.

所以继续下载编译libevent-1.4.13-stable.tar.gz

# tar zxvf libevent-1.4.13-stable.tar.gz
# cd libevent-1.4.13-stable/
# ./configure –prefix=/usr/local/libevent
# make && make install

然后这时候进PHP的目录

第一步不是./confiure 而需要先./buildconf –force

然后configure

./configure –prefix=/usr/local/webserver/php –with-config-file-path=/usr/local/webserver/php/etc –with-mysql=/usr/local/webserver/mysql –with-mysqli=/usr/local/webserver/mysql/bin/mysql_config –with-iconv-dir=/usr/local –with-libevent=/usr/local/libevent –with-freetype-dir –with-jpeg-dir –with-png-dir –with-zlib –with-libxml-dir=/usr –enable-xml –disable-rpath –enable-discard-path –enable-safe-mode –enable-bcmath –enable-shmop –enable-sysvsem –enable-inline-optimization –with-curl –with-curlwrappers –enable-mbregex –enable-fastcgi –with-fpm –enable-force-cgi-redirect –enable-mbstring –with-mcrypt –with-gd –enable-gd-native-ttf –with-openssl –with-mhash –enable-pcntl –enable-sockets –with-ldap –with-ldap-sasl –with-xmlrpc –enable-zip –enable-soap –without-pear

然后编译成功..

3 Comments to “ 关于编译PHP5.2.12+php-fpm-0.6的问题 ”

  • 游客 2010年03月3日于15:31

    请搏主看下以下命令出错在那里 tar zxvf autoconf-2.13.tar.gz cd autoconf-2.13 ./configure –prefix=/usr/local/autoconf make && make install export PHP_AUTOCONF=/usr/local/autoconf/bin/autoconf export PHP_AUTOHEADER=/usr/local/autoconf/bin/autoheader cd ../ tar zxvf libevent-1.4.13-stable.tar.gz cd libevent-1.4.13-stable/ ./configure –prefix=/usr/local/libevent make && make install cd ../ tar jxvf php-5.2.12.tar.bz2 patch -d php-5.2.12 -p1 <php-fpm-0.6~5.2.patch cd php-5.2.12/ ./buildconf –force ./configure –prefix=/usr/local/webserver/php –with-config-file-path=/usr/local/webserver/php/etc –with-mysql=/usr/local/webserver/mysql –with-mysqli=/usr/local/webserver/mysql/bin/mysql_config –with-iconv-dir=/usr/local –with-libevent=/usr/local/libevent –with-freetype-dir –with-jpeg-dir –with-png-dir –with-zlib –with-libxml-dir=/usr –enable-xml –disable-rpath –enable-discard-path –enable-safe-mode –enable-bcmath –enable-shmop –enable-sysvsem –enable-inline-optimization –with-curl –with-curlwrappers –enable-mbregex –enable-fastcgi –with-fpm –enable-force-cgi-redirect –enable-mbstring –with-mcrypt –with-gd –enable-gd-native-ttf –with-openssl –with-mhash –enable-pcntl –enable-sockets –with-ldap –with-ldap-sasl –with-xmlrpc –enable-zip –enable-soap –without-pear make ZEND_EXTRA_LIBS='-liconv' make install cp php.ini-dist /usr/local/webserver/php/etc/php.ini cd ../

  • 游客 2010年03月3日于15:32

    请搏主看下以下命令出错在那里 autoconf-2.13和libevent-1.4.13-stable我是事先装好的,以下是编译php 5.2.12的命令 tar jxvf php-5.2.12.tar.bz2 patch -d php-5.2.12 -p1 <php-fpm-0.6~5.2.patch cd php-5.2.12/ ./buildconf –force ./configure –prefix=/usr/local/webserver/php –with-config-file-path=/usr/local/webserver/php/etc –with-mysql=/usr/local/webserver/mysql –with-mysqli=/usr/local/webserver/mysql/bin/mysql_config –with-iconv-dir=/usr/local –with-libevent=/usr/local/libevent –with-freetype-dir –with-jpeg-dir –with-png-dir –with-zlib –with-libxml-dir=/usr –enable-xml –disable-rpath –enable-discard-path –enable-safe-mode –enable-bcmath –enable-shmop –enable-sysvsem –enable-inline-optimization –with-curl –with-curlwrappers –enable-mbregex –enable-fastcgi –with-fpm –enable-force-cgi-redirect –enable-mbstring –with-mcrypt –with-gd –enable-gd-native-ttf –with-openssl –with-mhash –enable-pcntl –enable-sockets –with-ldap –with-ldap-sasl –with-xmlrpc –enable-zip –enable-soap –without-pear make ZEND_EXTRA_LIBS='-liconv' make install cp php.ini-dist /usr/local/webserver/php/etc/php.ini

  • 在编译php-fpm0.6的时候需要注意的一些问题 | Skiyo 2010年07月3日于12:25

    [...] 上次我曾经说过关于编译PHP5.2.12+php-fpm-0.6的问题..这次加上几个新的 就重新写一遍吧.. [...]

Post comment

分类目录

最近文章

最近评论

文章索引模板

标签

.net AJAX button Comet CSS Discuz! DIV+CSS Flash Form Google HTML编辑器 IE8 Java JavaScript jQuery JSP md5 MySQLReback Oracle PHP php-fpm PNG Punny SkiyoTabs tab TagCloud Vista Web2.0 Windows7 上传 加密 变量 图标 本站原创 模板 模板引擎 源码 登录 短网址 石家庄 算法 编译 面向对象 魔术方法

链接表