Use and configuration of XCache

Source: Internet
Author: User

First, install the XCache

# 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 enable xcache support;

The--enable-xcache-coverager represents an additional feature for measuring the efficacy of the accelerator;

--enable-xcache-optimizer means that opcode optimization is enabled

After installation, the system will prompt xcache.so module generation path, this generation path is/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/, and then move xcache.so to/ The Usr/local/php/include/php/ext directory.  Second, configuration management Xcache1, modify the PHP configuration file configuration, we can refer to XCache configuration template Xcache.ini, this file is located in the XCache Setup program # Vi/usr/local/php/lib/php.ini Then add the following content Extension_dir=/usr/local/php/include/php/ext
[Xcache-common]
Extension = xcache.so

[Xcache.admin]

Xcache.admin.enable_auth = On
Xcache.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/xcache3, generate XCache Administrator's Secret (MD5 ciphertext) # Echo-n "123456" | md5sume10adc3949ba59abbe56e057f20f883e then paste the generated MD5 ciphertext into the php.ini file Xcache.admin.pass = "" option, xcache.admin.pass= " e10adc3949ba59abbe56e057f20f883e "4, copy XCache management program to the Web site root directory
# cp-a/tmp/xcache-1.3.0/admin//usr/local/nginx/html/then restart PHP and then Access http://localhost/admin, username xcache password is 123456; , you can also use Phpinfo to verify that PHP supports XCache

Use and configuration of XCache

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.