zoukankan      html  css  js  c++  java
  • twemproxy 安装与配置

    转自:http://blog.csdn.net/u011183653/article/details/21240749


    说到twemproxy就不得不说要一下redis,这是因为twemproxy是为redis服务的,当然这里所说的服务是指代理服务。为什么是这么说得呢?如果你之前有接触过redis的话,你应该很熟悉redis集群。虽然redis集群带来了很多的优势,但还有一个问题需要解决,那就是独立的redis集群之间的关联。我们知道redis有16834个slot(槽),当我们创建集群并赋予给定范围的槽后,如果因为业务的需要而又重新创建了另外一个redis集群,虽然可能解决了业务的需求,但这又产生了另外一个问题-->这两个独立的redis集群无法进行信息共享。在一定程度上会增加了不必要的操作,为此提出了twemproxy。何为twemproxy?如果你了解过设计模式中的代理模式,想必对于这个你也知道个7、8分了吧。好了,其余就不多说了,接下来就具体说说如何安装这个软件吧。作为一个运维人员,我想软件安装与配置是我们的基本技能。

    今天安装twemproxy时,碰到了很多问题。看了很多的博文和论坛,几乎都是从twemproxy解压开始,又没提出安装过程中出现问题的解决方案。或许他们都是大神,并不曾碰到过类似的问题,或者是其他的原因等等,这些都是我的猜测而已。菜鸟的我总是碰到一些问题,出现问题后,论坛上总是零零散散的说,但有时候又不一定能解决我们的问题,所以我就大海捞针找解决方案。总而言之,我写这篇的只是为记录一下我安装twemproxy过程中解决问题的方法。

    1、安装
    由于系统redhat6.3有自带autoconf,由于担心其版本过低,所以我就先卸载了它。

    1. yum remove autoconf  

    卸载完成之后,下载以下的软件包automake、libtool、autoconf、twemproxy。

    我选择相应的包如下:

    automake-1.12.1.tar.gz 包下载地址:http://ftp.gnu.org/gnu/automake/

    autoconf-2.69.tar.gz 包下载地址:http://ftp.gnu.org/gnu/autoconf

    libtool-2.2.4.tar.gz 包下载地址:http://ftp.gnu.org/gnu/libtool/

    twemproxy-master.zip 包下载地址:http://ftp.gnu.org/gnu/twemproxy/

    下载完成之后,依次解压,并安装。(严格依次按以下的顺序解压文件,否则安装失败

    1. tar -xf autoconf-2.69.tar.gz   
    2. ./configure   
    3. make && make install  
    4.   
    5. tar -xf automake-1.12.1.tar.gz   
    6. ./configure   
    7. make && make install  
    8.   
    9. tar -xf libtool-2.2.4.tar.gz  
    10. ./configure   
    11. make && make install  
    12.   
    13. unzip twemproxy-master.zip   
    14. cd twemproxy-master  
    15. autoreconf -ivf  
    16. ./configure   
    17. make && make install  

    在安装过程中可能会碰到以下问题(均是包的依赖问题):

    1、解压twemproxy-master后,cd twemproxy-master,./configure 报错,这是因为要先执行autoreconf -ivf

    2、执行autoreconf -ivf,提示

    1. autoreconf: Entering directory `.'  
    2. autoreconf: configure.ac: not using Gettext  
    3. autoreconf: running: aclocal --force -I m4  
    4. Can't exec "automake": No such file or directory at /usr/local/share/autoconf/Autom4te/FileUtils.pm line 326, <GEN2> line 7.  
    5. autoreconf: failed to run automake: No such file or directory  
    解决方法是安装完autoconf包之后,再安装automake包就可以了。


    3、执行autoreconf -ivf,提示

    1. configure.ac:36: error: possibly undefined macro: AC_PROG_LIBTOOL  
    解决方法是安装完autoconf包和automake包之后,再安装libtool包就可以了。
  • 相关阅读:
    leetcode------Palindrome Number
    leetcode------Minimum Depth of Binary Tree
    leetcode------Binary Tree Level Order Traversal II
    leetcode------Plus One
    leetcode------Plus One
    leetcode------Min Stack
    leetcode------Binary Tree Level Order Traversal
    递归树与非递归树的不同实现【转载,个人感觉写的比较好的一篇,值得去思考】
    leetcode------Compare Version Numbers
    leetcode------Majority Element
  • 原文地址:https://www.cnblogs.com/leonxyzh/p/7289015.html
Copyright © 2011-2022 走看看