Skip to content

Getting Started

LiteSpeed Memcached (“LSMCD”) is LiteSpeed's persistent memcache-compatible cache daemon. It’s performance and interface are similar to the popular Memcached, with the addition of high-availability replication with the option of separation of user's data. In LSMCD, cache data is persistent on both single and multiple box setups -- preserving all cache data through updates and instances of server failure.

This section describes the steps of downloading, compiling and installing LSMCD. Configuration is described in the Configuration section.


There are certain package requirements to compile and install LSMCD. LSMCD relies on these packages to work properly. The required packages differ slightly between distributions.

yum groupinstall "Development Tools"
yum install autoconf automake zlib-devel openssl-devel expat-devel pcre-devel libmemcached-devel cyrus-sasl*
sudo apt-get install git build-essential zlib1g-dev libexpat1-dev openssl libssl-dev libsasl2-dev libpcre3-dev -y


There are multiple ways to download LSMCD. Here a few options:

git clone
curl -O


If using wget or curl, be sure to extract the archive with the following command: unzip


To compile LSMCD, run the following commands from an elevated shell terminal:

cd lsmcd
./configure CFLAGS=" -O3" CXXFLAGS=" -O3"

LSMCD should now be built. If there were any errors please double check that all package requirements were installed. If package requirements were not the issue, please post on our forums for further assistance.


To install LSMCD after it has been compiled, run the following commands from the same elevated shell terminal:

sudo make install
sudo make install
sudo chown -R username /usr/local/lsmcd

LSMCD should now be installed.

Default Configuration

Most users will be able to test LSMCD with the default configuration stored in /usr/local/lsmcd/conf/node.conf. Detailed configuration is described here

Starting LSMCD

There are various different ways to start/stop LSMCD. Here are just a few ways:

  • systemd for automated start on system start and control using the systemctl command. This is the recommended method for regular operation.
  • init.d for older system control (though often you can still use systemctl to control init.d started services)
  • Manual starting for starting and stopping the task if you are not yet ready to run it as a service.
sudo systemctl start lsmcd
sudo systemctl stop lsmcd
sudo systemctl enable lsmcd
sudo systemctl disable lsmcd
sudo service lsmcd start
sudo service lsmcd stop
sudo chkconfig lsmcd on
sudo chkconfig lsmcd off
sudo /usr/local/lsmcd/bin/lsmcdctrl start
sudo /usr/local/lsmcd/bin/lsmcdctrl stop


A quick way to test if LSMCD is running is to run the following from shell:

telnet 11211


If you wish to remove LiteSpeed Memcached from your system for any reason, please execute the following list of commands:

sudo systemctl stop lsmcd
sudo systemctl disable lsmcd
sudo rm -rf /usr/local/lsmcd
sudo rm -rf /dev/shm/lsmcd
sudo rm -rf /tmp/lsmcd
sudo rm /tmp/lsmcd.log

Last update: October 27, 2021