Skip to content

Instantly share code, notes, and snippets.

@predrag-rakic
Created January 8, 2016 15:04
Show Gist options
  • Select an option

  • Save predrag-rakic/23f610251f769e70fa26 to your computer and use it in GitHub Desktop.

Select an option

Save predrag-rakic/23f610251f769e70fa26 to your computer and use it in GitHub Desktop.

Revisions

  1. predrag-rakic created this gist Jan 8, 2016.
    44 changes: 44 additions & 0 deletions install_riffed.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,44 @@
    #!/bin/sh
    #
    # This script will install Thrift compiler for C++, Python, Ruby and Elixir bindings
    # It will also install Elixir and Erlang
    #

    set -x

    # Install Erlang && Elixir

    rm -f erlang-solutions_1.0_all.deb
    wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb && sudo dpkg -i erlang-solutions_1.0_all.deb
    rm -f erlang-solutions_1.0_all.deb
    sudo apt-get update
    sudo apt-get -y install esl-erlang
    sudo apt-get -y install elixir


    # Install Thrift

    VER=0.9.3
    NAME=thrift-${VER}

    sudo apt-get -y 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

    curl http://archive.apache.org/dist/thrift/${VER}/${NAME}.tar.gz | tar zx
    cd ${NAME}/

    # Ruby binding build fails
    #./configure --without-ruby
    ./configure

    # Build succeds second time - don't ask why!?
    make
    #make clean
    #make

    sudo make install

    set +x

    echo
    echo To check if instalation was cuccessfull
    echo thrift --help