./configure \
--prefix=/usr/local/php \
--with-config-file-path=/usr/local/php/etc \
--with-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--with-libxml-dir \
--with-pcre-dir \
--with-mcrypt \
--with-openssl \
--with-gd \
--with-jpeg-dir \
--with-png-dir \
--with-xpm-dir \
--with-gettext \
--with-freetype-dir \
--with-bz2 \
--with-iconv-dir \
--with-zlib \
--with-zlib-dir \
--with-curl \
--with-xmlrpc \
--enable-fpm \
--with-fpm-user=www \
--with-fpm-group=www \
--with-icu-dir=/usr \
--enable-pcntl \
--enable-intl \
--enable-sockets \
--enable-gd-native-ttf \
--enable-gd-jis-conv \
--enable-ftp \
--enable-zip \
--enable-calendar \
--enable-mbstring \
--enable-exif \
--enable-soap \
--enable-wddx \
--enable-bcmath \
--enable-fd-setsize=4096 \
--disable-short-tags \
--disable-ipv6 \
--with-apxs2=/usr/sbin/apxs
yum install -y httpd httpd-devel
你在PHP的configure的时候,加上:
--with-apxs2=/usr/local/apache/bin/apxs
这样就会自动编译一个libphp5.so出来了。
注意:/usr/local/apache/bin/apxs 路径要改成你自己的APACHE安装路径
转载于:https://blog.51cto.com/bobo5900pro/2334277