Building Apache Thrift on CentOS 6.5

来源:互联网 发布:朝鲜假钞 知乎 编辑:程序博客网 时间:2024/06/06 15:45

Building Apache Thrift on CentOS 6.5

Starting with a minimal installation, the following steps are required to build Apache Thrift on Centos 6.5. This example builds from source, using the current development master branch. These instructions should also work with Apache Thrift releases beginning with 0.9.2.

Update the System

sudo yum -y update

Install the Platform Development Tools

sudo yum -y groupinstall "Development Tools"

Upgrade autoconf/automake/bison

sudo yum install -y wget

Upgrade autoconf

wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gztar xvf autoconf-2.69.tar.gzcd autoconf-2.69./configure --prefix=/usrmakesudo make installcd ..

Upgrade automake

wget http://ftp.gnu.org/gnu/automake/automake-1.14.tar.gztar xvf automake-1.14.tar.gzcd automake-1.14./configure --prefix=/usrmakesudo make installcd ..

Upgrade bison

wget http://ftp.gnu.org/gnu/bison/bison-2.5.1.tar.gztar xvf bison-2.5.1.tar.gzcd bison-2.5.1./configure --prefix=/usrmakesudo make installcd ..

Add Optional C++ Language Library Dependencies

All languages require the Apache Thrift IDL Compiler and at this point everything needed to make the IDL Compiler is installed (if you only need the compiler you can skip to the Build step).

If you will be developing Apache Thrift clients/servers in C++ you will also need additional packages to support the C++ shared library build.

Install C++ Lib Dependencies

sudo yum -y install libevent-devel zlib-devel openssl-devel

Upgrade Boost

wget http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.gztar xvf boost_1_55_0.tar.gzcd boost_1_55_0./bootstrap.shsudo ./b2 install

Build and Install the Apache Thrift IDL Compiler

git clone https://git-wip-us.apache.org/repos/asf/thrift.gitcd thrift./bootstrap.sh./configure --with-lua=nomakesudo make install

This will build the compiler (thrift/compiler/cpp/thrift --version) and any language libraries supported. The make install step installs the compiler on the path: /usr/local/bin/thrift You can use the ./configure --enable-libs=no switch to build the Apache Thrift IDL Compiler only without lib builds. To run tests use "make check".

0 0