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
語言環境需求:
packages 需求:
- 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
For ruby, install ruby-full?ruby-dev?librspec-ruby?rake?rubygems?libdaemons-ruby?libgemplugin-ruby?mongrel .
For python, install python-dev?python-twisted .
For perl, install libbit-vector-perl .
For php, install php5-dev?php5-cli .
For c_glib, install libglib2.0-dev (Debian Lenny Users => sudo?apt-get?-t?lenny-backports?install?libglib2.0-dev )
For erlang, install erlang-base?erlang-eunit?erlang-dev
For csharp, install mono-gmcs?libmono-dev?libmono-system-web2.0-cil
For haskell, install ghc6?cabal-install?libghc6-binary-dev?libghc6-network-dev?libghc6-http- dev
make
?
make install
更多文章、技術交流、商務合作、聯系博主
微信掃碼或搜索:z360901061

微信掃一掃加我為好友
QQ號聯系: 360901061
您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。
【本文對您有幫助就好】元
