1. 安裝必要軟件
yum install libxml2-devel libmcrypt libmcrypt-devel libpng-devel openjpeg-devel libXpm-devel freetype-devel libjpeg-devel libcurl-devel gd
./configure --prefix=/data/php7.1 --enable-opcache --enable-fpm --enable-mbstring --with-curl --with-mcrypt --enable-pcntl --with-pcre-regex --with-config-file-path=/data/php7.1/etc -with-pdo-mysql --with-mysqli --enable-mysqlnd -with-gd --enable-soap --enable-sockets --enable-sysvsem --enable-sysvshm --enable-mbregex --enable-exif --enable-bcmath --with-mhash --enable-zip --with-zlib
3. 安裝php擴展
/data/php7.1/bin/pecl install redis
4. 下載並安裝swoole擴展
./configure --with-php-config=/data/php7.1/bin/php-config --enable-coroutine --enable-async-redis