Apache Hadoop集群离线安装部署(一)——Hadoop(HDFS、YARN、MR)安装:http://www.cnblogs.com/pojishou/p/6366542.html
Apache Hadoop集群离线安装部署(二)——Spark-2.1.0 on Yarn安装:http://www.cnblogs.com/pojishou/p/6366570.html
Apache Hadoop集群离线安装部署(三)——Hbase安装:http://www.cnblogs.com/pojishou/p/6366806.html
〇、安装文件准备
zookeeper:http://mirrors.cnnic.cn/apache/zookeeper/zookeeper-3.4.9/zookeeper-3.4.9.tar.gz
hbase:http://mirror.bit.edu.cn/apache/hbase/1.3.0/hbase-1.3.0-bin.tar.gz
一、安装zookeeper
1、解压
tar -zxvf zookeeper-3.4.9.tar.gz -C /opt/program/ ln -s /opt/program/zookeeper-3.4.9 /opt/zookeeper
2、修改配置文件
cd /opt/zookeeper/conf/ cp zoo_sample.cfg zoo.cfg vi zoo.cfg dataDir=/opt/zookeeper/zkdata dataLogDir=/opt/zookeeper/log server.1=node00:2888:3888 server.2=node01:2888:3888 server.3=node02:2888:3888
3、创建zkdata文件并添加myid
mkdir /opt/zookeeper/zkdata mkdir /opt/zookeeper/log cd zkdata echo 1 > myid
4、scp到其它节点,并修改相应的myid
5、批量启动脚本
#!/bin/bash for host in node00 node01 node02 do { ssh $host "source /etc/profile;/opt/zookeeper/bin/zkServer.sh "$1 }&wait done
二、安装Hbase
1、解压
tar -zxvf hbase-1.3.0-bin.tar.gz -C /opt/program ln -s /opt/program/hbase-1.3.0 /opt/hbase
2、修改配置文件
cd /opt/hbase/conf/
(1)、hbase-env.sh
vi hbase-env.sh export JAVA_HOME=/opt/java //告诉hbase使用外部的zk export HBASE_MANAGES_ZK=false
(2)、hbase-site.xml
vi hbase-site.xml <configuration> <!-- 指定hbase在HDFS上存储的路径 --> <property> <name>hbase.rootdir</name> <value>hdfs://node00:9000/hbase</value> </property> <!-- 指定hbase是分布式的 --> <property> <name>hbase.cluster.distributed</name> <value>true</value> </property> <!-- 指定zk的地址,多个用“,”分割 --> <property> <name>hbase.zookeeper.quorum</name> <value>node00:2181,node01:2181,node02:2181</value> </property> </configuration>
(3)、regionservers
vi regionservers node01 node02
3、启动集群
//启动zookeeper zkServer.sh start //启动hdfs start-dfs.sh //启动hbase start-hbase.sh //管理页面 master:16010