1. Install Xcache
Copy the code The code is as follows:
# wget http://xcache.lighttpd.net/pub/Releases/1.3.0/xcache-1.3.0.tar.gz
# tar zxvf xcache-1.3.0.tar.gz
# cd xcache-1.3.0
# /usr/local/php/bin/phpize
# ./configure --enable-xcache--enable-xcache-coverager --enable-xcache-optimizer--with-php -config=/usr/local/php/bin/php-config
# make && make install
Note:
--enable-xcache means enabling Xcache support;
--enable-xcache-coverager means including additional features for measuring accelerator efficacy;
--enable-xcache-optimizer means enabling opcode optimization
After the installation is completed, the system will prompt the xcache.so module generation path. This time the generation path is /usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/, and then xcache.so Move to the /usr/local/php/include/php/ext directory.
2. Configuration Management In the program
# vi /usr/local/php/lib/php.ini
and then add the following content
Copy the code
The code is as follows: extension_dir=/usr/local/php/include/php/ext[xcache-common]
extension = xcache.so
[xcache.admin]
xcache.admin.enable_auth = Onxcache.admin.user = "xcache"
xcache.admin.pass = ""
[xcache]
xcache.shm_scheme ="mmap"
xcache.size=60M
xcache.count =1
xcache.slots =8K
xcache.ttl=0
xcache.gc_interval =0
xcache.var_size=4M
xcache.var_count =1
xcache.var_slots =8K
xcache.var_ttl=0
xcache.var_maxttl=0
xcache .var_gc_interval =300
xcache.test =Off
xcache.readonly_protection = On
xcache.mmap_path ="/tmp/xcache"
xcache.coredump_directory =""
xcache.cacher =On
xcache.stat=On
xcache.optimizer =Off
[xcache.coverager]
xcache.coverager =On
xcache.coveragedump_directory =""
2. Generate Xcache cache file
# touch /tmp/xcache
# chmod 777 /tmp/xcache
3. Generate the Xcache administrator’s secret (MD5 ciphertext)
# echo -n "123456" | md5sum
e10adc3949ba59abbe56e057f20f883eThen paste the MD5 ciphertext generated above Go to the xcache.admin.pass = "" option in the php.ini file, xcache.admin.pass = "e10adc3949ba59abbe56e057f20f883e"
4. Copy the Xcache management program to the root directory of the website
Copy the code
The code is as follows: # cp -a /tmp/xcache-1.3.0/admin/ /usr/local/nginx/html/
Then restart PHP, and then visit http://localhost/admin, The username is xcache and the password is 123456; in addition, you can also use phpinfo to verify whether PHP supports Xcache
http://www.bkjia.com/PHPjc/327637.html
www.bkjia.com
truehttp: //www.bkjia.com/PHPjc/327637.htmlTechArticle1. Install Xcache Copy the code as follows: # wget http://xcache.lighttpd.net/pub/Releases /1.3.0/xcache-1.3.0.tar.gz # tar zxvf xcache-1.3.0.tar.gz # cd xcache-1.3.0 # /usr/local...