Install PHP acceleration software XCache under Linux

Source: Internet
Author: User
Tags fpm md5 encryption

Description

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, installation XCache

CD/USR/LOCAL/SRC #进入软件包存放目录

wget http://xcache.lighttpd.net/pub/Releases/3.2.0/xcache-3.2.0.tar.gz #下载

Tar zxvf xcache-3.2.0.tar.gz #解压

CD xcache-3.2.0 #进入安装目录

/usr/local/php/bin/phpize #用phpize生成configure配置文件

./configure--enable-xcache--enable-xcache-coverager--enable-xcache-optimizer--with-php-config=/usr/local/php/ Bin/php-config #配置

Make #编译

Make install #安装

After the installation is complete, the following interface appears, remembering the following paths, which are used later.

/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/#xcache模块路径

2. Create XCache Cache file

Touch/tmp/xcache #创建文件

chmod 777/tmp/xcache #设置权限

3. Create a XCache administrator password of 123456

Echo-n "123456" | md5sum #记住类似下面一行代码 (password after MD5 encryption), which will be used later

e10adc3949ba59abbe56e057f20f883e

4, copy the XCache daemon to the Web site 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 #设置xcache目录和网站目录权限相同

System operation and maintenance www.osyunwei.com warm reminder: qihang01 original content? Copyright, reproduced Please indicate the source and the original link

5. Configure PHP Support XCache

Vi/usr/local/php/etc/php.ini #编辑配置文件, add the following on 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=60m

Xcache.count =1

Xcache.slots =8k

Xcache.ttl=0

Xcache.gc_interval =0

xcache.var_size=64m

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

: wq! #保存退出

6. Testing

Service php-fpm Restart #重启php-fpm

Service Nginx Restart #重启nginx

The browser opens the XCache under the root directory of the Web site

Enter user name XCache password 123456

You can see the following interface

At this point, Linux installs the PHP acceleration software xcache tutorial completed.

Install PHP acceleration software XCache under Linux

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.