Ubuntu install memcached from source


Following are steps to install memcached from source:

  • Download latest version of memcached from http://memcached.org, uncompress it and enter into uncompressed directory.
  • Install dependencies make and libevent-dev with apt-get.
$ apt-get install libevent-dev make
  • After installation is completed run following commands:
$ ./configure

$ make

$ make install

This will complete installation of memcached.

Above installation will install will copy memcached executable file in path ”

Now create an alias of memcahed executable in /usr/bin with following command:

$ ln -s /usr/local/memcached/bin/memcached /usr/bin/memcached

Start memcached in localhost

$ memcached -u root -d -m 1024 -p 11211 -l localhost

Above command will start memcached with 1GB memory on port 11211.

To check memcached stats use following command:

$ echo "stats" | nc localhost 11211

It will display some stats related to memcached.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s