In 2011, Good VPS Gathering once shared a one-click package for installing eAccelerator Zend ioncube on DA. However, after such a long time, this package is no longer suitable for the current environment. For the latest version of DA panel installation, I recommend that you choose to install Zend and ioncube together during custom installation. As for eAccelerator, I have seen many foreign hosting companies do not install it, so I recommend...not to install it. (Of course, you can also compile and install it).
XCache is also a free PHP accelerator. Today, we mainly share how to install XCache on DA.
First of all, let me talk about the premise. The component versions compiled by my DA are: Apache2.2, PHP5.3.25, MySQL5.5, CGI mode.
Currently, the latest version of XCache is 3.0.1. We install XCache on DA. The following is the compilation process:
1 2 3 4 5 6 7 8 |
cd /usr/local/src/ wget http://xcache.lighttpd.net/pub/Releases/3.0.1/xcache-3.0.1.tar.gz tar -zxvf xcache-3.0.1 .tar.gz cd xcache-3.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 |
After compilation is completed, we modify the php.ini file and add XCache. Please add the following code above Zend.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
[xcache-common] extension_dir = "/usr/local/php5/lib/php/extensions/no-debug-non-zts-20090626/" extension = 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" |
Once completed, restart Apache.
service httpd restart
Check whether compilation and loading are successful.
php –v
There are two points to note, which are mentioned here.
The first point is that when we modify php.ini, we must put the content added by XCache on top of Zend;
The second point is that I have also tested the same process on PHP5.2.17 version. Different from PHP5.3.25, the extension_dir directory is
/usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613/