I. Environmental 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. Installing 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配置文件注: If you perform the above error, please install autoconf-2.13~]# tar ZXF autoconf-2.13 -c/usr/src/[[email protected] autoconf-2.13]#./configure && Make && make install
./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模块路径
Create a xcache cache file Touch/tmp/XCache #创建文件chmod777/tmp/XCache #设置权限创建xcache管理员密码为123456echo-N"123456"|md5sum #记住类似下面一行代码 (password after MD5 encryption), followed by e10adc3949ba59abbe56e057f20f883e copy xcache daemon to Web site root cp-r/usr/local/src/xcache-3.2.0/htdocs/usr/local/nginx/html/Xcachechown www.www-r/usr/local/nginx/html/XCache #设置xcache目录和网站目录权限相同系统运维 www.osyunwei.com Warm reminder: qihang01 original content? Copyright, reprint Please specify source and original link configuration php support Xcachevi/usr/local/php/etc/php.ini #编辑配置文件, add the following on the last line [XCache-common]extension=Xcache.so[xcache.admin]xcache.admin.enable_auth=Onxcache.admin.user="XCache"Xcache.admin.pass="e10adc3949ba59abbe56e057f20f883e"[Xcache]xcache.shm_scheme="mmap"xcache.size=60mxcache.count=1Xcache.slots=8kxcache.ttl=0Xcache.gc_interval=0xcache.var_size=64mxcache.var_count=1Xcache.var_slots=8kxcache.var_ttl=0Xcache.var_maxttl=0Xcache.var_gc_interval= -xcache.test=offxcache.readonly_protection=Onxcache.mmap_path="/tmp/xcache"xcache.coredump_directory=""Xcache.cacher=Onxcache.stat=Onxcache.optimizer=Off[xcache.coverager]xcache.coverager=onxcache.coveragedump_directory="": Wq!#保存退出测试service PHP-FPM Restart #重启php-fpmservice nginx Restart #重启nginx浏览器打开网站根目录下面的xcache输入用户名xcache password 123456
Install PHP accelerator XCache under Linux