Laravel Installation Zend Opcache Accelerator tutorial

Source: Internet
Author: User
Tags zend

Take the article page for example, through the chrome grab package, waiting time to reach 147ms, in fact, before caching optimization, this page has 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, after testing, waiting has dropped to 68ms, the effect is obvious.

It is also necessary to install this type of PHP Accelerator for the So,laravel project.

Attached installation Tutorial:

The Zend Opcache (Zendoptimizerplus) project is currently hosted at GitHub, the project address is: Https://github.com/zendtech/ZendOptimizerPlus The installation steps are described in detail above, Here's a simple point:

1. Download

In the lower right corner of the project page there is a download Zip button, click it to download and upload to the server, you can also copy the link right, to the server through the wget download. 2.unzip decompression, access to directory

The

code is as follows:


CD Zendoptimizerplus-master

3. Installation

The

code is 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

The

code is as follows:


which PHP

Then ls-l get the path to find the installation directory of PHP, generally if it is compiled by 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:

The

code is as follows:


Installing shared extensions:/usr/local/php/lib/php/extensions/no-debug-non-zts-20100525/

This is to tell you to compile the extension. so file location, and then we edit php.ini, this configuration file either in $php_dir/etc or in/usr/local/etc/and so on, in short, open it, add at the end

The

code is 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 entire 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.