search
Homephp教程php手册memcached启动和关闭的方法

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
Statement
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools