安装python-memached

    安装python-memached   

$brew install memcached

 安装python-memached

 $pip install python-memcached

   启动memcached

$/usr/bin/memcached -d -m 64 -p 12333 -u memcache -l 127.0.0.1

  启动参数说明:

  -d 选项是启动一个守护进程

  -m 是分配给Memcache使用的内存数量,单位是MB,默认64MB

  -M return error on memory exhausted (rather than removing items)

  -u 是运行Memcache的用户,如果当前为root 的话,需要使用此参数指定用户

  -l 是监听的服务器IP地址,默认为所有网卡

  -p 是设置Memcache的TCP监听的端口,最好是1024以上的端口

  -c 选项是最大运行的并发连接数,默认是1024

  -P 是设置保存Memcache的pid文件

猜你喜欢

转载自jatter.iteye.com/blog/2312752