浙江省高等学校教师教育理论培训

微信搜索“毛凌志岗前心得”小程序

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

Thrift概述及其安装[原创]_danssion space_百度空间

Thrift概述及其安装[原创]

1. 概述

Thrift是Facebook为了跨编程语言工作而开发的软件库和代码生成工具的一个项目。其高效性十分吸引软件开发工作者。

 

2. 下载Thrift

首先从thrift的官方网站(http://thrift.apache.org/download)下载最新的安装包thrift-0.7.0.tar.gz

 

3. 安装Thrift

首先解压缩:

tar -zxvf thrift-0.6.1.tar.gz

./configure

thrift 会按照系统中所能支持的语言,提供相应的支持。有如下提示:

 

thrift 0.7.0

Building code generators ..... : cpp c_glib java as3 csharp py rb perl php erl cocoa st ocaml h
s xsd html js javame go

Building C++ Library ......... : yes
Building C (GLib) Library .... : no
Building Java Library ........ : no
Building C# Library .......... : no
Building Python Library ...... : yes
Building Ruby Library ........ : yes
Building Haskell Library ..... : no
Building Perl Library ........ : no
Building PHP Library ......... : yes
Building Erlang Library ...... : yes
Building Go Library .......... : no

Building TZlibTransport ...... : yes
Building TNonblockingServer .. : yes

Using Python ................. : /usr/bin/python

Using php-config ............. : /usr/local/bin/php-config

Using Ruby ................... : /usr/bin/ruby
Using rspec .................. :

Using erlc ................... : /usr/bin/erlc

 

一般需要packege支持,ubuntu下执行如下命令:sudo apt-get install libboost-dev libboost-test-dev libboost-program-options-dev \

libevent-dev automake libtool flex bison pkg-config g++ libssl-dev

语言环境需求:

  • C++
    • Boost 1.33.1+
    • libevent (optional, to build the nonblocking server)
    • zlib (optional)
  • Java
    • Java 1.5+
    • Apache Ant
    • Apache Ivy (recommended)
    • Apache Commons Lang (recommended)
    • SLF4J
  • C#: Mono 1.2.4+ (and pkg-config to detect it) or Visual Studio 2005+
  • Python 2.4+ (including header files for extension modules)
  • PHP 5.0+ (optionally including header files for extension modules)
  • Ruby 1.8+ (including header files for extension modules)
  • Erlang R12 (R11 works but not recommended)
  • Perl 5
    • Bit::Vector
    • Class::Accessor
packages 需求:
  1. For ruby, install ruby-full ruby-dev librspec-ruby rake rubygems libdaemons-ruby libgemplugin-ruby mongrel.

  2. For python, install python-dev python-twisted.

  3. For perl, install libbit-vector-perl.

  4. For php, install php5-dev php5-cli.

  5. For c_glib, install libglib2.0-dev (Debian Lenny Users => sudo apt-get -t lenny-backports install libglib2.0-dev)

  6. For erlang, install erlang-base erlang-eunit erlang-dev

  7. For csharp, install mono-gmcs libmono-dev libmono-system-web2.0-cil

  8. For haskell, install ghc6 cabal-install libghc6-binary-dev libghc6-network-dev libghc6-http-dev


make

 

make install

posted on 2013-02-21 15:55  lexus  阅读(449)  评论(0编辑  收藏  举报