Linux Install PHP accelerator xcache
XCache is a fast and stable PHP Opcoolcode cache. Good testing and stable operation on large-flow/high-load production machines. Tested and supported on (on Linux) the latest release versions of all current PHP branches, such as Php_4_3 php_4_4 php_5_0 php_5_1 php_5_2 HEAD (6.x), and support for thread safety/windows. Better than similar opcoolcode buffers, such as the ability to quickly follow up on PHP versions. The following describes how to install the configuration.
1, installation XCache
- wget http://xcache.lighttpd.net/pub/Releases/1.3.2/xcache-1.3.2.tar.gz
- TAR-ZXVF xcache-1.3.2.tar.gz
- CD xcache-1.3.2
- Phpize
- ./configure--enable-xcache
- Make
- Make install
2, Configuration XCache
Open the php.ini file and add the following code:
- [Xcache-common]
- ; Change me-64 bit PHP =/usr/lib64/php/modules/xcache.so
- ; php = +/usr/lib/php/modules/xcache.so
- Zend_extension =/usr/lib64/php/modules/xcache.so
- [Xcache.admin]
- Xcache.admin.auth = On
- Xcache.admin.user = "MOo"
- ; Xcache.admin.pass = MD5 ($your _password)
- Xcache.admin.pass = ""
- [XCache]
- Xcache.shm_scheme = "Mmap"
- Xcache.size = 32M
- Xcache.count = 1
- Xcache.slots = 8K
- Xcache.ttl = 3600
- Xcache.gc_interval = 300
- ; Same as aboves but for variable cache
- ; If you don't know for sure so need this and you probably don ' t
- Xcache.var_size = 0M
- Xcache.var_count = 1
- Xcache.var_slots = 8K
- Xcache.var_ttl = 0
- Xcache.var_maxttl = 0
- Xcache.var_gc_interval = 300
- ; N/A For/dev/zero
- Xcache.readonly_protection = Off
- Xcache.mmap_path = "/dev/zero"
- Xcache.cacher = On
- Xcache.stat = On
Note Modify zend_extension =/usr/lib64/php/modules/xcache.so as the correct path.
Configuration instructions for details: Http://xcache.lighttpd.net/wiki/XcacheIni
Reprint please indicate the article source: "https://www.centos.bz/2011/10/linux-install-php-accelerator-xcache/"
Linux Install PHP accelerator xcache