My favorites | Sign in
Project Logo
                
Search
for
Updated Oct 20, 2009 by nuggetwheat
HowToBuild  
How to Build Hypertable on Various Platforms

CentOS 5.2 64-bit

EC2: ami-0be90e62

Basic Dependencies

rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-3.noarch.rpm
yum install gcc-c++ make cmake python-devel bzip2-devel zlib-devel expat-devel
wget http://downloads.sourceforge.net/boost/boost_1_38_0.tar.bz2
bzip2 -d boost_1_38_0.tar.bz2
tar -xvf boost_1_38_0.tar
cd boost_1_38_0
./configure
make
make install
cd /etc/yum.repos.d
wget http://dries.eu/pub/dries-el.repo
yum install log4cpp-devel git-core cronolog google-perftools-devel libevent-devel readline-devel ncurses-devel
wget http://internap.dl.sourceforge.net/sourceforge/sigar/hyperic-sigar-1.6.2.tar.gz
tar -xzvf hyperic-sigar-1.6.2.tar.gz
cp hyperic-sigar-1.6.2/sigar-bin/include/*.h /usr/local/include
cp hyperic-sigar-1.6.2/sigar-bin/lib/libsigar-amd64-linux.so /usr/local/lib
wget http://download.oracle.com/berkeley-db/db-4.7.25.tar.gz
tar -xzvf db-4.7.25.tar.gz
cd db-4.7.25/build_unix/
../dist/configure --enable-cxx
make
make install
sh -c "if [ ! -e /etc/hosts ]; then echo '127.0.0.1	localhost.localdomain	localhost' > /etc/hosts ; fi"
sh -c "echo '/usr/local/lib' > /etc/ld.so.conf.d/local.conf"
sh -c "echo '/usr/local/BerkeleyDB.4.7/lib' > /etc/ld.so.conf.d/BerkeleyDB.4.7.conf"
/sbin/ldconfig

Thrift Broker Dependencies

See this official thrift installation wiki page for up-to-date installation instructions. Fetch JDK rpm from Sun JAVA Download page

wget -O jdk-6u13-linux-i586-rpm.bin <really-long-url-from-sun>
chmod 755 jdk-6u13-linux-i586-rpm.bin
./jdk-6u13-linux-i586-rpm.bin
yum install ant automake libtool flex bison pkgconfig libevent-devel ruby-devel perl-Bit-Vector php
wget http://dag.wieers.com/rpm/packages/perl-Class-Accessor/perl-Class-Accessor-0.31-1.el5.rf.noarch.rpm
yum localinstall perl-Class-Accessor-0.31-1.el5.rf.noarch.rpm
wget -O thrift.tgz http://tr.im/hu0b  (See hypertable README for location of working Thrift snapshot)
tar -xzvf thrift.tgz
cd thrift
./bootstrap.sh
./configure
make
make install
/sbin/ldconfig

CentOS 5.2 32-bit

September 28, 2009 Base AMI: ami-6d749504

Basic Dependencies

rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
yum install gcc-c++ make cmake python-devel bzip2-devel zlib-devel expat-devel
wget http://downloads.sourceforge.net/boost/boost_1_39_0.tar.bz2
bzip2 -d boost_1_39_0.tar.bz2
tar -xvf boost_1_39_0.tar
cd boost_1_39_0
./bootstrap.sh 
./bjam 
./bjam install --prefix=/usr/local
cd /etc/yum.repos.d
wget http://dries.eu/pub/dries-el.repo
yum install log4cpp-devel git-core cronolog google-perftools-devel libevent-devel readline-devel ncurses-devel
wget http://internap.dl.sourceforge.net/sourceforge/sigar/hyperic-sigar-1.6.3.tar.gz
tar -xzvf hyperic-sigar-1.6.3.tar.gz
cp hyperic-sigar-1.6.3/sigar-bin/include/*.h /usr/local/include
cp hyperic-sigar-1.6.3/sigar-bin/lib/libsigar-x86-linux.so /usr/local/lib/
wget http://download.oracle.com/berkeley-db/db-4.7.25.tar.gz
tar -xzvf db-4.7.25.tar.gz
cd db-4.7.25/build_unix/
../dist/configure --enable-cxx
make
make install
sh -c "if [ ! -e /etc/hosts ]; then echo '127.0.0.1	localhost.localdomain	localhost' > /etc/hosts ; fi"
sh -c "echo '/usr/local/lib' > /etc/ld.so.conf.d/local.conf"
sh -c "echo '/usr/local/BerkeleyDB.4.7/lib' > /etc/ld.so.conf.d/BerkeleyDB.4.7.conf"
/sbin/ldconfig

Thrift Broker Dependencies

See this official thrift installation wiki page for up-to-date installation instructions. Fetch JDK rpm from Sun JAVA Download page

wget -O jdk-6u16-linux-i586-rpm.bin <really-long-url-from-sun>
chmod 755 jdk-6u16-linux-i586-rpm.bin
./jdk-6u16-linux-i586-rpm.bin
yum install ant automake libtool flex bison pkgconfig libevent-devel ruby-devel perl-Bit-Vector php
wget http://ftp.belnet.be/packages/dries.ulyssis.org/redhat/el5/en/i386/RPMS.dries/perl-Class-Accessor-0.31-1.el5.rf.noarch.rpm
yum localinstall perl-Class-Accessor-0.31-1.el5.rf.noarch.rpm
cd /usr/share/
wget http://www.apache.org/dist/ant/ant-current-bin.zip
unzip ant-current-bin.zip
mv ant ant.old
ln -s apache-ant-1.7.1 ant
rm -rf java/ant*
cp apache-ant-1.7.1/lib/*.jar java
wget http://www.hypertable.org/pub/thrift.tgz
tar -xzvf thrift.tgz
cd thrift
./configure
make
make install
/sbin/ldconfig

Fedora Core 8 32-bit

EC2: ami-5647a33f

Basic Dependencies

yum install git gcc-c++ make cmake python-devel bzip2-devel zlib-devel expat-devel
wget http://downloads.sourceforge.net/boost/boost_1_37_0.tar.bz2
bzip2 -d boost_1_37_0.tar.bz2
tar -xvf boost_1_37_0.tar
cd boost_1_37_0
./configure
make
make install
wget http://dag.wieers.com/rpm/packages/log4cpp/log4cpp-1.0-1.el5.rf.i386.rpm
rpm -i log4cpp-1.0-1.el5.rf.i386.rpm 
wget http://dag.wieers.com/rpm/packages/log4cpp/log4cpp-devel-1.0-1.el5.rf.i386.rpm
rpm -i log4cpp-devel-1.0-1.el5.rf.i386.rpm 
yum install cronolog google-perftools-devel libevent-devel readline-devel ncurses-devel db4-devel
wget http://internap.dl.sourceforge.net/sourceforge/sigar/hyperic-sigar-1.6.0.tar.gz
tar -xzvf hyperic-sigar-1.6.0.tar.gz
cp hyperic-sigar-1.6.0/sigar-bin/include/*.h /usr/local/include
cp hyperic-sigar-1.6.0/sigar-bin/lib/libsigar-x86-linux.so /usr/local/lib/
sh -c "echo '/usr/local/lib' > /etc/ld.so.conf.d/local.conf"
/sbin/ldconfig

Thrift Broker Dependencies

See this official thrift installation wiki page for up-to-date installation instructions. Fetch JDK rpm from Sun JAVA Download page

wget -O jdk-6u12-linux-i586-rpm.bin <really-long-url-from-sun>
chmod 755 jdk-6u12-linux-i586-rpm.bin
./jdk-6u12-linux-i586-rpm.bin
yum install ant automake libtool flex bison pkgconfig libevent-devel ruby-devel perl-Bit-Vector perl-devel php
wget -O thrift.tgz http://tr.im/hu0b  (See hypertable README for location of working Thrift snapshot)
tar -xzvf thrift.tgz
cd thrift
./bootstrap.sh
./configure
make
make install
/sbin/ldconfig

Gentoo 2007.0

EC2: ami-8b8a6fe2

Basic Dependencies

echo 'CONFIG_PROTECT="-*"' >> /etc/make.conf
cd /etc/
rm make.profile
ln -s /mnt/usr/portage/profiles/default-linux/x86/2008.0 make.profile
emerge --sync

Ubuntu 8.10 Intrepid Ibex 32-bit

EC2: ami-5c709435

Basic Dependencies

apt-get update
apt-get install g++ cmake libboost-dev liblog4cpp5-dev git-core cronolog libgoogle-perftools-dev libevent-dev zlib1g-dev libexpat1-dev libdb4.6++-dev libncurses-dev libreadline5-dev
wget http://internap.dl.sourceforge.net/sourceforge/sigar/hyperic-sigar-1.6.3.tar.gz
tar -xzvf hyperic-sigar-1.6.3.tar.gz
cp hyperic-sigar-1.6.3/sigar-bin/include/*.h /usr/local/include
cp hyperic-sigar-1.6.3/sigar-bin/lib/libsigar-x86-linux.so /usr/local/lib/
ldconfig

Thrift Broker Dependencies

See this official thrift installation wiki page for up-to-date installation instructions.

apt-get install sun-java6-jdk
update-java-alternatives --set java-6-sun
apt-get install ant autoconf automake libtool bison flex pkg-config php5 php5-cli ruby-dev libhttp-access2-ruby libbit-vector-perl
ln -f -s /bin/bash /bin/sh
wget http://hypertable.org/pub/thrift.tgz  (See hypertable README for location of working Thrift snapshot)
tar -xzvf thrift.tgz
cd thrift
./bootstrap.sh
./configure
make
make install
ldconfig

Ubuntu 9.04 Jaunty Jackalope 32-bit

Same with 8.10 32-bit, except you can optionally substitute libdb4.6++-dev with libdb4.7++-dev. If you care about python interface, you'll need to create a symlink in /usr/lib/python2.6 (python 2.6 on Debian distributions ignores site-packages according to the comments in the site.py):

cd /usr/lib/python2.6 && sudo ln -s dist-packages site-packages

Mac OS X 10.6 Snow Leopard

The description for OS X 10.5 should work for 10.6 equally well.

Mac OS X 10.5 Leopard

Install XCode

Install MacPorts

Once you installed MacPorts open Terminal and type following commands as root or in sudo shell

port install libevent boost google-perftools google-sparsehash log4cpp pkgconfig

Download Hyperic SIGAR from this page Hyperic SIGAR and install it

port install wget
wget http://superb-west.dl.sourceforge.net/sourceforge/sigar/hyperic-sigar-1.6.2.tar.gz
tar -xzvf hyperic-sigar-1.6.2.tar.gz 
cp hyperic-sigar-1.6.2/sigar-bin/lib/libsigar-universal-macosx.dylib /opt/local/lib
cp hyperic-sigar-1.6.2/sigar-bin/include/*.h /opt/local/include

Install Thrift

port install p5-bit-vector p5-class-accessor
wget http://www.hypertable.org/pub/thrift.tgz
tar -zxf thrift.tgz
cd thrift
cp /opt/local/share/aclocal/pkg.m4 aclocal
./bootstrap.sh
./configure --with-libevent=/opt/local --with-boost=/opt/local
make
make install # as root or in su/sudo shell

Install BerkeleyDB

port install db47

Install git

port -f install git-core +bash_completion +doc

Install cmake

port install cmake

Upgrade to Java 1.6 by downloading it here and installing it by double-clicking on the installer. Then open the Java Preferences App and change the preferred version to Java 1.6

This should effectively make all missing dependencies present on your system so you can proceed with Hypertable compilation.

Mac OS X 10.4 Tiger

Same as on Leopard, except have to disable every Java target in CMakeLists files. Tiger does not support Java 6 so unless you compile hadoop by hand with your version of java, java libraries will not compile because of version mismatch. Missing hadoop support does not cripple Hypertable in any way, so you can still use it with local filesystem or CloudStore (Kfs).

Building, Installing, and Running Tests

mkdir src
cd src
git clone git://scm.hypertable.org/pub/repos/hypertable.git
mkdir -p ../build/hypertable
cd ../build/hypertable
cmake -DPHPTHRIFT_ROOT=$HOME/thrift/lib/php/src ~/src/hypertable
make
make install
make alltests

Other useful packages to install


Comment by ggrothau, Feb 21, 2009

You might want to mention that the cmake command you run at the end is building a debug version, not a release version. I think to build the release version, you need to add -DCMAKE_BUILD_YTPE=Release. I'm not entirely sure I understand the difference though.

Comment by bli.sei.ecnu, Mar 07, 2009

can you tell me the difference between $ cmake -DCMAKE_INSTALL_PREFIX="~/hypertable" -DCMAKE_BUILD_TYPE="Debug" -DBoost_INCLUDE_DIR="/usr/include/boost" ~/src/hypertable

and

$cmake -DPHPTHRIFT_ROOT=$HOME/thrift/lib/php/src ~/src/hypertable

,just explain what's means of them.

Comment by amalt...@gmail.com, Mar 31, 2009

or we can also use -DCMAKE_BUILD_TYPE=RelWithDebInfo? which is as optimized as release.

Comment by vicaya, Apr 06, 2009

Yes. All -D... options can be combined.

Please use our user forum for build related questions/discussions: http://groups.google.com/group/hypertable-user

Feel free to leave comments about typos, inaccurate info and how the wiki article should be organized etc. here though.

Comment by storrealba, Jul 28, 2009

Any news about hot to build the dependencies on Ubuntu 64 bits?

Comment by vicaya, Jul 28, 2009

@storrealba, do you have any issues following 32-bit build instructions? We just post whatever we encountered. BTW, you'll be able to sudo apt-get install <a_hypertable_deb> in the next release.

Comment by eydaimon, Aug 17, 2009

"Then switch the current version of java and the jdk. I'm sure there is a better way to do this, but here are the commands that I ran to get it working on my system:"

Open the Java Preferences App and change the preferred version.

Comment by eydaimon, Aug 17, 2009

OSX: "Download Berkeley DB from here and install it"

port install db47 is better to stick with the ports commands

Comment by mateuszb, Sep 28, 2009

@eydaimon thanks for the suggestions !


Sign in to add a comment
Hosted by Google Code