Linux platform Compile install PHP7 and install Redis extension and Swoole extended instance Tutorials _php Tips

Source: Internet
Author: User
Tags fpm php programming php regular expression redis install redis

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:

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 Add:

Extension=swoole.so

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.