Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
litespeed_wiki:lsmcd:installation [2017/08/24 15:11]
Eric Leu [How to fix errors]
litespeed_wiki:lsmcd:installation [2019/11/27 14:34] (current)
Robert Perper [Centos / RHEL]
Line 1: Line 1:
-====== ​Installation ​======+====== ​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.
  
-1) Download the package ​from our GitHub [[https://​github.com/​litespeedtech/​lsmcd|Repository]] ​to a convenient location ​and decompress it.+===== 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
  
-2) Go to the installation directory, compile, ​and install the package as the root user (for production use):+==== CentOS/RHEL ==== 
 +Run the following commands from an elevated shell terminal: 
 +<​code>​ 
 +yum groupinstall "​Development Tools"​ 
 +yum install autoconf automake zlib-devel openssl-devel expat-devel pcre-devel libmemcached-devel cyrus-sasl* 
 +</​code>​ 
 + 
 +==== Debian/​Ubuntu ==== 
 +Run the following commands from an elevated shell terminal: 
 +<​code>​ 
 +sudo apt-get install git build-essential zlib1g-dev libexpat1-dev openssl libssl-dev libsasl2-dev libpcre3-dev -y 
 +</​code>​ 
 + 
 +===== Download ===== 
 +There are multiple ways to download LSMCD. Here a few options: 
 +  * Git: ''​git clone https://​github.com/​litespeedtech/​lsmcd.git''​ 
 +  * Wget: ''​wget https://​github.com/​litespeedtech/​lsmcd/​archive/​master.zip''​ 
 +  * Curl: ''​curl -O https://​github.com/​litespeedtech/​lsmcd/​archive/​master.zip''​ 
 +**Note** If using ''​wget''​ or ''​curl''​be sure to extract the archive with the following command: ''​unzip master.zip''​ 
 + 
 +===== Compile ===== 
 +To compile ​LSMCDrun the following commands from an elevated shell terminal:
 <​code>​ <​code>​
 cd lsmcd cd lsmcd
-./​configure +./​fixtimestamp.sh 
-make install+./​configure ​CFLAGS="​ -O3" CXXFLAGS="​ -O3" 
 +make
 </​code>​ </​code>​
  
-//Note: A number of options and settings can be configured pre-installationUse ./configure --help to see the configurable options.//+LSMCD should now be builtIf there were any errors please double check that all package requirements were installedIf package requirements were not the issue, please post on our forums for further assistance.
  
-3) LSMCD will install ​to the ///​usr/​local/​lsmcd/​/ directory.+===== Install===== 
 +To install ​LSMCD after it has been compiled, run the following commands from the same elevated shell terminal: 
 +====Centos ​RHEL==== 
 +<​code>​ 
 +sudo make install 
 +</code> 
 +====Debian/​Ubuntu==== 
 +<​code>​ 
 +sudo make install 
 +sudo chown -R username ​/​usr/​local/​lsmcd</code>
  
-4) cd to ///​usr/​local/​lsmcd/​bin/​ // 
  
-5) customize //​conf/​node.conf//​ to your box’s needs (see [[litespeed_wiki:​lsmcd:​configuration|our configuration page]] for more info on these settings).+LSMCD should now be installed
  
-6) Create the following directories if they don’t exist: +Now you will have to edit ''​/usr/local/lsmcd/conf/node.conf''​ to correctly set the IP address to bind.
-  * ///​dev/​shm/​lsmcd//​ +
-  * ///tmp/lsmcd//+
  
 +This is the example conf file for 127.0.0.1:​11211 which is included in the release:
  
-7) To start or stop LSMCD run:  +<​code>​Repl.HeartBeatReq=30 
-<​code>/​usr/local/​lsmcd/​bin/​lsmcdctrl <​start/​stop></​code>​+Repl.HeartBeatRetry=3000 
 +Repl.MaxTidPacket=2048000 
 +Repl.GzipStream=YES 
 +Repl.LbAddrs=127.0.0.1:​12340 
 +Repl.ListenSvrAddr=127.0.0.1:​12340 
 +REPL.DispatchAddr=127.0.0.1:​5501 
 +RepldSockPath=/tmp/repld.usock 
 +CACHED.PRIADDR=127.0.0.1:​11000
  
-==== How to fix errors ​==== +CACHED.ADDR=127.0.0.1:​11211 
-  - Got ''​fatal error: expat.h: No such file or directory'',​ then you should try to install ''​expat-devel'' ​ +#​CACHED.ADDR=UDS:///​tmp/​lsmcd.sock 
-  - Got ''​fatal error: addrmap.h: No such file or directory'',​ then you should try to install ''​expat-devel''​ +#default is 8, it can be bigger depending on cache data amount 
-  - Got ''​error:​ either specify a valid zlib installation'',​ then you should try to install ''​zlib-devel''​+Cached.Slices=
 +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
 +#If you change the UseSasl or DataByUser configuration options you need to remove the ShmDir folder and contents.
 +#​Cached.UseSasl=true
 +#​Cached.DataByUser=true
 +#​Cached.Anonymous=false
 +#​Cached.UserSize=1000
 +#​Cached.HashSize=500000
 +#​CACHED.MEMMAXSZ=0
 +#​CACHED.NOMEMFAIL=false
 +
 +##this is the global setting, no need to have per slice configuration. ​
 +User=nobody
 +Group=nobody
 +#depends CPU core
 +CachedProcCnt=4
 +CachedSockPath=/​tmp/​cached.usock.
 +#​TmpDir=/​tmp/​lsmcd
 +LogLevel=notice
 +#​LogLevel=dbg_medium
 +LogFile=/​tmp/​lsmcd.log</​code>​
 +
 +
 +If you wish to use SASL, remove the '#'​ comment from the line ''#​Cached.UseSasl=true''​
 +===== Start =====
 +There are various different ways to start/stop LSMCD. Here are just a few ways.
 +==== Systemd ====
 +<​code>​
 +systemctl start lsmcd
 +systemctl stop lsmcd
 +systemctl enable lsmcd
 +systemctl disable lsmcd
 +</​code>​
 +==== init.d ====
 +<​code>​
 +service lsmcd start
 +service lsmcd stop
 +chkconfig lsmcd on
 +chkconfig lsmcd off
 +</​code>​
 +==== Manual ====
 +<​code>​
 +/​usr/​local/​lsmcd/​bin/​lsmcdctrl start
 +/​usr/​local/​lsmcd/​bin/​lsmcdctrl stop
 +</​code>​
 +===== Test =====
 +A quick way to test if LSMCD is running is to run the following from shell:
 +<​code>​
 +telnet 127.0.0.1 11211
 +</​code>​
  
 +Be sure to look into [[litespeed_wiki:​lsmcd:​configuration|configuring it]] next!
  • Admin
  • Last modified: 2017/08/24 15:11
  • by Eric Leu