php编译

./configure --prefix=/opt/php7 --with-config-file-path=/opt/php7/etc --with-mysqli=mysqlnd --enable-mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql --with-pdo-mysql=mysqlnd --enable-pdo --enable-mbstring --enable-inline-optimization --with-layout=GNU --enable-fpm --enable-pcntl --enable-sockets --with-openssl --enable-libxml --enable-xml --enable-simplexml --enable-xmlwriter --enable-xmlreader --with-xmlrpc --enable-json --enable-zip --with-zlib --with-curl --with-iconv --with-mcrypt --enable-mbregex --with-mhash --enable-hash --enable-bcmath --enable-soap --with-ldap-sasl --enable-posix --enable-ctype --enable-opcache --enable-dom --enable-sysvsem --enable-shmop --with-gd --enable-session --with-pcre-regex --enable-tokenizer --with-freetype-dir --enable-filter --enable-debug --enable-phar

 

./configure --prefix=/usr/local/services/php7 --with-config-file-path=/usr/local/services/php7/etc --with-mysqli=mysqlnd --enable-mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql --with-pdo-mysql=mysqlnd --enable-pdo --enable-mbstring --enable-inline-optimization --with-layout=GNU --enable-fpm --enable-pcntl --enable-sockets --with-openssl --enable-libxml --with-libxml-dir=/usr --enable-xml --enable-simplexml --enable-xmlwriter --enable-xmlreader --with-xmlrpc --enable-json --enable-zip --with-zlib --with-curl --with-iconv --with-iconv=/usr/iconv --with-iconv-dir=/usr --with-mcrypt --enable-mbregex --with-mhash --enable-hash --enable-bcmath --enable-soap --with-ldap-sasl --enable-posix --enable-ctype --enable-opcache --enable-dom --enable-sysvsem --enable-shmop --with-gd --enable-session --with-pcre-regex --enable-tokenizer --with-freetype-dir --enable-filter

 

--disable-all 禁用所有启用的模块
--enable-debug 开发环境下
--disable-debug 非开发环境下

 

--enable-phar
--without-pear
--disable-phar

 

 

参数说明:

https://my.oschina.net/u/1438722/blog/335350

https://www.cnblogs.com/shuaixf/archive/2011/12/04/2276055.html

 

 

yum install -y epel-release
yum install -y libmcrypt-devel
CentOs6默认的yum源没有 libmcrypt-devel这个包, 需要安装epel-release.

转载于:https://www.cnblogs.com/yihanC/p/7908796.html

你可能感兴趣的:(php编译)