Introduction and installation

1. What is Memcached

Memcached is a distributed in‑memory caching component, an independent third‑party caching tool that does not depend on any programming language. It is widely used for website performance optimization, storing frequently‑accessed data in memory to reduce database load.

Key features: pure in‑memory storage, key‑value structure, distributed architecture, no persistence (data is lost on power loss).

2. Installation Package Notes

Recommended download: memcached-win64-1.4.4-14.zip

Official site memcached – a distributed memory object caching system


Version Limitations
Versions prior to 1.4.5 (such as 1.4.4) support direct registration as a Windows system service.
Official releases 1.4.5 and above have removed the -d install service installation feature; you cannot use the service install commands shown below.

3. Windows Installation Steps

  1. Extract the archive to a path without Chinese characters or spaces (example: D:\memcached-win64-1.4.4-14)

Not recommended path: D:\Program Files\memcached (spaces present, often causes service registration failures)

  1. Right‑click Command Prompt → Run as administrator, use cd to switch to your extracted folder
D:
cd D:\memcached-win64-1.4.4-14Code language: CSS (css)
  1. Register as a Windows system service
memcached.exe -d installCode language: CSS (css)

4. Service Start‑Stop Commands

# Start service
memcached.exe -d start

# Stop service
memcached.exe -d stop

# Uninstall service (administrator CMD required)
memcached.exe -d uninstallCode language: CSS (css)

5. Common Basic Configuration Parameters (applied at startup)

ParameterDescription
-m 256Maximum memory in MB; default is 64MB
-p 11211Listening port; default 11211
-l 0.0.0.0Listen address; 127.0.0.1 local‑only, 0.0.0.0 allow LAN / external network access
-c 2048Maximum concurrent connections

Example installing service with custom parameters:

memcached.exe -d install -m 256 -l 0.0.0.0Code language: CSS (css)

Important Notes

  1. You must run CMD as administrator otherwise service installation will fail;
  2. Folder path must not contain Chinese characters or spaces;
  3. The original Windows build of Memcached is long discontinued by official maintainers. For production use, deploy on Linux;
  4. Default port 11211. Open firewall port for remote connections;
  5. Memcached provides no built‑in authentication. Exposing directly to public internet creates security risks.

7. Simple Connectivity Test

Use telnet to verify whether local service is running

telnet 127.0.0.1 11211Code language: CSS (css)

Once connected you can run set/get cache read‑write commands.

Introduction and installation

Leave a Reply

Your email address will not be published. Required fields are marked *