Linux下安装php加速软件Xcache
Nginx网站根目录:/usr/share/nginx/html
1、安装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 #安装
安装完成之后,出现下面的界面,记住以下路径,后面会用到。
/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/ #xcache模块路径
2、创建xcache缓存文件
touch /tmp/xcache #创建文件
chmod 777 /tmp/xcache #设置权限
3、创建xcache管理员密码为123456
echo -n "123456" | md5sum #记住类似下面一行代码(md5加密之后的密码),后面会用到
e10adc3949ba59abbe56e057f20f883e
4、拷贝xcache后台管理程序到网站根目录
cp -r /usr/local/src/xcache-3.2.0/htdocs /usr/share/nginx/html/xcache
5、配置php支持xcache
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 = "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、测试
service php-fpm restart #重启php-fpm
service nginx restart #重启nginx
浏览器打开网站根目录下面的xcache
输入用户名xcache 密码123456
下面是phpinfo的打印结果:
Linux下安装php加速软件Xcache的更多相关文章
- Linux下安装php加速组件XCache
这里选择的是稳定版本的1.2.2版本,2.0版本的不稳定.wget http://xcache.lighttpd.net/pub/Releases/1.2.2/xcache-1.2.2.tar.gzt ...
- CentOS7.2下安装php加速软件Xcache
说明: php安装目录:/usr/local/php php.ini配置文件路径:/usr/local/php/etc/php.ini Nginx安装目录:/usr/local/nginx Nginx ...
- linux下安装与删除软件
linux下安装与删除软件 (2005-07-04 11:24:10) 转载▼ 标签: 杂谈 分类: MSN搬家 现在linuxx下的软件大都是rpm,deb.tar.gz和tar.bz2格式.1.r ...
- Linux下安装McAfee防病毒软件(企业版本)
最近公司接一个项目虚拟化解决方案,不过所有硬件设备不是我们采购的,我们只是负责软体安装.我看了一下那个硬件设备那叫高,不过目前还到那边去安装,那边硬件还没安装完成,然后Boss给我拿来两台新服务器,让 ...
- 在Linux下安装R语言软件
安装环境: centos.R3.0.1 1.在终端下下载: #cd /usr/local/ #wget http://mirror.bjtu.edu.cn/cran/src/base/R-3/R-3. ...
- Linux下安装Redmine(项目管理软件)
前置条件需要安装 ruby,rubygems,rake,rails和mysql数据库. 安装Redmine 和 Ruby.Rails对应的版本: Redmine version Supported R ...
- Linux下安装系统清理软件 BleachBit 1.4
sudo add-apt-repository ppa:n-muench/programs-ppasudo apt-get updatesudo apt-get install bleachbit
- linux下安装SlickEdit
title: linux下安装SlickEdit tags: 软件 date: 2018-10-08 21:32:12 --- linux下安装SlickEdit 下载安装包和补丁文件 补丁文件 官方 ...
- Linux之Ubuntu下安装屏幕录像软件(SimpleScreenRecorder)【摘抄】
本博文全文属于摘抄自: (见文末处参考文献)(由于担心原博文丢失,以后查找不到,故此原文摘抄,以备日后多次查阅) 在日常工作中,有时需要对屏幕进行录像,以制作讲解文档等.下面介绍在Linux上安装屏幕 ...
随机推荐
- JavaScript笔记:变量及其作用域
一.变量的定义及声明 在javascript中变量仅仅是用来保存值的一个占位符而已,定义变量时要使用关键字var后跟一个变量名,如下所示: var message; //定义一个变量message,像 ...
- 使用Git命令上传本地项目
前提,安装git,使用cmd进入项目根目录. 初始化git init 再添加文件git add .git commit -m '项目名' 上传项目到Github仓库git remote add ori ...
- CString转string
如题,找了半天... //CString转string USES_CONVERSION; CString temp; temp = _T("kjdsaflkjdlfkj"); ch ...
- Android IOS WebRTC 音视频开发总结(八十一)-- WebRTC靠谱吗?有没有适合的SDK推荐?
作者:blaker,最早发表在我们的微信公众和[编风网],详见[这里] 支持原创,转载必须注明出处,欢迎关注我的微信公众号blacker(微信ID:blackerteam 或 webrtcorgcn) ...
- Leetcode5:Longest Palindromic Substring@Python
Given a string s, find the longest palindromic substring in s. You may assume that the maximum lengt ...
- DICOM图像像素值(灰度值)转换为CT值
CT值的单位是Hounsfield,简称为Hu,范围是-1024-3071.用于衡量人体组织对X射线的吸收率,设定水的吸收率为0Hu. 在DICOM图像读取的过程中,我们会发现图像的像素值有可能不是这 ...
- OpenCV Template Matching Subpixel Accuracy
OpenCV has function matchTemplate to easily do the template matching. But its accuracy can only reac ...
- 我个人结合到老师的来理解的——Asp.net Webform的页面生命周期
1.分析请求的资源路径,寻找目录中对应的资源文件,若无法找到资源文件,则返回404错误2.分析资源文件的Page命令,通过Page指令找到代码文件和类 3.将页面文件和类一起编译生成最终的类(仅仅在第 ...
- 聊聊python 2中的编码
为什么需要编码: 计算机可以存储和处理二进制,那么从文字到计算机可以识别的二进制之间需要对应的关系,于是便有了ASCII,ASSCII使用7位字符,由于1byte=8bit,所以最高位补一个0,使用8 ...
- TSP问题——动态规划
Traveling Salesman Problem Description: Time Limit: 4sec Memory Limit:256MB 有编号1到N的N个城市,问从1号城市出发, ...