Linux under memcached installation and connection

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.