Xcache accelerates php and xcachephp
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 installation, the following lines will appear:
Installing shared extensions:/usr/local/php/lib/php/extensions/no-debug-zts-20100525/
2. Edit php. ini and integrate php and xcache:
First, import the sample configuration provided by xcache to php. ini, and add the xcache. ini file to the end of the php. ini file;
Note how to copy and paste a vi file:
Edit the two files at the same time, copy and paste the text vi file1 file2 nyy in the two files, open the two files at the same time, and copy the row where the cursor of file 1 is located: n switch to file 2 (n = next) p paste the copied row at the cursor of file 2: N switch back to file 1
Note: The xcache. ini file is in the xcache source code directory.
Next, edit/opt/php/lib/php. ini,
Find the row starting with extension and change it to the following row:
# 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 php runtime environment: