This article describes the Linux platform compiler installation PHP7 and installation of Redis extension and swoole extension methods. Share to everyone for your reference, specific as follows:
The previous PHP7 installation Redis extended Tutorial Linux and Windows platform tells readers how to install Redis in a simple way, let's implement a method of compiling and installing PHP7 in Linux and installing Redis extensions and Swoole extensions.
Compile installation PHP7 and install redis extension swoole extension:
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 is Apache then the compilation parameters 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/php
7/etc/php.ini CD ...
Compile Redis Extended Support for installation PHP7:
Wget-c https://github.com/phpredis/phpredis/archive/php7.zip
Unzip php7.zip
CD PHPREDIS-PHP7
Local/php7/bin/phpize
./configure--with-php-config=/usr/local/php7/bin/php-config make make
install
CD..
/usr/local/php7/etc/php.ini Add:
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 Add:
More about PHP Interested readers can view the site topics: "PHP Expanded Development course", "PHP object-oriented Program Design Introductory Course", "PHP Mathematical Calculation Skills Summary", "PHP Array" operation Skills Encyclopedia, "PHP Data structure and algorithm tutorial", " PHP Programming algorithm Summary, "PHP Regular Expression Usage summary" and "PHP common database Operation skill Summary"
I hope this article will help you with the PHP program design.