The PHP7 of Systemd trilogy

Source: Internet
Author: User
Tags phpinfo zend

Install the dependent packages required to compile PHP7:
Yum-y install libxml2 libxml2-devel OpenSSL openssl-devel curl-devel libjpeg-devel libpng-devel freetype-devel libmcrypt -devel systemd systemd-devel    (systemd for PHP support new SYSTEMD)
To Configure compilation options:
                            ./configure                            --prefix=/usr/local/php7.0.3                            --enable-opcache                            --enable-fpm                            --with-fpm-systemd \  (Enable Systemd)                           --enable-pdo                            --with-mysqli                            --with-pdo-mysql                            --enable-mysqlnd                            -- With-curl                            --with-jpeg-dir                            --with-png-dir                            --with-openssl                            --enable-zip                            
Compiling and installing
Make  -j  2 (Turn on 2 thread compilation)  &&  make  
Creating a configuration file
   CD    php-7.0.0rc7/   cp    php.ini-production    /usr/local/php/lib/php.ini       CP  /usr/local/ Php/etc/php-fpm.conf.default      /usr/local/php/etc/php-fpm.conf   CP  /usr/local/php/etc/php-fpm.d/ Www.conf.default      /usr/local/php/etc/php-fpm.d/www.conf
Add to SYSTEMD service
CP   /root/php-7.0.3/sapi/fpm/php-fpm.service   /etc/systemd/system/chmod +x/etc/systemd/system/ Php-fpm.service modify Php-fpm.service  ${prefix},${exec_prefix}  variable to/usr/local/php/   installation path Systemctl Start PHP-FPM  
enable Zend Opcache (PHP cache service) Add the configuration in the php.ini file:
        zend_extension=opcache.so        opcache.memory_consumption=128        //Allocate 128M memory         opcache.force_restart_timeout=         set time (seconds) to control cache file update speed.        Opcache.interned_strings_buffer=8        opcache.max_accelerated_files=4000        ; Turn off php file validation (maximum performance)        Opcache.validate_timestamps=off        ; Verify that php file timestamps are updated every 60 seconds        opcache.revalidate_freq=60        opcache.fast_ Shutdown=1        opcache.enable_cli=1        ; set non-cached blacklist        opcache.blacklist_filename= "/png/php/opcache_ Blacklist "        ; the default opcache is on, corresponding to the master value value under Zend Opcache in Phpinfo ().        Opcache.enable=off (OFF)

Check whether Zend Opcache is successfully turned on:

        /usr/local/phptest/bin/php-  v   output has with          Zend Opcache V7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies               Access phpinfo.php file  (),           Zend opcache information output: Zend logo This program makes use of the                  Zend Scrip Ting Language engine:          Zend engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies             with Zend Opcache V7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies                 has Zend opcache information block:            note  Cache hits (advanced cache hit, higher better) 4648                 Ca Che misses  (advanced cache misses) 142

Free to provide the latest Linux technology tutorials Books, for open-source technology enthusiasts to do more and better: http://www.linuxprobe.com/

The PHP7 of Systemd trilogy

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.