RPC服务框架Apache Thrift的安装笔记

Apache Thrift简述

Thrift是一个跨语言的RPC(Remote Procedure Call,远程过程调用)服务框架,最初由Facebook开发,后来进入Apache开源项目。
Thrift用来进行可扩展且跨语言的服务的开发。它结合了功能强大的软件堆栈和代码生成引擎,以构建在 C++, Java, Go,Python, PHP, Ruby, Erlang, Perl, Haskell, C#, Cocoa, JavaScript, Node.js, Smalltalk, and OCaml 这些编程语言间无缝结合的、高效的服务。

Apache Thrift安装

安装环境:Centos 7.2 64位
Thrift版本:用了当前的开发的master分支,直接从源码编译安装

Step1:更新系统

# sudo yum -y update

Step2:安装“Platform Development Tools”

# sudo yum -y groupinstall “Development Tools”

Step3:更新autoconf/automake/bison

# sudoyuminstall-ywget
Upgrade autoconf
# wget http://ftp.gnu.org/gnu/autoconf/autoconf-latest.tar.gz
# tar xvf autoconf-latest.tar.gz
# cd autoconf-latest
# ./configure –prefix=/usr
# make
# sudo make install
Upgrade automake
# wget http://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz
# tar xvf automake-1.15.tar.gz
# cd automake-1.15
# ./configure –prefix=/usr
# make
# sudo make install
Upgrade bison
# wget http://ftp.gnu.org/gnu/bison/bison-3.0.4.tar.gz
# tar xvf bison-3.0.4.tar.gz
# cd bison-3.0.4
# ./configure –prefix=/usr
# make
# sudo make install

Step4:增加和更新相关依赖库

c++相关的
# sudo yum -y install libevent-devel zlib-devel openssl-devel
python相关的
# sudo yum -y install python-devel
更新boost
# wget http://sourceforge.net/projects/boost/files/boost/1.62.0/boost_1_62_0.tar.gz
# tar xvf boost_1_62_0.tar.gz
# cd boost_1_62_0
# ./bootstrap.sh
# sudo./b2install

Step5:编译和安装 Apache Thrift IDL Compiler

# git clone https://git-wip-us.apache.org/repos/asf/thrift.git
# cd thrift
# ./bootstrap.sh
# ./configure –with-lua=no
# make
# sudo make install

安装成功后的路径是/usr/local/bin/thrift

    原文作者:2hanson
    原文地址: https://www.jianshu.com/p/5cdd55b90a7d
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞