swanwish / blog

My blog website
0 stars 0 forks source link

Install memcached #49

Open swanwish opened 7 years ago

swanwish commented 7 years ago

Setup memcached

  1. Install memcached with yum
yum install memcached
  1. Install from source and get the executable file
yum install libevent-devel

wget https://memcached.org/latest
[you might need to rename the file]
tar -zxf memcached-1.x.x.tar.gz
cd memcached-1.x.x
./configure --prefix=/usr/local/memcached
make && make test && sudo make install

If report following error: `no acceptable C compiler found in $PATH`
yum groupinstall "Development tools"
  1. Replace executable file with service version
cd /usr/bin
mv memcached memcached.1.4.15
cp ~/tools/memcached /usr/bin/memcached

Now start the memcached, it will be in version 1.4.34

Use the following command to show the version:

memcached-tool localhost stats
memcached-tool localhost dump // This command will show the entities in memcache