Tutorial on compiling and installing PHP7 and installing Redis extensions on linux platform
This article introduces the "linux platform compilation and installation of PHP7 and install Redis extension tutorial" related knowledge, in the actual case of the operation process, many people will encounter such a dilemma, then let the editor lead you to learn how to deal with these situations! I hope you can read it carefully and be able to achieve something!
Compile and install PHP7 and install the Redis extension Swoole extension:
There are already compiled and installed versions of php5.3 and above on the machine that compiled php7, so there are all dependent libraries.
This php7 is compiled to fpm-php, if it is apache, then the compilation 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.gztar zxvf php-7.0.0.tar.gzcd 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-opcachemake ZEND_EXTRA_LIBS='-liconv'make installcp php.ini-production / usr/local/php7/etc/php.inicd..
Redis extension support for compiling and installing php7:
Wget-c https://github.com/phpredis/phpredis/archive/php7.zipunzip php7.zipcd phpredis-php7/usr/local/php7/bin/phpize./configure-- with-php-config=/usr/local/php7/bin/php-configmakemake installcd..
/ usr/local/php7/etc/php.ini to add:
Extension=redis.so
Compile and install swoole for php7
Wget-c https://github.com/swoole/swoole-src/archive/swoole-1.7.21-stable.tar.gztar zxvf swoole-1.7.21-stable.tar.gzcd swoole-src-swoole-1.7.21-stable//usr/local/php7/bin/phpize./configure-- with-php-config=/usr/local/php7/bin/php-configmakemake installcd..
/ usr/local/php7/etc/php.ini to add:
This is the end of extension=swoole.so 's "tutorial on compiling and installing PHP7 and installing Redis extensions on linux platform". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!