centos安装支持sasl的memcached

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

1.yum安装cyrus-sasl

《centos安装支持sasl的memcached》 yum -y install cyrus-sasl-devel.x86_64 cyrus-sasl.x86_64 cyrus-sasl-lib.x86_64 cyrus-sasl-plain.x86_64

查看安装结果:

《centos安装支持sasl的memcached》 rpm -qa | grep sasl

2.sasl相关文件

《centos安装支持sasl的memcached》 https://blog.csdn.net/qwssd/article/details/77198839

3.启动saslauthd进程

《centos安装支持sasl的memcached》 /etc/init.d/saslauthd start

4.验证saslauth启动是否成功

《centos安装支持sasl的memcached》 ps aux | grep saslauthd

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

《centos安装支持sasl的memcached》 saslpasswd2 -a memcached -c memcached

6.查看是否添加成功

《centos安装支持sasl的memcached》 sasldblistusers2

7.安装libevent

《centos安装支持sasl的memcached》 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

《centos安装支持sasl的memcached》

9.查看是否安装成功

《centos安装支持sasl的memcached》 ls -al /usr/lib | grep libevent

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

《centos安装支持sasl的memcached》 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

《centos安装支持sasl的memcached》 ./configure –enable-sasl –prefix=/usr/local/memcached –with-libevent=/usr/local/libevent

《centos安装支持sasl的memcached》 make && make install

11.mc启动

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

《centos安装支持sasl的memcached》

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

《centos安装支持sasl的memcached》
《centos安装支持sasl的memcached》

12.验证

《centos安装支持sasl的memcached》

================

参考:

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

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

centos安装memcached 并开启sasl认证

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

    原文作者:k1ic
    原文地址: https://www.jianshu.com/p/9702cc76a7d7
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞