Skip to content

Build prerequisites

henryr edited this page Mar 21, 2015 · 19 revisions

Prerequisites

These instructions are for building Impala on Ubuntu 14.04.

Java

sudo add-apt-repository ppa:webupd8team/java -y
sudo apt-get update -y

# Will have to agree to License
sudo apt-get install oracle-jdk7-installer -y

Misc. packages

sudo apt-get install git build-essential cmake bison flex pkg-config libsasl2-dev autoconf automake libtool maven subversion doxygen libbz2-dev zlib1g-dev  python-setuptools python-dev libssl-dev -y

Boost

sudo apt-get install libboost-all-dev -y

Postgresql

sudo apt-get install postgresql -y
Configuring Postgresql

Edit /etc/postgresql/*/main/pg_hba.conf as root. In the following lines at the end of the file, change peer or ident to trust.

# Database administrative login by UNIX sockets
local   all         all                          ident

# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD

# "local" is for Unix domain socket connections only
local   all         all                               ident
# IPv4 local connections:
host    all         all         127.0.0.1/32          md5
# IPv6 local connections:
host    all         all         ::1/128               md5
Creating the Hive metastore user
sudo -u postgres psql postgres

Then, at the postgres command prompt: CREATE ROLE hiveuser LOGIN PASSWORD 'password'; ALTER ROLE hiveuser WITH CREATEDB;


LLVM

wget http://llvm.org/releases/3.3/llvm-3.3.src.tar.gz
tar xvf llvm-3.3.src.tar.gz
cd llvm-3.3.src/tools/
svn co http://llvm.org/svn/llvm-project/cfe/tags/RELEASE_33/final/ clang
cd ../projects/
svn co http://llvm.org/svn/llvm-project/compiler-rt/tags/RELEASE_33/final
cd ..
./configure --with-pic
make -j4 REQUIRES_RTTI=1
sudo make install

Maven 3

wget http://www.interior-dsgn.com/apache/maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.tar.gz
tar xvf apache-maven-3.0.5-bin.tar.gz && sudo mv apache-maven-3.0.5 /usr/local

Environment variables

Put these in your .bashrc or elsewhere:

export JAVA_HOME=/usr/lib/jvm/java-7-oracle
export IMPALA_HOME=YOUR_PATH/ImpalaToGo
export BOOST_LIBRARYDIR=/usr/lib/x86_64-linux-gnu
export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu
export LC_ALL="en_US.UTF-8"
export M2_HOME=/usr/local/apache-maven-3.0.5
export M2=$M2_HOME/bin  
export PATH=$M2:$PATH

Add a path for HDFS domain sockets

sudo mkdir /var/lib/hadoop-hdfs/
sudo chown ubuntu hadoop-hdfs/

Enable password-less SSH for HBase

ssh-keygen -t dsa
# Do not type in any passkey. Just press enter.
cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys