您当前的位置: 首页 >  centos

Bulut0907

暂无认证

  • 5浏览

    0关注

    346博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

在centos7上编译安装thrift

Bulut0907 发布时间:2021-12-13 14:26:00 ,浏览量:5

目录
  • 1. 说明
  • 2. 更新yum源
  • 3. 安装centos7的Development Tools
  • 4. 安装autoconf
  • 5. 安装automake
  • 6. 安装bison
  • 7. 安装C++ lib依赖
  • 8. 安装Boost
  • 9. 安装Thrift IDL Compiler
  • 10. 创建软链接
  • 11. 测试

1. 说明

本文以0.9.3版本为例,理论上适用于0.9.3 - 0.15.0版本

2. 更新yum源
[root@bigdata001 thrift]#
[root@bigdata001 thrift]# yum -y update
[root@bigdata001 thrift]#
3. 安装centos7的Development Tools
[root@bigdata001 thrift]#
[root@bigdata001 thrift]# yum -y groupinstall "Development Tools"
[root@bigdata001 thrift]#
4. 安装autoconf
[root@bigdata001 thrift]#
[root@bigdata001 thrift]# wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
[root@bigdata001 thrift]#
[root@bigdata001 thrift]# tar xvf autoconf-2.69.tar.gz
[root@bigdata001 thrift]#
[root@bigdata001 thrift]# mkdir autoconf-2.69-install
[root@bigdata001 thrift]#
[root@bigdata001 thrift]# cd autoconf-2.69
[root@bigdata001 autoconf-2.69]#
[root@bigdata001 autoconf-2.69]# ./configure --prefix=/root/thrift/autoconf-2.69-install
[root@bigdata001 autoconf-2.69]#
[root@bigdata001 autoconf-2.69]# make && make install 
[root@bigdata001 autoconf-2.69]#
5. 安装automake
[root@bigdata001 thrift]#
[root@bigdata001 thrift]# wget http://ftp.gnu.org/gnu/automake/automake-1.14.tar.gz
[root@bigdata001 thrift]#
[root@bigdata001 thrift]# tar xvf automake-1.14.tar.gz
[root@bigdata001 thrift]#
[root@bigdata001 thrift]# mkdir automake-1.14-install
[root@bigdata001 thrift]#
[root@bigdata001 thrift]# cd automake-1.14
[root@bigdata001 automake-1.14]#
[root@bigdata001 automake-1.14]# ./configure --prefix=/root/thrift/automake-1.14-install
[root@bigdata001 automake-1.14]#
[root@bigdata001 automake-1.14]# make && make install
[root@bigdata001 automake-1.14]#
6. 安装bison
[root@bigdata001 thrift]#
[root@bigdata001 thrift]# wget http://ftp.gnu.org/gnu/bison/bison-2.5.1.tar.gz
[root@bigdata001 thrift]#
[root@bigdata001 thrift]# tar xvf bison-2.5.1.tar.gz
[root@bigdata001 thrift]#
[root@bigdata001 thrift]# mkdir bison-2.5.1-install
[root@bigdata001 thrift]#
[root@bigdata001 thrift]# cd bison-2.5.1
[root@bigdata001 bison-2.5.1]#
[root@bigdata001 bison-2.5.1]# ./configure --prefix=/root/thrift/bison-2.5.1-install/
[root@bigdata001 bison-2.5.1]#
[root@bigdata001 bison-2.5.1]# make && make install
[root@bigdata001 bison-2.5.1]#
7. 安装C++ lib依赖
[root@bigdata001 thrift]#
[root@bigdata001 thrift]# yum -y install libevent-devel zlib-devel openssl-devel
[root@bigdata001 thrift]#
8. 安装Boost
[root@bigdata001 thrift]#
[root@bigdata001 thrift]# wget --no-check-certificate http://sourceforge.net/projects/boost/files/boost/1.56.0/boost_1_56_0.tar.gz
[root@bigdata001 thrift]#
[root@bigdata001 thrift]# tar xvf boost_1_56_0.tar.gz
[root@bigdata001 thrift]#
[root@bigdata001 thrift]# cd boost_1_56_0
[root@bigdata001 boost_1_56_0]#
[root@bigdata001 boost_1_56_0]# ./bootstrap.sh
[root@bigdata001 boost_1_56_0]#
[root@bigdata001 boost_1_56_0]# ./b2 install
[root@bigdata001 boost_1_56_0]#
9. 安装Thrift IDL Compiler
[root@bigdata001 thrift]#
[root@bigdata001 thrift]# wget http://archive.apache.org/dist/thrift/0.9.3/thrift-0.9.3.tar.gz
[root@bigdata001 thrift]#
[root@bigdata001 thrift]# tar -zxvf thrift-0.9.3.tar.gz 
[root@bigdata001 thrift]#
[root@bigdata001 thrift]# mkdir thrift-0.9.3-install
[root@bigdata001 thrift]#
[root@bigdata001 thrift]# cd thrift-0.9.3
[root@bigdata001 thrift-0.9.3]#
[root@bigdata001 thrift-0.9.3]# ./configure --with-lua=no --prefix=/root/thrift/thrift-0.9.3-install/
[root@bigdata001 thrift-0.9.3]#
[root@bigdata001 thrift-0.9.3]# make && make install 
[root@bigdata001 thrift-0.9.3]#
10. 创建软链接
[root@bigdata001 thrift]#
[root@bigdata001 thrift]# ln -s /root/thrift/thrift-0.9.3-install/bin/thrift /usr/bin/thrift
[root@bigdata001 thrift]#
11. 测试
[root@bigdata001 thrift]# 
[root@bigdata001 thrift]# thrift -version
Thrift version 0.9.3
[root@bigdata001 thrift]# 
关注
打赏
1664501120
查看更多评论
立即登录/注册

微信扫码登录

0.0363s