编译安装php

./configure --prefix=/usr/local/php
--with-libdir=lib64
--enable-fpm
--with-fpm-user=roter
--with-fpm-group=roter
--enable-mysqlnd
--with-mysql=mysqlnd
--with-mysqli=mysqlnd
--with-pdo-mysql=mysqlnd
--enable-opcache
--enable-pcntl
--enable-mbstring
--enable-soap
--enable-zip
--enable-calendar
--enable-bcmath
--enable-exif
--enable-ftp
--enable-intl
--with-openssl
--with-zlib
--with-curl
--with-gd
--with-zlib-dir=/usr/lib
--with-png-dir=/usr/lib
--with-jpeg-dir=/usr/lib
--with-freetype-dir=/usr/lib
--with-gettext
--with-mhash
--with-ldap
--with-apxs2=/usr/bin/apxs

原文地址:https://www.cnblogs.com/liuyi2614/p/6096926.html