Install Xcache to accelerate php and AB stress testing results

Source: Internet
Author: User

Install Xcache to accelerate php and AB stress testing results

XCache is a fast and stable PHP opcode cache. it has been well tested and runs stably on high-traffic/high-load production machines. tested on linux and supports the latest versions of all current PHP branches, such as PHP_5_1 PHP_5_2 PHP_5_3 PHP_5_4. and perfectly supports thread security/Windows. it is better than similar opcode caches, for example, it can quickly follow up the PHP version.

Install Xcache and Memcached on the LAMP platform to accelerate website operation

LAMP-based AMP separation + XCache Acceleration

LAMP + Xcache environment setup

My php version is 5.6.6, so you need to install xcache3.2.0

Download: http://xcache.lighttpd.net/

Tar zxvf xcache-3.2.0.tar.gz

Cd xcache-3.2.0

/Usr/local/php/bin/phpize

./Configure -- enable-xcache -- with-php-config =/usr/local/php/bin/php-config

# Make install

Installing shared extensions:/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/

After the installation is complete, the xcache. so file is generated in the above path;

Add the php. ini file to the xcache code segment (the original file is/usr/local/src/xcache-3.2.0/xcache. ini)
 

# Vi/usr/local/php/etc/php. ini

[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 = 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 = ""

After saving and exiting, restart apache and check whether xcache information exists in php-v;

#/Usr/local/php/bin/php-v

PHP 5.6.6 (cli) (built: Jun 29 2015 17:23:08)

Copyright (c) 1997-2015 The PHP Group

Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies

With XCache v3.2.0, Copyright (c) 2005-2014, by mOo

With XCache Cacher v3.2.0, Copyright (c) 2005-2014, by mOo

Or in the phpinfo. php browser;

Xcache status query:

Create a cache file: touch/tmp/xcache

Copy the htdocs directory under the xcache3.2.0 directory to your own website directory. The custom directory is named xcache;

# Cp-r htdocs/data/www/blog/xcache/

Generate an md5 password, copy the password to the php. ini file xcache. admin. pass =.

# Echo-n '000000' | md5sum

E10adc3949ba59abbe56e057f20f883e

Access www.star.com/xcache/in the browser and enter the user name and password in the authentication box;

For more details, please continue to read the highlights on the next page:

  • 1
  • 2
  • Next Page

Related Article

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.