欢迎投稿

今日深度:

HBase安装配置,

HBase安装配置,


HBase安装配置

1:在某一台上解压hbase的压缩文件,如在192.168.2.100

tar –zxvf hbase-1.2.6 -bin.tar.gz

 

配置添加环境变量:

#hbase

export HBASE_HOME=/usr/tmp/hbase-1.2.6

export PATH=$PATH:$HBASE_HOME/bin

 

使环境变量生效

source /etc/profile

 

2:进入hbase的conf目录,需要修改三个文件:hbase-env.sh、hbase-site.xml和regionservers

其中hbase-env.sh中,修改红色字体内容:

# The java implementation to use.  Java 1.7+ required.

# export JAVA_HOME=/usr/java/jdk1.6.0/

export JAVA_HOME=/usr/share/jdk1.8.0_144

# Extra Java CLASSPATH elements.  Optional.

# export HBASE_CLASSPATH=

然后在后面添加:

# Seconds to sleep between slavecommands.  Unset by default.  This

# can be useful in large clusters, where,e.g., slave rsyncs can

# otherwise arrive faster than the mastercan service them.

# export HBASE_SLAVE_SLEEP=0.1

 

# Tell HBase whether it should manage it'sown instance of Zookeeper or not.

exportHBASE_MANAGES_ZK=false

 

3:hbase-site.xml中

<configuration>

       <property>

               <name>hbase.zookeeper.quorum</name>

               <value>master,slave1,slave2</value>

                <description>Thedirectory shared by RegionServers.</description>

       </property>

       <property>

               <name>hbase.zookeeper.property.dataDir</name>

                <value>/usr/tmp/hbase-1.2.6/zookeeperdata</value>

                <description>Propertyfrom ZooKeeper config zoo.cfg.

                The directory where thesnapshot is stored.

                </description>

       </property>

       <property>

               <name>hbase.tmp.dir</name>

                <value>/usr/tmp/hbase-1.2.6/tmpdata</value>

       </property>

       <property>

               <name>hbase.rootdir</name>

                <value>hdfs://master:9000/hbase</value>

                <description>Thedirectory shared by RegionServers.</description>

       </property>

       <property>

               <name>hbase.cluster.distributed</name>

                <value>true</value>

                <description>The mode thecluster will be in. Possible values are

                false: standalone andpseudo-distributed setups with managed Zookeeper

                true: fully-distributed withunmanaged Zookeeper Quorum (see hbase-env.sh)

                </description>

       </property>

</configuration>


4:regionservers文件中添加各个从属服务器的ip或者hostname

master

slave1

slave2

 

5:保存后分别把hbase的整个文件夹拷贝到其他服务器:(这里是三个虚拟机搭建的集群)

scp  -r  /usr/tmp/hbase-1.2.6  root@slave1:/usr/tmp/

scp  -r  /usr/tmp/hbase-1.2.6  root@slave2:/usr/tmp/

 

6:在hadoop的namenode节点上启动hbase服务

start-hbase.sh

 

启动后:jps

HRegionServer

HMaster

子节点

HRegionServer

 

启动顺序

Hadoop-hdfs-------》hadoop-yarn------》zookeeper------》hbase

www.htsjk.Com true http://www.htsjk.com/hbase/39731.html NewsArticle HBase安装配置, HBase安装配置 1:在某一台上解压hbase的压缩文件,如在192.168.2.100 tar –zxvf hbase-1.2.6 -bin.tar.gz   配置添加环境变量: #hbase export HBASE_HOME=/usr/tmp/hbase-1.2.6 export PATH=$PATH:$H...
相关文章
    暂无相关文章
评论暂时关闭