基于Hadoop的hbase安装

使用hbase自带zookeeper,hbase基于本机Hadoop,单机配置(单节点)

  • hadoop 2.7.1
  • hbase 1.2.7
  • linux

hadoop安装

  • export JAVA_HOME="/home/xxxx/java/jdk1.8.0_221"
  • export HADOOP_HOME="/home/xxxx/hadoop-2.8/hadoop-2.8.5"
  • export HBASE_HOME="/home/xxxx/backup/hbase-1.4/hbase-1.4.13"
  • export PATH="${JAVA_HOME}/bin:${HADOOP_HOME}/bin:${HBASE_HOME}/bin:${PATH}"
  • hadoop/etc/hadoop/core-site.xml
<configuration>
		<property>
            <name>fs.defaultFS</name>
            <value>hdfs://localhost:9000</value>
        </property>
        <property>
            <name>hadoop.tmp.dir</name>
            <value>/home/xxxxx/xxx/hadoop-2.7.1/hadoop_tmp</value>
        </property>

</configuration>
  • /hadoop/etc/hadoop/yarn-site.xml
<configuration>

<!-- Site specific YARN configuration properties -->
		<property>
                <name>yarn.nodemanager.aux-services</name>
                <value>mapreduce_shuffle</value>
        </property>
        <property>
                <name>yarn.resourcemanager.hostname</name>
                <value>localhost</value>
        </property>
	    <property>
	         <name>yarn.nodemanager.resource.memory-mb</name>
	         <value>1024</value>
	  </property>
	  <property>
	         <name>yarn.nodemanager.resource.cpu-vcores</name>
	         <value>1</value>
	  </property>	
</configuration>
  • /hadoop/etc/hadoop/mapred-site.xml,如无则创建
<configuration>
		<property>
            <name>mapreduce.framework.name</name>
            <value>yarn</value>
        </property>

</configuration>

hbase安装

  • hbase/conf/hbase-site.xml
<configuration>
		<property>
                  <name>hbase.rootdir</name>
                  <value>hdfs://localhost:9000/hbase</value>
          </property>
          <property>
                  <name>hbase.master.info.port</name>
                  <value>60010</value>
          </property>
          <property>
                  <name>hbase.zookeeper.property.dataDir</name>
                  <value>/home/wangzelin/Software/hbase-1.2.7/zookeeper_data</value>
          </property>

</configuration>
  • 修改自带zookeeper端口
<property>
                  <name>hbase.zookeeper.property.clientPort</name>
                  <value>2321</value>
          </property>
  • hbase-env.sh
export JAVA_HOME=/home/xxxx/xxxx/jdk1.8.0_311

初始化hadoop

hdfs namenode -format

启动hadoop

hadoop/sbin/start-all.sh

启动hbase

hbase/bin/start-hbase.sh

你可能感兴趣的:(Config,java,hadoop,hbase,zookeeper)