Installing Memcached on Debian 7.5

The development server caters for the hosting of in-memory object-caching during the development of web-based applications intended to speed up dynamic web applications by alleviating database load.

Installing Memcached

We install the required packages by executing the following command in a “root” shell.

apt-get install memcached

Configuring Memcached

The configuration of Memcached is defined in the /etc/memcached.conf file. It is recommended to stop the daemon before making any configuration changes.

To stop the daemon, we stop the memcached service by executing the following command in a “root” shell.

service memcached stop

memory size

-m 64

By default, Memcached will use up to a maximum size of 64 MB of memory. By setting the value of -m, Memcached can use a different amount of maximum memory.

port

-p 11211

By default, Memcached listens on port 11211 for connections. By setting the value of -p, Memcached can listen on a different port for connections.

address

-l 127.0.0.1

By default, Memcached binds to the localhost IP address. By specifying an IP address for -l, Memcached will bind to that specific address.

To start the daemon, we start the memcached service by executing the following command in a “root” shell.

service memcached start
Advertisements

One thought on “Installing Memcached on Debian 7.5

Comments are closed.