【PHP7.1.8】
yum -y install gcc gcc-c++ libxml2 libxml2-devel bzip2 bzip2-devel libmcrypt libmcrypt-devel openssl openssl-devel libcurl-devel libjpeg-devel libpng-devel freetype-devel readline readline-devel libxslt-devel perl perl-devel psmisc.x86_64 recode recode-devel libtidy libtidy-devel mcrypt mhash
yum -y install libjpeglibjpeg-devel libpng libpng-devel freetype freetype-devel
wget http://cn2.php.net/distributions/php-7.1.0.tar.gz tar zxvf php-7.1.0.tar.gz
cd php-7.1.0
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-curl --with-freetype-dir --with-gd --with-gettext --with-iconv-dir --with-kerberos --with-libdir=lib64 --with-libxml-dir --with-openssl --with-pcre-regex --with-pdo-mysql --with-pdo-sqlite --with-pear --with-png-dir --with-xmlrpc --with-xsl --with-zlib --enable-fpm --enable-bcmath --enable-libxml --enable-inline-optimization --enable-gd-native-ttf --enable-mbregex --enable-mbstring --enable-opcache --enable-pcntl --enable-shmop --enable-soap --enable-sockets --enable-sysvsem --enable-xml --enable-zip --with-jpeg-dir
make clean && make && make install
【REDIS扩展】
git clone https://github.com/nicolasff/phpredis
git checkout php7
/usr/local/php7/bin/phpize ./configure --with-php-config=/usr/local/php/bin/php-config
make clean && make && make install
php.ini里增加extension="redis.so"