Home > php教程 > php手册 > memcached启动和关闭的方法

memcached启动和关闭的方法

WBOY
Release: 2016-05-25 16:49:18
Original
2013 people have browsed it

memcached的启动与关闭方法很比较简单,下面我来介绍在linux系统中具体使用什么命令来启动或停止memcached吧,希望文章对各位会有所帮助。

1.启动memcached

# /usr/local/bin/memcached -d -m 2048  -u root -l 192.168.1.20 -p 12111 -c 1024 -P /tmp/memcached.pid

参数说明:

-d 启动为守护进程

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

-u 运行Memcached的用户,仅当作为root运行时

-l 监听的服务器IP地址,默认为环境变量INDRR_ANY的值

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

-c 设置最大并发连接数,默认为1024

-P 设置保存Memcached的pid文件,与-d选择同时使用

还有一些参数具体请参考:

# /usr/local/bin/memcached -h

2.结束memcached

# kill /tmp/memcached.pid
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template