Compile and install PHP7 and install the redis extension swoole extension
On the machine that compiles PHP7, there are already more than php5.3 versions installed, thus relying on the library has
This php7 is compiled into fpm-php use,
If it's Apache, then the compilation parameter should be
1 |
--with-apxs2=/usr/local/Apache/bin/apxs |
Compiling and installing PHP7
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
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 and installing PHP7 Redis extension support
123456789 |
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 Makemake install CD .. |
/usr/local/php7/etc/php.ini
Join in
Extension=redis.so
Compile and install PHP7 Swoole
12345678 |
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 Makemake install CD .. |
/usr/local/php7/etc/php.ini
Join in
Extension=swoole.so
This article source address: http://www.iamle.com/archives/1989.html
Compile and install PHP7 and install the redis extension swoole extension