Compiling and installing Eaccelerator on Linux systems

Source: Internet
Author: User
Tags sessions zts zend

Eaccelerator is a free open source PHP accelerator, optimized and dynamic content caching, improving the caching performance of PHP scripts, so that PHP scripts in the compiled state, the cost of the server almost completely eliminated. It also has the effect of optimizing the script to speed up its execution efficiency. Make your PHP program code 1-10 times more efficient to practice.

Download Underground: wget http://soft.vpser.net/web/eaccelerator/eaccelerator-eaccelerator-42067ac.tar.gz
or download http://eaccelerator.net from the official website

Compiling and installing Eaccelerator on Linux systems

Tar jxvf eaccelerator-0.9.6.1.tar.bz2
CD EACCELERATOR-0.9.6.1/
/usr/local/webserver/php/bin/phpize
./configure–enable-eaccelerator=shared \–with-php-config=/usr/local/webserver/php/bin/php-config
Make && make install && CD.

Touch/etc/php5/fpm/conf.d/eaccelerator.ini
Add the following lines to the file:
; Configuration for PHP eaccelerator module
Extension=eaccelerator.so
Eaccelerator.allowed_admin_path = "/home/eboss/website"

[Eaccelerator] Eaccelerator.allowed_admin_path =
"/data/wsdata/wwwroot"
zend_extension= "/usr/local/webserver/php/lib/php/extensions/no-debug-non-zts-20060613/eaccelerator.so"
Eaccelerator.shm_size= "8"
Eaccelerator.cache_dir= "/usr/local/webserver/eaccelerator_cache"
eaccelerator.enable= "1" eaccelerator.optimizer= "1"
Eaccelerator.check_mtime= "1" eaccelerator.debug= "0"
Eaccelerator.filter= "" eaccelerator.shm_max= "0"
Eaccelerator.shm_ttl= "3600" eaccelerator.shm_prune_period= "3600"
eaccelerator.shm_only= "0" eaccelerator.compress= "1"
Eaccelerator.compress_level= "9" Eaccelerator.keys = "Disk_only"
Eaccelerator.sessions = "Disk_only" eaccelerator.content = "Disk_only"

Eaccelerator.allowed_admin_path = "/data/wsdata/wwwroot"
Eaccelerator the address of the Control Panel, The installation package has a control.php file, copy it to any directory of the site, you can use it to view and manage, this must be specified, otherwise when viewing the cache content error, access time Default user name is: admin, Password: eaccelerator

zend_extension= "/usr/local/webserver/php/lib/php/extensions/no-debug-non-zts-20060613/eaccelerator.so"
PHP should be based on the Zend engine, extension is based on the PHP engine extension, zend_extension meaning Zend engine-based extension

Eaccelerator.shm_size= "8"
The amount of shared memory that Eaccelerator can use (in megabytes). "0" refers to the default value of the operating system, the default value is "0", according to the actual situation of the server to adjust: 16, 32, 64, 128 are OK.

Eaccelerator.cache_dir= "/usr/local/webserver/eaccelerator_cache"
This directory is used for disk caching, where Eaccelerator stores pre-compiled code, process data, content, and user-defined content. The same data can also be stored in shared memory (which can improve access speed)

eaccelerator.enable= "1"
Turn eaccelerator on or off, "1" is on, "0" is off. The default value is "1".

Eaccelerator.optimizer= "1"
Power on or off the internal optimizer to increase code execution speed. "1" is on, "0" is off. The default value is "1".

Eaccelerator.check_mtime= "1" s
Open or close PHP file modification Check, "1" refers to open, "0" refers to the shutdown. The default value is "1".

eaccelerator.debug= "0"
Turn debug logging on or off. "1" is on, "0" is off. The default value is "0". Records are written to the log when the cache is hit.

Eaccelerator.filter= ""
Determine which PHP files must be cached. You can specify cached and non-cached file types (such as ". php . phtml", etc.) if the parameter starts with "!", the file that matches these parameters is ignored by the cache. The default value is "", that is, all PHP files will be cached.

eaccelerator.shm_max= "0"
When you use the "eaccelerator_put ()" function, it is forbidden to store too large files in shared memory. This parameter specifies the maximum value that is allowed to be stored in bytes (10240, 10K, 1M). "0" is not limited. The default value is "0".

Eaccelerator.shm_ttl= "3600"
When Eaccelerator gets the shared memory size of a new script fails, it removes all script caches that were not accessed in the last "Shm_ttl" seconds from shared memory. The default value is "0", to remove any cache files from shared memory.

eaccelerator.shm_prune_period= "3600"
When Eaccelerator gets the shared memory size of a new script fails, he tries to remove the cache script that is older than "shm_prune_period" seconds from shared memory. The default value is "0", to remove any cache files from shared memory.

eaccelerator.shm_only= "0"
Allows or disables the caching of compiled scripts on disk. This option is not valid for session data and content caching. The default value is "0", which is used to cache disk and shared memory.

eaccelerator.compress= "1"
Allows or disables the compression of the content cache. The default value is "1", which allows compression.

Eaccelerator.compress_level= "9"
Specifies the compression level of the content cache. The default value is "9", which is the highest level.

Eaccelerator.keys = "Disk_only"
Eaccelerator.sessions = "Disk_only"
Eaccelerator.content = "Disk_only"
Set where the content cache is stored, which can be set to:
Shm_and_disk in shared cache and hard disk (default value)
SHM shared memory By default, if the shared memory is full or the size exceeds the value of "Eaccelerator.shm_max", it will be saved to the hard disk
shm_only only stored in shared memory
Disk_only is only stored on the hard drive
None does not cache data

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Compiling and installing Eaccelerator on Linux systems

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.