SASL全称Simple Authentication and Security Layer,是一种用来扩充C/S模式验证能力的机制

1.yum安装cyrus-sasl

yum -y install cyrus-sasl-devel.x86_64 cyrus-sasl.x86_64 cyrus-sasl-lib.x86_64 cyrus-sasl-plain.x86_64

查看安装结果:

rpm -qa | grep sasl

2.sasl相关文件

https://blog.csdn.net/qwssd/article/details/77198839

3.启动saslauthd进程

/etc/init.d/saslauthd start

4.验证saslauth启动是否成功

ps aux | grep saslauthd

5.添加用户“memcached”给“memcached”程序

saslpasswd2 -a memcached -c memcached

6.查看是否添加成功

sasldblistusers2

7.安装libevent

wget https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz

8.解压安装

tar zxvf libevent-2.0.22-stable.tar.gz

cd libevent-2.0.22-stable

./configure –prefix=/usr/local/libevent

make && make install

9.查看是否安装成功

ls -al /usr/lib | grep libevent

10.安装memcached(memcached在1.4.3版本之后才支持sasl)

wget http://www.memcached.org/files/memcached-1.5.9.tar.gz

tar zxvf memcached-1.5.9.tar.gz

./configure –enable-sasl –prefix=/usr/local/memcached –with-libevent=/usr/local/libevent

make && make install

./configure –enable-sasl –prefix=/usr/local/memcached –with-libevent=/usr/local/libevent

make && make install

11.mc启动

解决“can’t find the user memcached to switch to”问题

解决“Error initializing sasl.”问题,改为安装memcached-1.5.0

12.验证

参考:

Linux下安装配置带SASL认证的Memcached

https://blog.csdn.net/qwssd/article/details/77198839

centos安装memcached 并开启sasl认证

http://www.7kb.org/957.html

文章来源于互联网,如有雷同请联系站长删除:centos安装支持sasl的memcached

发表评论