Skip to content

Instantly share code, notes, and snippets.

@elecnix
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elecnix/7c65bfe258b38937806f to your computer and use it in GitHub Desktop.
Save elecnix/7c65bfe258b38937806f to your computer and use it in GitHub Desktop.
Install OpenTSDB 2.0.0 (for tinkering)
#!/bin/bash
set -e
INSTALL_ROOT=/home/admin
cd $INSTALL_ROOT
wget http://apache.mirror.iweb.ca/hbase/stable/hbase-0.98.5-hadoop2-bin.tar.gz
tar xzf hbase-*-hadoop2-bin.tar.gz
ln -s hbase-*-hadoop2 hbase
cat > hbase/conf/hbase-site.xml <<EOF
<configuration>
<property>
<name>hbase.rootdir</name>
<value>file://$INSTALL_ROOT/data/hbase</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>$INSTALL_ROOT/data/zookeeper</value>
</property>
</configuration>
EOF
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
hbase/bin/start-hbase.sh
# Check HMaster
jps
# Check Zookeeper
echo stats | nc localhost 2181
wget https://github.com/OpenTSDB/opentsdb/releases/download/v2.0.0/opentsdb-2.0.0.tar.gz
tar xzf opentsdb-*.tar.gz
ln -s opentsdb-2.0.0 opentsdb
cd opentsdb
./build.sh
cd ..
env COMPRESSION=NONE HBASE_HOME=$INSTALL_ROOT/hbase opentsdb/src/create_table.sh
ln -s opentsdb/src/opentsdb.conf
sed -i -e "s#^\\(tsd.network.port\\).*#\\1 = 8042#" opentsdb.conf
sed -i -e "s#^\\(tsd.http.cachedir\\).*#\\1 = $INSTALL_ROOT/data/opentsdb/cache#" opentsdb.conf
sed -i -e "s#^\\(tsd.http.staticroot\\).*#\\1 = $INSTALL_ROOT/opentsdb/build/staticroot#" opentsdb.conf
CLASSPATH= opentsdb/build/tsdb tsd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment