window下memcache的安装

Windows下Memcached安装指南
本文详细介绍如何在Windows环境下安装Memcached缓存系统。步骤包括下载解压、命令行安装服务及启动服务等。此外还提供了Memcached的基本配置选项及环境测试方法。

window下装 memcache,怎么装呢,参阅:http://jehiah.cz/projects/memcached-win32/

1. Unzip the binaries in your desired directory (eg. c:/memcached)

2. Install the service using the command: 'c:/memcached/memcached.exe -d install' from either the command line

3. Start the server from the Microsoft Management Console or by running the following command: 'c:/memcached/memcached.exe -d start'

4. Use the server, by default listening to port 11211

简单翻译如下:

1、下载memcached 1.2.1 for Win32 binaries,并解压缩

2、打开命令行窗口【win+R 输入cmd 确定】,并进入解压的文件夹目录

3、输入memcached.exe-d install 安装服务

4、输入memcached.exe-dstart 启动服务l

keyword:window memcache 安装

memcached官网:http://memcached.org/

memcached的基本设置

-p 监听的端口
-l 连接的IP地址, 默认是本机
-d start 启动memcached服务
-d restart 重起memcached服务
-d stop|shutdown 关闭正在运行的memcached服务
-d install 安装memcached服务
-d uninstall 卸载memcached服务
-u 以的身份运行 (仅在以root运行的时候有效)
-m 最大内存使用,单位MB。默认64MB
-M 内存耗尽时返回错误,而不是删除项
-c 最大同时连接数,默认是1024
-f 块大小增长因子,默认是1.25
-n 最小分配空间,key+value+flags默认是48
-h 显示帮助

Memcache环境测试
运行下面的php文件,如果有输出This is a test!,就表示环境搭建成功。开始领略Memcache的魅力把!
< ?php
$mem = new Memcache;
$mem->connect(”127.0.0.1″, 11211);
$mem->set(’key’, ‘This is a test!’, 0, 60);
$val = $mem->get(’key’);
echo $val;
?>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值