Hypertable on hadoop 安装

 

软件:

 

hadoop-0.20.2-cdh-u3

hypertable-0.9.5.6

ruby-1.8.7

CentOS-6.2

 

 

yum -y install gcc

yum -y install gcc-c++

yum install make

 

安装 BerkeleyDB4.6+

==================================

tar zxvf db-5.3.21.gz 

cd db-5.3.21

cd build_unix/

../dist/configure --prefix=/usr/local/berkeleydb --enable-cxx

make

make install

 

安装 Boost1.34.1+

=================================== 

tar zxvf boost_1_49_0.tar.gz

cd boost_1_49_0

cd tools/build/v2/

./bootstrap.sh 

./b2 install --prefix=/usr/local

 

安装 log4cpp 1.0+

==================================

yum install expat-devel)

==================================

yum install readline-devel)

==================================

 

安装 Hypertable-0.9.5.6

==================================

yum install perl-Bit-Vector

yum install perl-IO-Zlib

yum install perl-IO-Socket-INET6

yum install perl-IO-Socket-SSL

yum install perl-IO-String.noarch

yum install perl-libwww-perl-5.833-2.el6.noarch

 

rpm -ivh hypertable-0.9.5.6-linux-x86_64.rpm

 

安装 ruby-1.8.7

===================================

yum install ruby ruby-devel

 

tar zxvf rubygems-1.3.5.tgz

cd rubygems-1.3.5

ruby setup.rb 

gem update

gem install capistrano

 

安装hadoop(Hypertable自带的hadoop jar是cloudera CHD3-u3的)

===================================

具体安装参见相关文档

在hadoop上创建hypertable文件夹

bin/hadoop fs -mkdir /hypertable

bin/hadoop fs -chmod 777 /hypertable

 

Hypertable 安装配置

===================================

将/opt/hypertable/0.9.5.6/conf/Capfile.cluster文件拷贝到工作目录下(例如当前用户的home目录),重命名为Capfile,修改里面内容

set :source_machine,     "dlxa111"

set :install_dir,        "/opt/hypertable" 

set :hypertable_version, "0.9.5.6"

set :default_pkg,        "/root/hypertable-0.9.5.6-linux-x86_64.rpm"

set :default_dfs,        "hadoop"

set :default_config,     "/root/hypertable.cfg"   ##hypertable 配置文件路径

 

role :source, "dlxa111"

role :master, "dlxa111"

role :hyperspace, "dlxa112", "dlxa113", "dlxa114"

role :slave,  "dlxa115", "dlxa116", "dlxa117", "dlxa118"

role :localhost, "dlxa111"

role :thriftbroker

role :spare

 

安装命令

===================================

cap install_package   ##向各台机器分发安装

cap dist              ##查看各台机器的安装

 

cap shell             ##创建目录

cap> mkdir /etc/opt/hypertable /var/opt/hypertable

cap> chown smp:smp /etc/opt/hypertable /var/opt/hypertable

cap> quit

 

cap fhsize

 

创建hypertable配置文件(hypertable.cfg)

=====================================

 

#

# hypertable.cfg

#

 

# HDFS Broker

HdfsBroker.fs.default.name=hdfs://dlxa111:9000

 

# Ceph Broker

CephBroker.MonAddr=dlxa111:6789

 

# Local Broker

DfsBroker.Local.Root=fs/local

 

# DFS Broker - for clients

DfsBroker.Port=38030

 

# Hyperspace

Hyperspace.Replica.Host=dlxa113

Hyperspace.Replica.Host=dlxa115

Hyperspace.Replica.Host=dlxa117

Hyperspace.Replica.Host=dlxa118

Hyperspace.Replica.Port=38040

Hyperspace.Replica.Dir=hyperspace

 

# Hypertable.Master

Hypertable.Master.Port=38050

 

# Hypertable.RangeServer

Hypertable.RangeServer.Port=38060

 

Hyperspace.KeepAlive.Interval=30000

Hyperspace.Lease.Interval=1000000

Hyperspace.GracePeriod=200000

 

# ThriftBroker

ThriftBroker.Port=38080

 

将配置文件分发到各个机器的hypertable上

cap push_config

cap set_current        ##创建一个软连接

 

查看各台机器时间是否一致,如果不一致,请使用NTP做时间同步,NTP的安装参见相关文档

===============================================================================

cap shell

cap> date

 

安装web监控界面

=================================

gem install sinatra rack thin json titleize

yum install rrdtool

 

启动集群

=================================

cap start

 

 

停止集群

=================================

cap stop

 

查看集群

=================================

http://dlxa111:38090/

 

 

Hypertable on hadoop 安装_第1张图片

 

你可能感兴趣的:(hadoop)