ubuntu thrift 编译安装
来源:互联网 发布:中国沙漠在减少吗 知乎 编辑:程序博客网 时间:2024/05/12 20:07
1、thrift 的作用:
在ubuntu下安装了hbase后,如果想用其他语言连接调用hbase,需要用到Thrift这一中间件。
2、thrift的安装:
2.1、获取thrift的方式有两种:
第一种下载源代码发行包:thrift.apache.org/download
笔者使用的是thrift-0.8.0.tar.gz
将压缩包解压后放到/home/hadoop/目录下:
tar xvf thrift-0.8.0.tar.gzmv thrift-0.8.0/ /home/hadoop/cd /home/hadoop/
第二种是下载git上源代码
git clone https://git-wip-us.apache.org/repos/asf/thrift.git thriftcd thrift
2.2、通过thrift-0.8.0.tar.gz发行包安装thrift
安装前需要安装依赖包:
进入terminal:输入
sudo apt-get install libboost-dev libboost-test-dev libboost-program-options-dev libboost-system-dev libboost-filesystem-dev libevent-dev automake libtool flex bison pkg-config g++ libssl-dev
根据想要使用的语言,安装对应的软件包:
Ruby
ruby-full ruby-dev ruby-rspec rake rubygems libdaemons-ruby libgemplugin-ruby mongrel
Python
python-all python-all-dev python-all-dbg
Perl
libbit-vector-perl libclass-accessor-class-perl
Php, install
php5-dev php5-cli phpunit
C_glib
libglib2.0-dev
Erlang
erlang-base erlang-eunit erlang-dev
Csharp
mono-gmcs mono-devel libmono-system-web2.0-cil nunit nunit-console
Haskell
ghc6 cabal-install libghc6-binary-dev libghc6-network-dev libghc6-http-dev
Thrift Compiler for Windows
mingw32 mingw32-binutils mingw32-runtime nsis
譬如笔者就使用PHP与hbase进行通信,所以
再terminal输入:
sudo apt-get install php5-dev php5-cli phpunit
安装后生成配置脚本:
进入thrift目录:
cd /home/hadoop/thrift-0.8.0./configure部分日志输出:thrift 0.8.0Building code generators ..... :Building C++ Library ......... : yesBuilding C (GLib) Library .... : noBuilding Java Library ........ : yesBuilding C# Library .......... : noBuilding Python Library ...... : yesBuilding Ruby Library ........ : noBuilding Haskell Library ..... : noBuilding Perl Library ........ : noBuilding PHP Library ......... : yesBuilding Erlang Library ...... : noBuilding Go Library .......... : noBuilding TZlibTransport ...... : yesBuilding TNonblockingServer .. : yesUsing javac .................. : javacUsing java ................... : javaUsing ant .................... : /usr/bin/antUsing Python ................. : /usr/bin/pythonUsing php-config ............. : /usr/bin/php-configIf something is missing that you think should be present,please skim the output of configure to find the missingcomponent. Details are present in config.log.
thrift需要本地编译与安装
#编译thriftmakesudo make install
(笔者在编译和安装thrift过程中,出现了php编译安装的错误和警告,但貌似不影响使用,所以笔者就没有深究,知道原因的小伙伴可以告知笔者。)
2.3、通过git源码安装thrift
//进入thrift目录cd /home/hadoop/thrift<pre><code>// 产生配置脚本./bootstrap.sh// 生成配置信息./configure// 编译Thriftmake// 安装Thriftsudo make install</code>
2.4、查看thrift版本
thrift -version//输出//Thrift version 0.8.0
安装成功
2.5、启动thrift//进入hbase目录cd /home/hadoop/hbase-0.98//启动thriftbin/hbase-daemon.sh start thrift8907 SecondaryNameNode9519 HRegionServer9288 HQuorumPeer30061 Jps9355 HMaster8716 DataNode8554 NameNode29985 ThriftServer//关闭thrift<pre name="code" class="plain">bin/hbase-daemon.sh stop thrift
ThriftServer 成功启动~~
0 0
- ubuntu thrift 编译安装
- ubuntu thrift 0.9.3编译安装
- ubuntu thrift 0.9.3编译安装
- ubuntu thrift 0.9.3编译安装
- 【Thrift一】Thrift编译安装
- ubuntu下编译安装thrift 0.5.0总结
- Ubuntu环境下Thrift的安装、编译以及测试
- linux 编译 安装 thrift
- ubuntu安装Thrift
- ubuntu 安装thrift
- ubuntu 安装thrift
- ubuntu下安装thrift
- ubuntu 安装 thrift
- ubuntu安装Thrift
- ubuntu下安装thrift
- ubuntu 安装thrift
- ubuntu下安装thrift
- Thrift 学习笔记1——Ubuntu环境下Thrift的安装、编译以及测试
- arm64 NSInteger 和 int (%d)不匹配
- Python中一些小技巧
- 【Flume】【源码分析】flume中拦截器的源码分析,以TimestampInterceptor为例
- 黑马程序员-C语言总结
- docker容器的多应用开机启动
- ubuntu thrift 编译安装
- php图像处理函数大全(缩放、剪裁、缩放、翻转、旋转、透明、锐化的实例总结)
- 各种数据库取前10行记录
- 很二很牛逼
- 利用ADO.NET SqlBulkCopy 大批量快速导入数据
- Linux查看进程的启动文件
- WINCE 同步和应用调试
- centos5.X 32位系统上给python2.7安装lxml
- (DT系列二)device tree的书写规范