容器技术交流

 找回密码
 立即注册
查看: 4499|回复: 6

怎么要重启编译一下PHP,安装php-bcmatch的扩展?

[复制链接]
发表于 2011-10-6 22:38:30 | 显示全部楼层 |阅读模式
洞哥哥啊,我是个菜鸟啊,教教我怎么要重启编译一下PHP,安装php-bcmatch的扩展,小弟真的十分感激啊!
 楼主| 发表于 2011-10-7 20:43:44 | 显示全部楼层
怎么没人回答我啊!
 楼主| 发表于 2011-10-7 22:50:58 | 显示全部楼层
{:soso_e109:}{:soso_e109:}{:soso_e109:}{:soso_e109:}{:soso_e109:}{:soso_e109:}{:soso_e109:}{:soso_e109:}{:soso_e109:}{:soso_e109:}{:soso_e109:}{:soso_e109:}{:soso_e109:}{:soso_e109:}
谁来帮我啊!帮帮我啊!洞哥帮忙啊!
 楼主| 发表于 2011-10-8 15:28:00 | 显示全部楼层
谁来帮我啊!帮帮我啊!洞哥帮忙啊!
发表于 2012-2-3 23:53:12 | 显示全部楼层
我也需要重编译  php +上php-pear
发表于 2012-2-4 10:44:09 | 显示全部楼层
修改一下LuNamp/code/php/php.sh和LuNamp/code/php/php_fcgi.sh
发表于 2012-2-7 01:03:53 | 显示全部楼层
爱洞特漏 发表于 2012-2-4 10:44
修改一下LuNamp/code/php/php.sh和LuNamp/code/php/php_fcgi.sh

#!/bin/sh
#
# ******************************************************************************
# 感谢您使用LuNamp,本软件遵循GPL协议,详情请看:http://www.gnu.org/copyleft/gpl.html
# Thank you for choosing LuNamp, This program is free software;
# you can redistribute it and/or modify it under the terms of the GNU General
# Public License as published by the Free Software Foundation;
# either version 2 of the License, or (at your option) any later version.
# http://www.gnu.org/copyleft/gpl.html
# ------------------------------------++++
# 软件名:        LuNamp
# 作者:                刘新(网名:爱洞特漏)
# 官方网站:        www.zijidelu.org
# 服务邮箱:        service@zijidelu.org
# ------------------------------------++++
# Software:  LuNamp
# Author:    Liu Xin
# Website:   www.zijidelu.org
# Email:     service@zijidelu.org
# ------------------------------------++++
# Thank you for choosing LuNamp!
# ******************************************************************************
#

if [ -e "./common/common.sh" ]; then
        . "./common/common.sh"
else
        . "../common/common.sh"
fi

soft_root="/usr/local/php_fcgi"
soft_version="5.2.17"
fpm_version="0.5.14"

cd ${i_soft_root}   

rm -rf php-${soft_version}
tar -zxvf php-${soft_version}.tar.gz
gzip -cd php-${soft_version}-fpm-${fpm_version}.diff.gz | patch -d php-${soft_version} -p1
cd php-${soft_version}

if [ "${linux_type}" = 'RedHat' ]; then
        extends='--with-gd=/usr --with-freetype-dir --with-jpeg-dir --with-png-dir --with-openssl'
else
        extends='--with-gd=/usr/local/gd --with-freetype-dir=/usr/local/freetype --with-jpeg-dir=/usr/local/jpeg --with-png-dir=/usr/local/libpng --with-openssl'
fi

if [ ${enable_pdo_mysql} = 'yes' ]; then
        extends="--with-pdo-mysql=/usr/local/mysql/bin/mysql_config ${extends}";
fi

if [ ${enable_mysqli} = 'yes' ]; then
        extends="--with-mysqli=/usr/local/mysql/bin/mysql_config ${extends}";
fi

./configure --prefix=$soft_root ${extends} \
--enable-fastcgi \
--enable-force-cgi-redirect \
--enable-discard-path \
--with-mysql=/usr/local/mysql \
--disable-debug \
--enable-mbstring \
--with-libxml-dir=/usr/local \
--with-zlib \
--with-ttf \
--enable-gd-native-ttf \
--with-iconv=/usr/local/libiconv \
--enable-fpm \
--enable-ftp \
--with-curl=/usr/local/curl \
--with-curlwrappers \
--enable-sockets \
--with-mcrypt=/usr/local/libmcrypt \
--enable-pdo \
--with-pgsql=/usr/local/pgsql \
--enable-zip \
--enable-bcmath \
--enable-calendar \
--enable-exif \
--enable-soap \
--with-pear=/usr/share/pear \

/usr/local/make/bin/make ZEND_EXTRA_LIBS='-liconv';
echo
/usr/local/make/bin/make install

#--with-mysqli=/usr/local/mysql/bin/mysql_config \
#--with-pdo-mysql=/usr/local/mysql/bin/mysql_config \
#--with-mhash \
#--enable-embedded-mysqli \

if [ ! -d "$soft_root" ]; then
        /usr/local/make/bin/make install
fi

#$soft_root/bin/php ${i_soft_root}/go-pear.phar


if [ ! -f "$soft_root/lib/php.ini" ]; then
        if [ -f "./php.ini-dist" ]; then
                cat php.ini-dist > $soft_root/lib/php.ini
        elif [ -f "./php.ini-production" ]; then
                cat php.ini-production > $soft_root/lib/php.ini
        fi
fi

if [ -f "$soft_root/lib/php.ini" ]; then
        chown LuManager $soft_root/lib/php.ini
else
        echo "$soft_root/lib/php.ini 不存在,没安装成功!";
        exit;
fi

cat ${i_code_root}/php/php-fpm.conf > $soft_root/etc/php-fpm.conf

str_replace     "disable_functions =/disable_functions = shell_exec, system, passthru, exec, popen, proc_open"    "$soft_root/lib/php.ini"

cd ..
rm -rf php-${soft_version}
cd ${i_code_root}

if [ -d "${soft_root}" ]; then
        echo $enter4
        ${i_code_root}/php/eaccelerator_nginx.sh
       
        echo $enter4
        ${i_code_root}/php/memcache_nginx.sh
fi

只修改了紅色這句,
還是不成功
還有其他config command嗎
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Archiver|URLOS ( 粤ICP备18087780号 )

GMT+8, 2025-5-16 05:32 , Processed in 0.030857 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表