当前位置:8288分类目录 » 站长资讯 » 编程 » 文章详细

安装带sasl认证的memcached

来源:网络转载 浏览:26767次 时间:2023-09-02

1.安装libevent

cd /tmp
wget http://jaist.dl.sourceforge.net/project/levent/libevent/libevent-2.0/libevent-2.0.22-stable.tar.gz
tar -zxvf libevent-2.0.22-stable.tar.gz
cd libevent-2.0.22-stable
./configure --prefix=/usr/local/libevent
make
make install

2.安装memcached

cd /tmp
wget http://memcached.org/files/memcached-1.4.22.tar.gz
tar -zxvf memcached-1.4.22.tar.gz  
cd memcached-1.4.22
./configure --enable-sasl --prefix=/usr/local/memcached --with-libevent=/usr/local/libevent
make
make install

配置的时候报错:configure: error: Failed to locate the library containing sasl_server_init是缺少sasl开发库文件,centos下yum search sasl | grep dev
我安装的是yum install cyrus-sasl-devel.x86_64,网上还有安装的是libgsasl-devel

3.配置sasl用户密码

# saslauthd -v

saslauthd 2.1.23

authentication mechanisms: getpwent kerberos5 pam rimap shadow ldap


# vi /etc/sysconfig/saslauthd

MECH=shadow


# /etc/init.d/saslauthd restart

停止 saslauthd:[确定]

启动 saslauthd:[确定]


# ps aux | grep saslauthd

# /etc/init.d/saslauthd start

# chkconfig saslauthd on


# /usr/sbin/testsaslauthd -u root -p 123

0: OK "Success."


testsaslauthd出现0: NO "authentication failed"的解决方法

# setsebool -P allow_saslauthd_read_shadow 1


/usr/sbin/saslpasswd2 -a memcached -c root

Password:   

Again (for verification):




8288分类目录声明:本站部分文章来源于网络,版权属于原作者所有。如有转载或引用文章/图片涉及版权问题,请联系我们处理.我们将在第一时间删除! 联系邮箱:tsk@qq.com

推荐网站

最新加入网站 TOP5

入站排行榜 TOP5