由于项目需要集成多语言开发的东西,我们选择了使用thrift,它是facebook的核心框架之一,所以花了几天时间来研究安装,折腾的精疲力尽,终于搞定,安装步骤如下:
install jdk for linux(如果需要集成java,可以不装)
1、去官方网站下载安装包,如果是64位系统,记得选择linux x64,现在是1.6版,
java1.5下载:http://java.sun.com/products/archive/j2se/5.0_22/index.html,安装同1.6
2、下载 xxx.bin的版本,比如:jdk-6u20-linux-x64.bin
3、修改运行权限,chmod a+x jdk-6u20-linux-x64.bin
4、运行jdk-6u20-linux-x64.bin,前面是授权声明,直接按空格跳过
5、在/etc/profile配置java_home,jre_home,classpath,e.g:
export JAVA_HOME=/usr/local/java/jdk1.5.0_22
export TOMCAT_HOME=/usr/local/apache-tomcat-5.5.29
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
install ant(如果需要集成java,可以不装)
1、下载最新版的ant
2、tar xzvf apache-ant-1.8.0-bin.tar.gz
3、vim /etc/profile,添加export ANT_HOME=/usr/java/apache-ant-1.8.0,在PATH里添加 $ANT_HOME/bin
4、保存退出,执行 source /etc/profile
install ivy
1、下载apache ivy
2、tar xzvf apache-ivy-2.1.0-bin.tar.gz
3、cp ivy-2.1.0.jar to ANT_HOME/lib
4、goto apache-ivy-2.1.0/src/example/hello-ivy, and run ant
install thrift
安装过程参见http://wiki.apache.org/thrift/ThriftInstallation,但可能不会成功,需要按以下步骤:
1、安装需求
1) g++ 3.3.5+,一般系统缺省就可以
# boost 1.33.1+ (1.34.0 for building all tests),
需要使用yum search boost来查询,执行 yum install boost.x86_64来安装,如果是32位系统,改为yum install boost.i386
2) Runtime libraries for lex and yacc might be needed for the compiler. (flex库),
需要使用yum search flex来查询,执行 yum install flex.x86_64 来安装
2、编译需求
1) GNU build tools: autoconf 2.59+ (2.60+ recommended), automake 1.9+, libtool 1.5.24+
需要卸载autoconf,执行 yum remove autoconf,它会一起卸载automake,libtool 等库,
去http://www.gnu.org/software/autoconf/下载最新的安装文件,安装过程:./configure,make,make install
去http://www.gnu.org/software/automake/下载最新的安装文件,安装过程:./configure,make,make install
安装缺省安装在/usr/local/bin/下,因此需要配置环境变量
vi /etc/profile, 在path里添加/usr/local/bin/
执行source /etc/profile,激活配置
2)pkg-config autoconf macros (pkg.m4) (Use MacPorts for Mac OS X)
3) lex and yacc (developed primarily with flex and bison)
3、下载http://incubator.apache.org/thrift/download/
4、解压缩
5、./bootstrap.sh,哈哈,运气好的话,可以通过,运气不好,会报警告或错误,安装不成功,
解决方法参见http://mail-archives.apache.org/mod_mbox/incubator-thrift-user/200907.mbox/%3C4A673E6F.5020205@facebook.com%3E。
它提供两个方案:upgrade your autoconf to 2.61 or download an
instant release from http://instant.thrift-rpc.org/ and skip bootstrap.sh
第一个方案我没有搞定,于是下载instant版,http://gitweb.thrift-rpc.org/?p=thrift.git;spfx=thrift-instant-r940936;a=snapshot;h=147123e29fb3c6fd4fbbad601c131b0a08d1c8b7;sf=tgz
6、解压
7、./configure
8、./configure CXXFLAGS='-g -O2'
9、make
10、make install
哈哈,成功了
分享到:
相关推荐
thrift安装文件
thrift 安装包。
Thrift 在Windows下的安装与实例 vs2010 本文的不同之处在于,不借助Cygwin或者MinGW,只用VS2010,和Thrift官网下载的源文件,安装Thrift并使用。 本文可用于thrift-0.9.1.tar.gz,thrift-0.10.0.tar.gz版本安装
mac 想安装低版本thrift 0.9.3太难了,高版本比较简单 直接执行 brew install thrift.rb 即可安装
thrift-0.9.2.安装.
流行RPC框架之Thrift安装工具(windows安装版),版本0.11.0
Thrift: Scalable Cross-Language Services Implementation
下面小编就为大家带来一篇thrift安装遇到的问题以及解决方法(必看篇)。小编觉得挺不错的,现在就分享给大家,也给大家做个参考。一起跟随小编过来看看吧
php thrift 客户端调用 python服务端,学习了解thrif非常有用附代码和centos thift 安装文件
thrift,Apache Thrift 0.9.2 版本,解压后直接直接安装,可伸缩的跨语言服务开发框架,命令: 解压命令:tar -zxf thrift-0.9.2.tar.gz 安装命令:./configure --with-lua=no && make && make install 查看版本:...
Apache Thrift is an open source cross language serialization and RPC framework. With support for over 15 programming languages, Apache Thrift can play an important role in a range of distributed ...
thrift源码thrift源码thrift源码thrift源码thrift源码thrift源码thrift源码thrift源码thrift源码thrift源码thrift源码thrift源码thrift源码thrift源码thrift源码thrift源码thrift源码thrift源码thrift源码thrift源码...
流行RPC框架之Thrift安装工具,版本号0.11.0
网上一直搜不到Windows下QT使用thrift的例子,自己整了个 QT版本 5.8.0 Boost版本 boost_1_61_0 Thrift版本 thrift-0.10.0
使用wireshark抓取thrift协议接口调用
本文只是简单的讲解Thrift开源框架的安装和简单使用示例,对于详细的讲解,后面在进行阐述。 Thrift简述 Thrift是一款由Fackbook开发的可伸缩、跨语言的服务开发框架,该框架已经开源并且加入的Apache项目。Thrift...
虚拟机安装thrift详细操作,完全是自己手动安装,目的是能够使用C++等其他语言访问HBase
Thrift,Windows,vs2010,c/c++
thrift官方代码+与dubbo集成支持原生thrift协议
thrift是一个软件框架,用来进行可扩展且跨语言的服务的开发。它结合了功能强大的软件堆栈和代码生成引擎,以构建在 C++, Java, Python, PHP, Ruby, Erlang, Perl, Haskell, C#, Cocoa, JavaScript, Node.js, ...