forked from ianunruh/monitoring
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall-hbase.sh
More file actions
executable file
·35 lines (28 loc) · 850 Bytes
/
install-hbase.sh
File metadata and controls
executable file
·35 lines (28 loc) · 850 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
##
# Installs Apache HBase in pseudo-distributed mode with filesystem-backed storage
#
# Provides:
# - HBase RPC (TCP/9000)
# - HMaster web dashboard (TCP/60010)
# - Regionserver web dashboard (TCP/60030)
#
# Dependencies:
# - ZooKeeper (TCP/2181)
##
set -eux
source env.sh
HBASE_PREFIX=/opt/hbase
useradd -d /var/lib/hbase -s /bin/bash -m hbase
# Install dependencies
apt-get install -yq openjdk-7-jre-headless supervisor
# Install HBase
cd /tmp
curl -sOL http://apache.osuosl.org/hbase/hbase-${HBASE_VERSION}/hbase-${HBASE_VERSION}-hadoop2-bin.tar.gz
tar xf hbase-${HBASE_VERSION}-hadoop2-bin.tar.gz
mv hbase-${HBASE_VERSION}-hadoop2 /opt/hbase
# Configure HBase
cp $BASE_PATH/opt/hbase/conf/* $HBASE_PREFIX/conf
# Start with supervisord
cp $BASE_PATH/etc/supervisor/conf.d/hbase.conf /etc/supervisor/conf.d
supervisorctl update