Introducing Dragonfly Cloud! Learn More

Question: How to start Memcached?


To start Memcached, you need to have it installed on your system. Once installed, you can start it with the following steps:

  1. Open a terminal or command prompt.
  2. Type the following command to start Memcached:

By default, this will start Memcached on port 11211 and with a cache size of 64MB.

You can also specify options when starting Memcached. For example, to start Memcached with a larger cache size of 128MB and on a different port, use the following command:

memcached -m 128 -p 11212

In this example, -m specifies the cache size in megabytes, and -p specifies the port number.

If you want to run Memcached as a background process, you can add the -d option like this:

memcached -d

This will start Memcached in daemon mode.

Once Memcached is running, you can then connect to it using a Memcached client library from your programming language of choice.

That's it! You now know how to start Memcached on your system.

Was this content helpful?

White Paper

Free System Design on AWS E-Book

Download this early release of O'Reilly's latest cloud infrastructure e-book: System Design on AWS.

Free System Design on AWS E-Book

Start building today 

Dragonfly is fully compatible with the Redis ecosystem and requires no code changes to implement.