Ubuntu/CentOS下源码编译安装Php 5.6基本参数
先确认安装libxml2
apt-get install libxml2 libxml2-dev
或者
yum install libxml2 libxml2-dev
配置命令:
./configure --prefix=/usr/local/include/php --with-pdo-mysql --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-zlib-dir --enable-xml --enable-bcmath --enable-shmop --enable-sysvsem --enable-sysvshm --enable-inline-optimization --with-curl --enable-mbregex --enable-fpm --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-ldap-sasl --with-xmlrpc --enable-zip --enable-soap --enable-opcache --enable-ftp --enable-calendar --with-xsl --with-gettext --enable-session --enable-ctype --with-kerberos --with-pcre-regex --enable-exif --with-bz2
执行完后没有错误泽继续执行 make&make install进行安装
如果提示缺少哪个就yum或者apt安装哪个,安装完后再执行配置命令即可。