Compiling installation PHP7 and installing Redis Extended swoole Extensions
On the machine that compiles PHP7, there is already a version that has been installed over php5.3, thereby relying on the library to have
This php7 is compiled into fpm-php use,
If it's Apache then the compile parameter should be
--with-apxs2=/usr/local/apache/bin/apxs
Compile and install PHP7
Wget-c http://www.php.net/distributions/php-7.0.0.tar.gz
Tar zxvf php-7.0.0.tar.gz
CD php-7.0.0
./configure \
--PREFIX=/USR/LOCAL/PHP7 \
--WITH-CONFIG-FILE-PATH=/USR/LOCAL/PHP7/ETC \
--ENABLE-FPM \
--WITH-FPM-USER=WWW \
--WITH-FPM-GROUP=WWW \
--WITH-MYSQLI=MYSQLND \
--WITH-PDO-MYSQL=MYSQLND \
--with-iconv-dir \
--with-freetype-dir=/usr/local/freetype \
--with-jpeg-dir-\
-with-png-dir \
--with-zlib \
--WITH-LIBXML-DIR=/USR \
--enable-xml \
--disable-rpath \
--enable-bcmath \
--ENABLE-SHMOP \
--enable-sysvsem \
--enable-inline-optimization \
--with-curl \
--enable-mbregex \
--enable-mbstring \
--with-mcrypt \
--ENABLE-FTP \
--WITH-GD \
--ENABLE-GD-NATIVE-TTF \
--WITH-OPENSSL \
--with-mhash \
--ENABLE-PCNTL \
--enable-sockets \
--WITH-XMLRPC \
--enable-zip \
--ENABLE-SOAP \
--with-gettext \
--disable-fileinfo \
--enable-opcache
Make zend_extra_libs= '-liconv '
Make install
CP Php.ini-production/usr/local/php7/etc/php.ini
Cd..
Compiling Redis extension support for installation PHP7
Wget-c Https://github.com/phpredis/phpredis/archive/php7.zip
Unzip Php7.zip
CD PHPREDIS-PHP7
/usr/local/php7/bin/phpize
./configure--with-php-config=/usr/local/php7/bin/php-config
Make
Make install
Cd..
/usr/local/php7/etc/php.ini
Added in
Extension=redis.so
Compile and install PHP7 Swoole
Wget-c https://github.com/swoole/swoole-src/archive/swoole-1.7.21-stable.tar.gz
Tar zxvf swoole-1.7.21-stable.tar.gz
CD swoole-src-swoole-1.7.21-stable/
/usr/local/php7/bin/phpize
./configure--with-php-config=/usr/local/php7/bin/php-config
Make
Make install
Cd..
/usr/local/php7/etc/php.ini
Added in
Extension=swoole.so