PHP Assembly Eaccelerator

Source: Internet
Author: User
PHP installation Eaccelerator

Article Source: http://verydemo.com/demo_c116_i4224.html

Eaccelerator is a very good PHP accelerator, by caching the compiled PHP code files, so that PHP compiled to the server is almost zero overhead. The cost of eaccelerator itself is very small.

?

The latest PHP5.4.8 installation Eaccelerator,

Note that to install a high version, low compilation does not pass.

Official website: http://eaccelerator.net/

?

1. Download and install Eaccelerator

#wget Https://github.com/eaccelerator/eaccelerator/tarball/master

The latest version is eaccelerator-42067ac.tar.gz

#tar ZXVF eaccelerator-42067ac.tar.gz

Need phpize install PHP extension, if do not understand phpize can see this: http://blog.csdn.net/21aspnet/article/details/8193482

Note that you need to write a PHP installation path corresponding to the phpize below the Php-config is also

#? /usr/local/webserver/php/bin/phpize

You need to remember the generated hints below to configure PHP to use

/usr/local/webserver/php/lib/php/extensions/no-debug-non-zts-

20100525/

#./configure--enable-eaccelerator=shared--with-php-config=/usr/local/webserver/php/bin/php-config

# make

Note that to install a high version, low compilation does not pass.

# make Install

?

2. Configuring the php.ini configuration file

#这个是我机器的so位置
extension= "/usr/local/webserver/php/lib/php/extensions/no-debug-non-zts-20100525/eaccelerator.so"
#这个是设置一个缓存大小
Eaccelerator.shm_size= "64"
#缓存目录
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= "0"
eaccelerator.shm_prune_period= "0"
eaccelerator.shm_only= "0"
eaccelerator.compress= "1"
Eaccelerator.compress_level= "9"

?

Increase permissions

#mkdir/usr/local/webserver/eaccelerator_cache
#chmod 777/usr/local/webserver/eaccelerator_cache

?

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