twemproxy的安装(课程openresty学习笔记),


1.安装autoconf

cd /usr/loacal

wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz

tar -zxvf autoconf-2.69.tar.gz

cd autoconf-2.69

./configure && make && make install

2.安装automake

wget http://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz

tar -zxvf automake-1.15.tar.gz

cd automake-1.15

./configure && make && make install

3.安装libtool

wget http://ftp.gnu.org/gnu/libtool/libtool-2.4.6.tar.gz

tar -zxvf libtool-2.4.6.tar.gz

cd libtool-2.4.6

./configure && make && make install

4.安装twemproxy

wget https://github.com/twitter/twemproxy/archive/master.zip

unzip master

cd twemproxy-master

aclocal

autoreconf -f -i -Wall,no-obsolete

mkdir  /usr/local/twemproxy

./configure --prefix=/usr/local/twemproxy

make && make install

5.配置twemproxy

将twemproxy-master 下的conf目录复制到 /usr/local/twemproxy下

cp -r./conf/usr/local/twemproxy

cd /usr/local/twemproxy

修改conf目录下nutcracker.yml文件内容

alpha:

   listen:192.168.93.134:22121

   hash:fnvla_64

   distribution:ketama

   auto_eject_hosts:true

   redis:true

   server_retry_timeout:2000

   server_failure_limit:1

   servers:

   -192.168.93.133:6379:1

   -192.168.93.134:6379:1

6.启动twemproxy中间件

cd /usr/local/twemproxy

./sbin/nutcracker ./conf/nutcracker.yml

7.通过redis-cli连接主机

./src/redis-cli -h 192.168.93.134 -p 22121

未完成,还有很多技术问题不清楚

 

相关内容

    暂无相关文章