1 安装前提
确保安装了jdk
确保安装了hadoop集群
确保安装了hbase的集群
192.168.100.200 master (zk、namenode、resourcemanager、HMaster、TSDMain)
192.168.100.201 slave1 (zk、datanode、nodemanager、HRegionServer、TSDMain)
192.168.100.202 slave2 (zk、datanode、nodemanager、HRegionServer、TSDMain)
说明:TSDMain即openTSDB的进程,openTSDB本身没有分布式的实现方案,而是借助于HBase的分布式集群方案
也就是说,master、slave1、slave2三个物理节点之上的openTSDB访问同一个HBase集群,返回相同的数据镜像
2 安装gnuplot
Opentsdb运行需要gnuplot 插件
rpm -ivh gnuplot-common-4.6.2-3.el7.x86\_64.rpm
rpm -ivh gnuplot-4.6.2-3.el7.x86\_64.rpm
3 验证gnuplot的安装以及png的安装成功
gnuplot
gnuplot> set terminal png
4 安装openTSDB
在三个节点上操作相同
rpm –ivh opentsdb-2.3.0.rpm
初始表
env COMPRESSION=NONE HBASE\_HOME=/usr/local/hbase-1.3.0/ /usr/local/opentsdb/share/opentsdb/tools/create\_table.sh
修改配置文件
vi /etc/opentsdb/opentsdb.conf
tsd.core.auto_create_metrics = true
tsd.storage.hbase.zk_quorum = master,slave1,slave2
启动
./tsdb tsd —config=/usr/local/opentsdb/share/opentsdb/etc/opentsdb/opentsdb.conf
cd /usr/share/opentsdb/bin
chmod +x tsdb
./tsdb tsd &
http://192.168.100.200:4242/
http://192.168.100.201:4242/
http://192.168.100.202:4242/