Menu

Memcached

Ram Kumar Kumaresan
Attachments
memcached.exe (86016 bytes)

Step by step instruction on how to install memcached servers in your machine:

In windows machine:

  • Download the attached memcached.exe to a folder, say "B:\Memcached".
  • Open "Command Prompt" as an administrator.
  • To start two instances of the server in two ports, execute:
    sc create "server1" binPath= "B:\Memcached\memcached.exe -d runservice -p 11211" DisplayName= "server1" start= auto
    sc create "server2" binPath= "B:\Memcached\memcached.exe -d runservice -p 11212" DisplayName= "server2" start= auto
  • Now to start the servers execute:
    sc start server1
    sc start server2
  • To remove the services:
    sc delete server1
    sc delete server2

In linux machine:
Method 1:

  • Execute: yum install memcached (This is for redhat and might vary for other linux distributions)
  • To verify installation execute: memcached -h
  • Run memcached server as daemon on port 11211: memcached -l 0.0.0.0 -p 11211 -d
  • Run memcached server as daemon on port 11212: memcached -l 0.0.0.0 -p 11212 -d
  • Verify the service: ps -e | grep memcached
    9600 ? 00:00:00 memcached
    9609 ? 00:00:00 memcached
  • Note: By default memcached uses 64MB of RAM for cache. To change this use "-u size_in_MB" when starting the server.

Method 2:
http://addmoremem.blogspot.com/2010/09/running-multiple-instances-of-memcached.html


Related

Wiki: Home

MongoDB Logo MongoDB