Setup Hbase
安装HBase
In order to use OpenTSDB, you need to have HBase up and running. This page will help you get started with a simple, single-node HBase setup, which is good enough to evaluate OpenTSDB or monitor small installations. If you need scalability and reliability, you will need to setup a full HBase cluster.
要使用OpenTSDB,你需要去让HBase跑起来。这个页面将帮助你以一种简单的,单结点的方式安装HBase,这是足够好的去支撑OpenTSDB或监控小装置。如果你需要可扩展性和可靠性,你将需要去安装一个完整的HBase群。
You can copy-paste all the following instructions directly into a terminal.
Setup a single-node HBase instance
安装一个单结点的HBase例子
If you already have an HBase cluster, skip this step. If you're gonna be using less than 5-10 nodes, stick to a single node. Deploying HBase on a single node is easy and can help get you started with OpenTSDB quickly. You can always scale to a real cluster and migrate your data later.
如果你想直接安装一个HBase群,跳过这一步。如果你要使用低于5至10个节点,那么坚持使用单结点。在单结点上部署HBase很简单,并且能帮你快速开启OpenTSDB。你总能扩展到一个真正的集群,然后迁移你的数据。
wget http://www.apache.org/dist/hbase/hbase-0.92.1/hbase-0.92.1.tar.gz
tar xfz hbase-0.92.1.tar.gz
cd hbase-0.92.1
At this point, you are ready to start HBase (without HDFS) on a single node. But before starting it, I recommend using the following configuration:
此时,你将准备在单个结点上开启HBase(没有HDFS) 。不过在开始之前,我推荐先用以下配置:
hbase_rootdir=${TMPDIR-'/tmp'}/tsdhbase
iface=lo`uname | sed -n s/Darwin/0/p`
cat >conf/hbase-site.xml <<EOF
hbase.rootdir
file:///$hbase_rootdir/hbase-\${user.name}/hbase
hbase.zookeeper.dns.