`
songbin0201
  • 浏览: 320148 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

ubuntu 下安装调试 thrift

 
阅读更多
http://thrift.apache.org/download/
下载thrift的最新版本,然后解压,安装
tar -xzvf thrift-0.7.0.tar.gz
chmod +x configure
./configure
./make
make install


但是thrift的安装编译,还需要依赖一些安装包,因此执行上述命令可能尚无法安装,需要等依赖包安装好后,进入解压后的thrift目录,重新执行配置和编译过程
依赖包如下或者参考http://wiki.apache.org/thrift/ThriftRequirements
GNU build tools: autoconf 2.59+ (2.60+ recommended), automake 1.9+, libtool 1.5.24+
boost 1.34.0+
g++ 3.3.5+
pkgconfig (Use MacPorts for Mac OS X)
lex and yacc (developed primarily with flex and bison)

执行如下命令,安装依赖包
sudo apt-get install build-essential
sudo apt-get install bison flex
sudo apt-get install libboost-dev python-dev
sudo apt-get install autoconf automake libtool pkg-config
sudo apt-get install git


至此,thrift已经安装完成,根据tutorial,可以快速的调试一个测试例子
进入thrift/tutorial目录,执行 thrift -r --gen java tutorial.thrift,生成thrift的java服务代码(client、server)
进入thrift/tutorial/java目录,执行ant,编译发布java代码
sh JavaServer //启动服务器端
sh JavaClient //启动客户端
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics