Laravel Installing Zend Opcache Accelerator Tutorial _php Instance

Source: Internet
Author: User
Take the article page, for example, through the chrome capture package, waiting time to 147ms, in fact, before the cache optimization, this page about 4 SQL statements, the speed is only about 152ms, the difference is not small, so I decided to install Zend Opcache accelerated PHP.

When I installed the Zend Opcache on the server, and then tested, waiting has dropped to 68ms, the effect is obvious.

It is also necessary to install such PHP accelerators for the So,laravel project.

Installation Tutorial:

The Zend Opcache (Zendoptimizerplus) project is currently hosted on GitHub and the project address is: Https://github.com/zendtech/ZendOptimizerPlus The installation steps are described in detail above, Let's just say it briefly:

1. Download

In the bottom right corner of the project page there is a download Zip button, click it can download and upload to the server, you can also right-click Copy link to the server through wget download. 2.unzip Unzip, enter directory

Copy the Code code as follows:
CD Zendoptimizerplus-master

3. Installation

Copy the Code code as follows:
$PHP _dir/bin/phpize
./configure--with-php-config= $PHP _dir/bin/php-config
Make && make install

Where $PHP _dir is your PHP installation directory, if you do not know, you can try

Copy the Code code as follows:
which PHP

Then ls-l get the path to find the PHP installation directory, generally if it is compiled through the source code, in/usr/local/php. It may also be installed through a third-party package manager, as long as you find Phpize and Php-config. When the compilation is complete, you get a hint:

Copy the Code code as follows:
Installing Shared extensions:/usr/local/php/lib/php/extensions/no-debug-non-zts-20100525/

This is to tell you the compiled extension. so file location, after we edit php.ini, this configuration file either in $php_dir/etc or in/usr/local/etc/or something, anyway open it, add at the end

Copy the Code code as follows:
[Zend Opcache]
opcache.memory_consumption=128
Opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
Opcache.revalidate_freq=60
Opcache.fast_shutdown=1
Opcache.enable_cli=1

Save exit, restart PHP-FPM or Apache.

The above is the whole content of this article, I hope you can enjoy.

  • 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.