Installing Memcached on Windows 2020

Memcached is a neat program that allows us to keep information on memory.

What we need?

Memcached (It has the version 1.66)

NSSM - the Non-Sucking Service Manager (it is to install it as a service)

Installing

Uncompress the Memcached file in any folder.

Copy nssm.exe in the same folder.

And runs the next command line:

@echo off
echo removing the service (if it is already installed)
nssm remove memcached166 
echo and installing the service
nssm install memcached166 memcached.exe

It will install the service with the name "memcached166" (you can change the name).

You could also edit the service as

nssm edit memcached166

For example, you can change the service account, if it is initiated as a startup service and such.

If the service is not installed, then you can start it as

net start memcached166

Network

By default, memcached uses the port 11211

More configuration

It is the configuration of Memcached.

I tried to install it as a service using -d but it failed. However, it is possible to runs as service without -d

By default, it uses 64mb of ram. It could sound a little but it could help a lot. Memcached it is not mean to load "tons" of information, especially because the memory is volatile. But you can change it. If you already installed it as a service, then remember that you can edit the service (using nssm)

-p, --port=<num>          TCP port to listen on (default: 11211)
-U, --udp-port=<num>      UDP port to listen on (default: 0, off)
-s, --unix-socket=<file>  UNIX socket to listen on (disables network support)
-a, --unix-mask=<mask>    access mask for UNIX socket, in octal (default: 700)
-A, --enable-shutdown     enable ascii "shutdown" command
-l, --listen=<addr>       interface to listen on (default: INADDR_ANY)
                          if TLS/SSL is enabled, 'notls' prefix can be used to
                          disable for specific listeners (-l notls:<ip>:<port>)
-d, --daemon              run as a daemon
-m, --memory-limit=<num>  item memory in megabytes (default: 64)
-M, --disable-evictions   return error on memory exhausted instead of evicting
-c, --conn-limit=<num>    max simultaneous connections (default: 1024)

About Jorge Castro

Currently: Entrepreneur and Private Consultant
Civil Engineer in Informatics - USACH Chile.
Master in Business Administration (MBA) CEPADE Spain
Microsoft Certified Professional
Oracle Certified Associate
ScrumMaster Certified
Former developer
Former Project Manager

Related Posts