1. 下载 memcached-win32-1.4.4-14.zip,里面包含6个文件,将解压后的文件夹随便放在什么位置。如果需要win64版,下载 memcached-win64-1.4.4-14.zip,里面有个三个文件,用这三个文件覆盖win32下同名文件。

2. 以管理员身份运行 cmd.exe,并转至memcached所在文件夹,比如: cd c:\memcached 。(如果不以管理员身份运行,将得到报错“failed to install service or service already installed”)

3. 安装memcached:

  c:\memcached> memcached.exe -d install

  (之后屏幕无任何提示)

4. 启动memcached:

  c:\memcached> memcached.exe -d start

  (之后屏幕无任何提示,但是在“任务管理器”中勾选“显示所有用户进程”,此时可以看到memcached.exe进程正在运行)

  默认端口11211,外部访问需要开放该端口,否则无法成功连接。

5. 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 显示帮助

  设置参数时需要先停止memcached,然后用命令行设置,比如:c:\memcached> memcached.exe -m 1 -d start

6. 停止memcached:

  c:\memcached> memcached.exe -d stop

7. 卸载memcached:

  c:\memcached> memcached.exe -d uninstall

相关问题:

1. 设置最大占用内存后好像没起作用。

  -m tells memcached how much RAM to use for item storage (in megabytes). Note carefully that this isn't a global memory limit, so memcached will use a few % more memory than you tell it to. Set this to safe values. Setting it to less than 48 megabytes does not work properly in 1.4.x and earlier. It will still use the memory.

  转自:http://stackoverflow.com/questions/6112324/memcached-using-more-than-max-memory

  参考:https://code.google.com/p/memcached/wiki/NewConfiguringServer

2. 在同一个程序集里将一个值放入到memcache里,马上去时可以取到,但是在另一个程序集里取的时候取不到,或者telnet也拿不到值。

 可能问题及解决办法:

a. 存储的值序列化后不同类型,则需要将其更新为同一类型,建议使用同一的常见类型,如string,int等,放入string可以拼成一个xml字符串,然后到使用的时候在做解析

b. 很有可能是memcache池已经满了,可以设置<socketPool minPoolSize="100" maxPoolSize="1000" connectionTimeout="00:10:00" deadTimeout="00:02:00"/>

win7 安装 memcached的更多相关文章

  1. win7安装memcached

    根据公司业务需求,需要用memcache缓存,正好接触一下,在win7下配置安装: 1. 下载memcache的windows稳定版,解压放某个盘下面,比如在c:\memcached 2. 在终端(也 ...

  2. win7下安装memcached

    memcached server端服务在win7下的安装.启动图解 1.首先下载解压memcached-1.2.6-win32-bin.zip到某一盘下,如下图 2.通过管理员方式运行cmd.exe. ...

  3. win7下安装memcached出现failed to install service or service already installed解决办法

    安装memcached时总是提示“failed to install service or service already installed”,开始以为是版本问题,就下了好几个不同版本,可还是老问题 ...

  4. 在Windows下安装Memcached

    Windows下的Memcache安装: 需要运行命令行工具cmd 请以管理员权限运行 开始->附件->命令提示符,以管理员身份运行 假如当前C:\windows\system32,输入c ...

  5. Linux下安装memcached图文版

    所用到的工具: putty小软件  可以远程连接主机的小软件     然后在屏幕上输入用户名root  密码:******即可连接 由于安装这两个工具需要编译所以:第一步要进行安装编译: 习惯于将下载 ...

  6. Wamp下安装Memcached

    最近的项目要用到memcache,所以要在本地安装,安装过程中很遇到一些问题,在这里记录下. 我使用的是wamp集成环境,各个版本如下: WampServer Version 2.2 Apache V ...

  7. win7安装时,避免产生100m系统保留分区的办法

    在通过光盘或者U盘安装Win7操作系统时,在对新硬盘进行分区时,会自动产生100m的系统保留分区.对于有洁癖的人来说,这个不可见又删不掉的分区是个苦恼.下面介绍通过diskpart消灭保留分区的办法: ...

  8. NoSql1 在Linux(CentOS)上安装memcached及使用

    前言:       今天是初五,生活基本要从过年的节奏中回归到正常的生活了,所以想想也该想想与工作有关的事情了.我之前在工作中会经常使用memcached和redis,但是自己一直没有时间系统的好好看 ...

  9. Linux 服务器 安装 memcached

    linux centos 一.memcached的安装 1.下载 memcached-1.4.33.tar.gz.libevent-2.0.22-stable.tar.gz 安装 memcached ...

随机推荐

  1. Codeforces Round #228 (Div. 2) A. Fox and Number Game

    #include <iostream> #include <algorithm> #include <vector> #include <numeric> ...

  2. ACM: POJ 3259 Wormholes - SPFA负环判定

     POJ 3259 Wormholes Time Limit:2000MS     Memory Limit:65536KB     64bit IO Format:%lld & %llu   ...

  3. 二 、打开地图《苹果iOS实例编程入门教程》

    该app为应用的功能为给你的iPhone打开google地图有效地址连接 现版本 SDK 8.4 Xcode 运行Xcode 选择 Create a new Xcode project ->Si ...

  4. The Bus Driver Problem

    题目连接:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=90648#problem/G 题意: 给每位司机分配一个白天和晚上的行车路线, ...

  5. 基于canvas的前端图片压缩

    /*common*/ /** * canvas图片压缩 * @param {[Object]} opt [配置参数] * @param {[Function]} cbk [回调函数] * @retur ...

  6. 无法在提交表单前通过ajax验证解决办法

    博主在一个小项目中,要实现注册表单无刷新验证用户名或密码,但是发现不管怎么样都无法在先通过ajax验证之前不提交表单. 例如:一个简单的验证函数 function check(){ $.post(&q ...

  7. 安装redis,执行make test时遇到You need tcl 8.5 or newer in order to run the Redis test

    安装他yum install tcl

  8. 汇编基础知识之二debug的使用

    DEBUG的使用 (要在win32位习题下进行,win7 64位需要安装DosBox和debug这2个软件): 1:win64位下debug的使用教程: 下载debug.exe,这里我把debug放在 ...

  9. 【HDU3721】枚举+最长路

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3721 题意:给你一颗n个节点n-1条边的树,每条边都有一个权值,现在让你任意移动一条边然后把这条边连接 ...

  10. Mariadb 10.1 joiner节点加入报错WSREP: Failed to prepare for incremental state transfer

    Mariadb 10.1 galera cluster 集群joiner 节点加入集群 会出现这种报错,导致mysql一直点点点,这里我贴出报错.2016年04月19日13:34:58 2016-04 ...