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 sasl2.sasl相关文件
https://blog.csdn.net/qwssd/article/details/771988393.启动saslauthd进程
/etc/init.d/saslauthd start4.验证saslauth启动是否成功
ps aux | grep saslauthd5.添加用户“memcached”给“memcached”程序
saslpasswd2 -a memcached -c memcached6.查看是否添加成功
sasldblistusers27.安装libevent
wget https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz8.解压安装
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 libevent10.安装memcached(memcached在1.4.3版本之后才支持sasl)
wget http://www.memcached.org/files/memcached-1.5.9.tar.gztar 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 install11.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
网友评论