Xcache-based configuration and usage

Source: Internet
Author: User
This article provides a detailed analysis of the configuration and use of xcache. For more information, see

This article provides a detailed analysis of the configuration and use of xcache. For more information, see

1. Install Xcache

The Code is as follows:

# Wget
# Tar zxvf xcache-1.3.0.tar.gz
# Cd xcache-1.3.0
#./Configure -- enable-xcache-coverager -- enable-xcache-optimizer -- with-php-config =/usr/local/php/bin/php-config
# Make & make install

-- Enable-xcache indicates that Xcache support is enabled;
-- Enable-xcache-coverager indicates additional features used to measure accelerator efficacy;
-- Enable-xcache-optimizer indicates that the operation code optimization is enabled.

After the installation is complete, the system prompts xcache. so module generated path, this generated path for/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.
Ii. configure and manage Xcache
1. Modify the php configuration file
During configuration, we can refer to the xcache configuration template xcache. ini, which is located in the Xcache installer.
# Vi/usr/local/php/lib/php. ini
Then add the following content:

The Code is as follows:

Extension_dir =/usr/local/php/include/php/ext
Extension = xcache. so

[Xcache. admin]

Xcache. admin. enable_auth = On
Xcache. admin. user = "xcache"
Xcache. admin. pass = ""

Xcache. shm_scheme = "mmap"
Xcache. size = 60 M
Xcache. count = 1
Xcache. slots = 8 K
Xcache. ttl = 0
Xcache. gc_interval = 0
Xcache. var_size = 4 M
Xcache. var_count = 1
Xcache. var_slots = 8 K
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 files
# Touch/tmp/xcache
# Chmod 777/tmp/xcache

3. Generate the Xcache administrator secret (MD5 ciphertext)
# Echo-n" 123456 "| md5sum
Then paste the generated MD5 ciphertext into the php. ini file xcache. admin. pass = "" option, U.S. server, xcache. admin. pass = "e10adc3949ba59abbe56e057f20f883e"

4. Copy the Xcache hypervisor to the root directory of the website.

The Code is as follows:

# Cp-a/tmp/xcache-1.3.0/admin // usr/local/nginx/html/

Then restart PHP and access it. The user name is xcache and the password is 123456. In addition, you can use phpinfo to verify whether PHP supports Xcache.

, Virtual host

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.