Installing Opcache extensions under Linux
Reference: http://www.php.net/manual/zh/opcache.installation.php
| 1234567 |
wget http: //pecl .php.net /get/zendopcache-7 .0.2. tgz tar zxvf zendopcache-7.0.2.tgz Code class= "Shell functions" >cd zendopcache-7.0.2 /usr/local/php/bin/phpize /configure --with-php-config= /usr/local/php/bin/php-config make && make install ls /usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/ |
You can see the opcache.so library file
Add the following code to the php.ini
| 123456789 |
[zend Opcache] Code class= "Java plain" >zend_extension =/usr/local/php/lib/php/extensions/no-debug-non-zts- 20090626 /opcache.so opcache.memory_ consumption= 64 opcache.interned_strings_buffer= 8 opcache.max_accelerated_files= 4000 opcache.force_restart_timeout= 180 opcache.revalidate_freq= 60 opcache.fast_shutdown= 1 opcache.enable_cli= 1 |
For an introduction to the above Opcache options, please refer to: http://www.php.net/manual/zh/opcache.configuration.php
Restart PHP, via Phpinfo (); Commands to view
Installing Opcache extensions under Linux