1. Installation
# Tar XF xcache-3.2.0.tar.bz2
# CD xcache-3.2.0
#/usr/local/php/bin/phpize
#./configure--enable-xcache--with-php-config=/usr/local/php/bin/php-config
# Make && make install
At the end of the installation, a line similar to the following appears:
Installing Shared extensions:/usr/local/php/lib/php/extensions/no-debug-zts-20100525/
2, edit php.ini, integrate PHP and XCache:
First, the sample configuration provided by XCache is imported into php.ini, and the Xcache.ini file is added to the end of the php.ini file;
One thing to note here is how VI can be copied and pasted in two files:
Edit two files simultaneously, copy the clip text in two files vi file1 file2 NYY Open two files at the same time, copy the line at the cursor of file 1: n Switch to File 2 (n=next) p Paste the copied line at the cursor of file 2: N switch back to file 1
Description: The Xcache.ini file is in the XCache source directory.
Next edit/opt/php/lib/php.ini,
Locate the line that begins with extension, and modify it to the following line:
# Vim/opt/php/lib/php.ini
Extension =/usr/local/php/lib/php/extensions/no-debug-non-zts-20100525/xcache.so
# Service PHP-FPM Restart
Open phpinfo.php to check the operating environment of PHP:
XCache Accelerating PHP