| Randy Abernethy | 92a1ed0 | 2014-09-30 16:16:10 -0700 | [diff] [blame] | 1 | # Building Apache Thrift on CentOS 6.5 |
| Roger Meier | e9f00cb | 2014-05-30 14:35:34 +0200 | [diff] [blame] | 2 | |
| Randy Abernethy | 92a1ed0 | 2014-09-30 16:16:10 -0700 | [diff] [blame] | 3 | 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. |
| Roger Meier | e9f00cb | 2014-05-30 14:35:34 +0200 | [diff] [blame] | 4 | |
| Randy Abernethy | 92a1ed0 | 2014-09-30 16:16:10 -0700 | [diff] [blame] | 5 | ## Update the System |
| Roger Meier | e9f00cb | 2014-05-30 14:35:34 +0200 | [diff] [blame] | 6 | |
| Randy Abernethy | 92a1ed0 | 2014-09-30 16:16:10 -0700 | [diff] [blame] | 7 | sudo yum -y update |
| Roger Meier | e9f00cb | 2014-05-30 14:35:34 +0200 | [diff] [blame] | 8 | |
| Randy Abernethy | 92a1ed0 | 2014-09-30 16:16:10 -0700 | [diff] [blame] | 9 | ## Install the Platform Development Tools |
| Roger Meier | e9f00cb | 2014-05-30 14:35:34 +0200 | [diff] [blame] | 10 | |
| Randy Abernethy | 92a1ed0 | 2014-09-30 16:16:10 -0700 | [diff] [blame] | 11 | sudo yum -y groupinstall "Development Tools" |
| Roger Meier | e9f00cb | 2014-05-30 14:35:34 +0200 | [diff] [blame] | 12 | |
| Randy Abernethy | 92a1ed0 | 2014-09-30 16:16:10 -0700 | [diff] [blame] | 13 | ## Upgrade autoconf/automake/bison |
| 14 | |
| 15 | sudo yum install -y wget |
| 16 | |
| 17 | ### Upgrade autoconf |
| 18 | |
| 19 | wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz |
| 20 | tar xvf autoconf-2.69.tar.gz |
| 21 | cd autoconf-2.69 |
| 22 | ./configure --prefix=/usr |
| 23 | make |
| 24 | sudo make install |
| 25 | cd .. |
| 26 | |
| 27 | ### Upgrade automake |
| 28 | |
| 29 | wget http://ftp.gnu.org/gnu/automake/automake-1.14.tar.gz |
| 30 | tar xvf automake-1.14.tar.gz |
| 31 | cd automake-1.14 |
| 32 | ./configure --prefix=/usr |
| 33 | make |
| 34 | sudo make install |
| 35 | cd .. |
| 36 | |
| 37 | ### Upgrade bison |
| 38 | |
| 39 | wget http://ftp.gnu.org/gnu/bison/bison-2.5.1.tar.gz |
| 40 | tar xvf bison-2.5.1.tar.gz |
| 41 | cd bison-2.5.1 |
| 42 | ./configure --prefix=/usr |
| 43 | make |
| 44 | sudo make install |
| 45 | cd .. |
| 46 | |
| 47 | ## Add Optional C++ Language Library Dependencies |
| 48 | |
| 49 | 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). |
| 50 | |
| 51 | If you will be developing Apache Thrift clients/servers in C++ you will also need additional packages to support the C++ shared library build. |
| 52 | |
| 53 | ### Install C++ Lib Dependencies |
| 54 | |
| 55 | sudo yum -y install libevent-devel zlib-devel openssl-devel |
| 56 | |
| James E. King III | ee8caca | 2019-05-04 08:20:59 -0400 | [diff] [blame] | 57 | ### Upgrade Boost >= 1.56 |
| Randy Abernethy | 92a1ed0 | 2014-09-30 16:16:10 -0700 | [diff] [blame] | 58 | |
| James E. King III | ee8caca | 2019-05-04 08:20:59 -0400 | [diff] [blame] | 59 | wget http://sourceforge.net/projects/boost/files/boost/1.56.0/boost_1_56_0.tar.gz |
| 60 | tar xvf boost_1_56_0.tar.gz |
| 61 | cd boost_1_56_0 |
| Randy Abernethy | 92a1ed0 | 2014-09-30 16:16:10 -0700 | [diff] [blame] | 62 | ./bootstrap.sh |
| 63 | sudo ./b2 install |
| 64 | |
| 65 | ## Build and Install the Apache Thrift IDL Compiler |
| 66 | |
| Robert Lu | a139082 | 2018-12-27 23:57:35 +0800 | [diff] [blame] | 67 | git clone https://github.com/apache/thrift.git |
| Roger Meier | e9f00cb | 2014-05-30 14:35:34 +0200 | [diff] [blame] | 68 | cd thrift |
| 69 | ./bootstrap.sh |
| Randy Abernethy | 92a1ed0 | 2014-09-30 16:16:10 -0700 | [diff] [blame] | 70 | ./configure --with-lua=no |
| Roger Meier | e9f00cb | 2014-05-30 14:35:34 +0200 | [diff] [blame] | 71 | make |
| 72 | sudo make install |
| 73 | |
| Randy Abernethy | 92a1ed0 | 2014-09-30 16:16:10 -0700 | [diff] [blame] | 74 | 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 |
| 75 | 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". |