Line | |
---|
1 | #!/bin/bash |
---|
2 | if [ ! -f /usr/src/hbase-0.20.3.tar.gz ]; then |
---|
3 | wget http://ftp.twaren.net/Unix/Web/apache/hadoop/hbase/hbase-0.20.3/hbase-0.20.3.tar.gz -o /usr/src/hbase-0.20.3.tar.gz |
---|
4 | fi |
---|
5 | |
---|
6 | tar zxvf /usr/src/hbase-0.20.3.tar.gz -C /opt |
---|
7 | ln -s /opt/hbase-* /opt/hbase |
---|
8 | cp /opt/hadoop/conf/core-site.xml /opt/hbase/conf |
---|
9 | cp /opt/hadoop/conf/hdfs-site.xml /opt/hbase/conf |
---|
10 | cp /opt/hadoop/conf/mapred-site.xml /opt/hbase/conf |
---|
11 | cat >> /opt/hbase/conf/hbase-env.sh << EOF |
---|
12 | export JAVA_HOME=$JAVA_HOME |
---|
13 | export HADOOP_CONF_DIR=/opt/hadoop/conf |
---|
14 | export HBASE_HOME=/opt/hbase |
---|
15 | export HBASE_MANAGES_ZK=true |
---|
16 | EOF |
---|
17 | cat > /opt/hbase/conf/hbase-site.xml << EOF |
---|
18 | <?xml version="1.0"?> |
---|
19 | <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> |
---|
20 | <configuration> |
---|
21 | <property> |
---|
22 | <name>hbase.rootdir</name> |
---|
23 | <value>hdfs://localhost:9000/hbase</value> |
---|
24 | </property> |
---|
25 | </configuration> |
---|
26 | EOF |
---|
Note: See
TracBrowser
for help on using the repository browser.