Compiling and installing PHP7

Source: Internet
Author: User
Tags fpm

#! /bin/bash# #编译安装 PHP7CD/root/soft | |mkdir/root/soft && cd/root/Softwgethttp//cn2.php.net/distributions/php-7.0.12.tar.gzTar-ZXVF php-7.0. A.Tar. GZCD php-7.0. A./configure--PREFIX=/USR/LOCAL/PHP7--sysconfdir=/usr/local/php7/etc--with-config-file-path=/usr/local/php7/etc--with-config-file-scan-dir=/USR/LOCAL/PHP7/ETC/PHP.D--enable-fpm--enable-mbstring--enable-Zip--enable-mysqlnd--with-iconv--with-zlib--enable-xml--with-curl--with-gd--with-openssl--with-mhash--enable-so Ckets--with-xmlrpc--enable-Zip--enable-soap--enable-opcache--with-pdo-mysql--enable-maintainer-Zts Make Clear Make&& Make Installmkdir/USR/LOCAL/PHP7/ETC/PHP.D-PCD/root/soft/php-7.0. A/sapi/FPMCPinit.d.php-fpm/etc/init.d/php7-FPMchmod+x/etc/init.d/php7-Fpmchkconfig--add php7-fpmchkconfig PHP7-FPM onCPphp-fpm.conf/usr/local/php7/etc/php-fpm.confCPwww.conf/usr/local/php7/etc/php-fpm.d/WWW.CONFCD/root/soft/php-7.0. ACPphp.ini-production/usr/local/php7/etc/php.iniCat>/usr/local/php7/etc/php.d/Ten-opcache.ini <<eoffzend_extension=opcache.soopcache.enable=1opcache.memory_consumption= -Opcache.interned_strings_buffer=8Opcache.max_accelerated_files=4000Opcache.blacklist_filename=/etc/php.d/opcache*. blacklisteoff# #redis ExtensionYum Install Unzip-y cd/root/Softwget-C https://Github.com/phpredis/phpredis/archive/php7.zipUnzipPhp7.ZipCD Phpredis-php7//usr/local/php7/bin/phpize./configure--with-php-config=/usr/local/php7/bin/php-Config Make Make InstallEcho "extension=redis.so">>/usr/local/php7/etc/php.d/ -. redis.ini###### #igbinary7扩展cd/root/SoftwgetHttps//Github.com/igbinary/igbinary7/archive/master.zipCD igbinary7-Master/usr/local/php7/bin/phpize./configure cflags="-o2-g"--enable-igbinary--with-php-config=/usr/local/php7/bin/php-ConfigEcho "extension=igbinary.so">>/usr/local/php7/etc/php.d/ -. Igbinary.iniEcho "session.serialize_handler=igbinary">>/usr/local/php7/etc/php.d/ -. igbinary.ini# #memcache扩展cd/root/SoftYum Install-Y libmemcached10-devel-1.0. --1. ius.centos6.x86_64 libmemcached10-1.0. --1. ius.centos6.x86_64wgetHttps//CODELOAD.GITHUB.COM/PHP-MEMCACHED-DEV/PHP-MEMCACHED/ZIP/PHP7Unzipphp7cd PHP-memcached-php7//usr/local/php7/bin/phpize./configure--with-php-config=/usr/local/php7/bin/php-config--enable-memcached-igbinary Make Make InstallEcho "extension=memcached.so">>/usr/local/php7/etc/php.d/ -. Memcached.ini

Compiling and installing PHP7

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.