Published 28 August 2019

Apache Thrift configuration and installation

About Apache Thrift

About Apache Thrift

The Apache Thrift software is a framework implemented for scaling cross-language services development. It combines a software stack with a code generation engine to build services that work efficiently and seamlessly between C++, Java, Python, PHP, Ruby, Erlang, Perl, Haskell, C#, Cocoa, JavaScript, Node.js, Smalltalk, OCaml and Delphi and other languages

Overall, the Apache Thrift's requirements are:

Managing and Installing Java

Managing and Installing Java

Java 11 JDK software installation:

sudo apt-get install openjdk-11-jdk

sudo apt-get install openjdk-11-jre

Figure 1. Java openJDK package.

If is needed, user must set 'JAVA_HOME' variable for the OS. Then setting the 'JAVA_HOME' environment variable:

sudo update-alternatives --config java

export JAVA_HOME=jdk-install-dir

export PATH=$JAVA_HOME/bin:$PATH

Another alternative:

sudo nano /etc/environment

source /etc/environment

echo $JAVA_HOME

Example path: /usr/lib/jvm/java-11-openjdk-amd64

An option for other Java commands, such as the compiler (javac):

sudo update-alternatives --config javac

Depends on the operating system version might be needed to install Apache Ant (TM) for Java libraries also:

sudo apt update

sudo apt -y install ant

Figure 2. Apache Ant (TM) for Java libraries.

The .NET SDK and Mono Cross platform installation 

The .NET SDK and Mono Cross platform installation, open source .NET framework

The general instructions are described below:

wget https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb

sudo dpkg -i packages-microsoft-prod.deb

sudo add-apt-repository universe

sudo apt-get install apt-transport-https

sudo apt-get update

sudo apt-get install dotnet-sdk-2.2


Figure 3. framework .NET SDK.

 Mono repository (for C# libraries) installation

Mono repository (for C# libraries) installation

Mono is an open source implementation of Microsoft's .NET Framework based on the ECMA standards for C# and the Common Language Runtime.

sudo apt install mono-devel

Figure 4. Mono repository installation.

 

Thrift configuration and build

Thrift configuration and build

The following commands will install tools and libraries required to build and install Apache Thrift compiler and C++ libraries on a Debian/Ubuntu Linux based system.

sudo apt-get install automake bison flex g++ git libboost-all-dev libevent-dev libssl-dev libtool make pkg-config

Afterward, the steps described below can be performed:

./bootstrap.sh

Figure 5. Thrift bootstrap.

./configure --without-qt4 --without-qt5 


Figure 6. Thrift configuration.

And then by typing ‘make’:

make

Figure 7. Thrift build.

Finally ‘sudo make install’ command:

sudo make install

Figure 8. Thrift installation.

In case of issues, check whether pkg-config path is correct.

pkg-config –cflags thrift 

 

 

 

 

Votes 0, average rating 0

Contents