A few days ago, technical director asked me to add a memcached in the project, has never been configured before, so go online to find tutorials, the ultimate toss success. The comparison pit is the SASL protocol there.
Since memcached relies on libevents, two software downloads are needed.
1,memcached. 2,libevent.
First check if there are any installed.
Rpm-qa|grep libevent
Rpm-qa|grep memcached
Official website Download: http://libevent.org/
Official website Download: http://memcached.org/latest
First unzip the LIBEVENT:TAR-ZXF libevent-x.xx
./configure--prefix=/usr/local/libevent
Make
Make install
Libevent installation is complete. Start memcached installation.
Decompression: TAR-ZXF memcached-x.xx
./configure --prefix=/usr/local/memcached --with-libevent=/usr/local/libevent /
Make
Make install
Start: memcached-m 128-p 11211-u nobody-c 2048-vv-d Specify memory, port, user, maximum number of connections, daemon start
Netstat-lntup can see if memcached started successfully.
This is again to see if Sasl:rpm-qa|grep SASL is installed.
The general is already installed, this is a connection memcached protocol.
Enter SASL configuration
Vim/etc/sysconfig/saslauthd
Modify mech, modify to Shadow mode, this mode can let the system user to log on.
This time, useradd a user, set a password for him.
And then this is connected to the memcached
telnet localhost 11211
If the prompt command is not found, you can install it by Yum install-y telnet.
You will be prompted to enter your account number and password later, you can enter the user's account number you just added to log in successfully.
Linux under memcached installation and connection