XCache is an open source opcode cache/optimizer, which means that he can improve PHP performance on your server. By buffering data from the compiled PHP to shared memory to avoid duplication of compilation, he can increase speed by directly using the compiled code of the buffer. Typically, you can increase your page generation rate by 2 to 5 times times and also reduce server load.
First, download and install
cd/usr/local/src/
wget http://xcache.lighttpd.net/pub/Releases/2.0.1/xcache-2.0.1.tar.gz
TAR-ZXVF xcache-2.0.1.tar.gz
CD xcache-2.0.1
Export php_prefix= "/usr/local"
$PHP _prefix/php5/bin/phpize
./configure--enable-xcache-with-php-config= $PHP _prefix/php5/bin/php-config
Make && make install
Second, installation completed, call
Modify PHP.ini "such as DirectAdmin suphp mode installed in/usr/local/etc/php5/cgi"
Add the following to the Zend:
[Xcache-common]
Zend_extension =/usr/local/php5/lib/php/extensions/no-debug-non-zts-20090626/xcache.so
[Xcache.admin]
Xcache.admin.user = "Admin"
Xcache.admin.pass = ""
; Xcache.admin.pass = MD5 ($your _password)
Xcache.admin.enable_auth = On
[XCache]
Xcache.cacher = On
Xcache.size = 64M
Xcache.count = 1
Xcache.slots = 8K
Xcache.ttl = 3600
Xcache.gc_interval = 300
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
Xcache.readonly_protection = Off
Xcache.mmap_path = "/dev/zero"
Third, restart Apache
Service httpd Restart
There are two points to note here, mentioned below.
1th, when we modify the php.ini, we must put the content of XCache added to the top of the Zend;
2nd, I also tested the same process on the PHP5.2.17 version, unlike PHP5.3.25, the Extension_dir directory is
/usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613/