Compiling/Installing LSMCD

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. In LSMCD, cache data is persistent on both single and multiple box setups -- preserving all cache data through updates and instances of server failure.

Requirements

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.

CentOS/RHEL

Run the following commands from an elevated shell terminal:

yum groupinstall "Development Tools"
yum install autoconf automake zlib-devel openssl-devel expat-devel pcre-devel libmemcached-devel cyrus-sasl*

Debian/Ubuntu

Run the following commands from an elevated shell terminal:

sudo apt-get install build-essential zlib1g-dev libexpat1-dev openssl libssl-dev libsasl2-dev libpcre3-dev -y

Download

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

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

Compile

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

cd lsmcd
./fixtimestamp.sh
./configure CFLAGS=" -O3" CXXFLAGS=" -O3"
make

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.

Install

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

Centos / RHEL

make install

Debian/Ubuntu

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

LSMCD should now be installed.

Now you will have to edit /usr/local/lsmcd/conf/node.conf to correctly set the IP address to bind.

This is an example conf file for 127.0.0.1:11211

Repl.HeartBeatReq=30
Repl.HeartBeatRetry=3000
Repl.MaxTidPacket=2048000
Repl.GzipStream=YES
Repl.LbAddrs=127.0.0.1:1234
Repl.ListenSvrAddr=127.0.0.1:1234
Repl.DispatchAddr=127.0.0.1:5501
Cached.Addr=127.0.0.1:11211
Cached.PriAddr=127.0.0.1:11000
Cached.Slices=8
Cached.Slice.Priority.0=100
Cached.Slice.Priority.1=100
Cached.Slice.Priority.2=100
Cached.Slice.Priority.3=100
Cached.Slice.Priority.4=100
Cached.Slice.Priority.5=100
Cached.Slice.Priority.6=100
Cached.Slice.Priority.7=100
Cached.ShmDir=/dev/shm/lsmcd
User=nobody
Group=nobody
CachedProcCnt=4
RepldSockPath=/tmp/repld.usock
CachedSockPath=/tmp/cached.usock.
TmpDir=/tmp/lsmcd
LogLevel=error
#LogLevel=dbg_medium
LogFile=/tmp/lsmcd.log

Add this line into conf if you wish to use SASL

CACHED.USESASL=TRUE

Start

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

Systemd

systemctl start lsmcd
systemctl stop lsmcd
systemctl enable lsmcd
systemctl disable lsmcd

init.d

service lsmcd start
service lsmcd stop
chkconfig lsmcd on
chkconfig lsmcd off

Manual

/usr/local/lsmcd/bin/lsmcdctrl start
/usr/local/lsmcd/bin/lsmcdctrl stop

Test

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

telnet 127.0.0.1 11211

Be sure to look into configuring it next!

 
litespeed_wiki/lsmcd/installation.txt · Last modified: 2018/05/22 19:59 by Robert Perper