1、Linux安装Memcache : curl -O http://memcached.org/files/memcached-1.5.4.tar.gz 解压

2、启动Memcache: memcached -d -m 64 -p 11211 -u root , 关闭memcache : 查看其端口(netstat -lntp),kill 进程;

  参数详解:  

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

相关文章:

  • 2021-06-07
  • 2021-11-08
  • 2021-10-04
  • 2021-09-04
  • 2022-12-23
  • 2021-09-28
  • 2022-12-23
猜你喜欢
  • 2021-08-30
  • 2022-02-24
  • 2022-12-23
  • 2021-12-26
  • 2021-11-01
  • 2022-12-23
相关资源
相似解决方案