Install php acceleration software Xcache in CentOS

Source: Internet
Author: User

Install php acceleration software Xcache in CentOS

Note:

Php installation directory:/usr/local/php

Php. ini configuration file path:/usr/local/php/etc/php. ini

Nginx installation directory:/usr/local/nginx

Nginx website root directory:/usr/local/nginx/html

1. Install xcache

Cd/usr/local/src # enter the package storage directory

Wget http://xcache.lighttpd.net/pub/releases/3.2.0/xcache-3.2.0.tar.gz#download

Tar zxvf xcache-3.2.0.tar.gz # Extract

Cd xcache-3.2.0 # enter the installation directory

/Usr/local/php/bin/phpize # Use phpize to generate the configure configuration file

./Configure -- enable-xcache-coverager -- enable-xcache-optimizer -- with-php-config =/usr/local/php/bin/php-config # Configuration

Make # compile

Make install # install

After the installation is complete, the following interface appears. Remember the following path, which will be used later.

/Usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/# xcache module path

2. Create an xcache cache file

Touch/tmp/xcache # create a file

Chmod 777/tmp/xcache # Set permissions

3. Create an xcache administrator password of 123456

Echo-n "123456" | md5sum # Remember the following line of code (the md5 encrypted password), which will be used later

E10adc3949ba59abbe56e057f20f883e

4. Copy the xcache background management program to the website root directory.

Cp-r/usr/local/src/xcache-3.2.0/htdocs/usr/local/nginx/html/xcache

Chown www. www-R/usr/local/nginx/html/xcache # Set the xcache directory with the same permissions as the website directory

System O & M www.osyunwei.com reminder: qihang01 original content©All rights reserved. For more information, see the source and original link.

5. Configure php to support xcache

Vi/usr/local/php/etc/php. ini # edit the configuration file and add the following content in the last line:

[Xcache-common]

Extension = xcache. so

[Xcache. admin]

Xcache. admin. enable_auth = On

Xcache. admin. user = "xcache"

Xcache. admin. pass = "e10adc3949ba59abbe56e057f20f883e"

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

: Wq! # Save and exit

6. Test

Service php-fpm restart # restart php-fpm

Service nginx restart # restart nginx

Open xcache under the root directory of the website in the browser

Enter the username xcache password 123456

The following page is displayed:

Now, the Xcache tutorial for installing php acceleration software in CentOS is complete.

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.