参考:https://www.cnblogs.com/achengmu/p/9517337.html
https://www.cnblogs.com/ywrj/p/9404394.html
centos7.2 阿里云 php7.2.3安装
cd /usr/src
wget http://cn2.php.net/distributions/php-7.2.3.tar.gz
tar -zxvf php-7.2.3.tar.gz
cd php-7.2.3/
yum install gcc
yum install libxml2
yum install libxml2-devel
yum -y install openssl
yum -y install openssl-devel
yum -y install curl
yum -y install curl-devel
yum -y install libjpeg
yum -y install libjpeg-devel
yum -y install libpng
yum -y install libpng-devel
yum -y install freetype
yum -y install freetype-devel
yum -y install pcre
yum -y install pcre-devel
yum -y install libxslt
yum -y install libxslt-devel
yum -y install bzip2
yum -y install bzip2-devel
yum -y install gcc gcc-c++ libmcrypt-devel mcrypt mhash gd-devel ncurses-devel \
libxml2-devel bzip2-devel libcurl-devel curl-devel libjpeg-devel libpng-devel freetype-devel \
net-snmp-devel openssl-deve python-devel zlib-devel freetype libxslt* bison autoconf re2c
./configure --prefix=/usr/local/php72 \
--with-curl \
--with-freetype-dir \
--with-gd \
--with-gettext \
--with-iconv-dir \
--with-kerberos \
--with-libdir=lib64 \
--with-libxml-dir \
--with-mysqli \
--with-openssl \
--with-pcre-regex \
--with-pdo-mysql \
--with-pdo-sqlite \
--with-pear \
--with-png-dir \
--with-jpeg-dir \
--with-xmlrpc \
--with-xsl \
--with-zlib \
--with-bz2 \
--with-mhash \
--enable-fpm \
--enable-bcmath \
--enable-libxml \
--enable-inline-optimization \
--enable-mbregex \
--enable-mbstring \
--enable-opcache \
--enable-pcntl \
--enable-shmop \
--enable-soap \
--enable-sockets \
--enable-sysvsem \
--enable-sysvshm \
--enable-xml \
--enable-zip
./configure --prefix=/usr/local/php72 --with-config-file-path=/etc/php72 --enable-fpm
--with-config-file-path:指定php.ini路径
--prefix 主程序安装目录
make
make install
/usr/local/php72/bin/php -v
/usr/local/php72/bin/php -m
[PHP Modules]
Core
ctype
date
dom
fileinfo
filter
hash
iconv
json
libxml
pcre
PDO
pdo_sqlite
Phar
posix
Reflection
session
SimpleXML
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter
[Zend Modules]
问题:Configuration file为none
php-fpm和nginx可以改为用socket通信
参考:https://www.cnblogs.com/achengmu/p/9517337.html