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 site 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 #解压
/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 install #安装
After the installation is complete, the following interface appears, remembering the following path, which is used later.
/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/#xcache模块路径
2. Create XCache cache files
Touch/tmp/xcache #创建文件
chmod 777/tmp/xcache #设置权限
3, create the XCache administrator password is 123456
Echo-n "123456" | md5sum #记住类似下面一行代码 (password after MD5 encrypted), will be used later
e10adc3949ba59abbe56e057f20f883e
4, copy xcache background management program to the 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 Yun-wei www.osyunwei.com warm reminder: qihang01 original Content © Copyright, reproduced please specify 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.admin.enable_auth = On
Xcache.admin.user = "XCache"
Xcache.admin.pass = "e10adc3949ba59abbe56e057f20f883e"
Xcache.shm_scheme = "Mmap"
Xcache.var_gc_interval =300
Xcache.readonly_protection = On
Xcache.mmap_path = "/tmp/xcache"
Xcache.coredump_directory = ""
Xcache.coveragedump_directory = ""
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 username XCache password 123456
You can see the following interface
At this point, Linux to install the PHP accelerated software xcache Tutorial completed