centos 下Twemproxy安装与配置

本文介绍了Twemproxy(Nutcracker)的安装过程及遇到的问题解决办法,并提供了启动命令。Twemproxy作为Twitter开源的Redis和Memcache代理服务器,能够帮助集中管理和控制多个缓存实例。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

twemproxy,也叫nutcraker。是一个twtter开源的一个redis和memcache代理服务器。 redis作为一个高效的缓存服务器,非常具有应用价值。但是当使用比较多的时候,就希望可以通过某种方式 统一进行管理。避免每个应用每个客户端管理连接的松散性。同时在一定程度上变得可以控制。 搜索了不少的开源代理项目,知乎实现的python分片客户端。node的代理中间层,还有各种restfull的开源代理。


安装

git clone https://github.com/twitter/twemproxy.git 
cd twemproxy/ 
CFLAGS="-ggdb3 -O0" autoreconf -fvi && ./configure --prefix=/usr/local/twemproxy  --enable-debug=log

编译的时候报错

autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
configure.ac:8: error: Autoconf version 2.64 or higher is required
configure.ac:8: the top level
autom4te: /usr/bin/m4 failed with exit status: 63
aclocal: autom4te failed with exit status: 63
autoreconf: aclocal failed with exit status: 63

原因是autoconf版本过低 升级过程点这里


升级之后再次编译安装成功


# /usr/local/twemproxy/sbin/nutcracker -t
nutcracker: configuration file 'conf/nutcracker.yml' syntax is ok

cp conf/nutcracker.yml /usr/local/twemproxy/

启动命令

调试启动

/usr/local/twemproxy/sbin/nutcracker -c /usr/local/twemproxy/nutcracker.yml

以守护进程启动

/usr/local/twemproxy/sbin/nutcracker -d -c /usr/local/twemproxy/nutcracker.yml 


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值