hbase2.0.6 install

[root@hadoop-master zwf]# ll
total 1567684
drwxr-xr-x 10  777 ftp         161 Sep  2 21:24 hadoop-2.7.7
-rw-r--r--  1  777 root  218720521 Sep  2 00:16 hadoop-2.7.7.tar.gz
drwxr-xr-x  7 root root        182 Sep  7 21:14 hbase-2.0.6
-rw-r--r--  1 root root  272812222 Sep  7 20:54 hbase-2.0.6-bin.tar.gz
-rw-r--r--  1 root root        240 Sep  3 10:58 hosts
drwxr-xr-x  8  777   143       255 Apr 11  2015 jdk1.8.0_45
-rw-r--r--  1  777 root  173271626 Sep  2 00:15 jdk-8u45-linux-x64.tar.gz
-rw-r--r--  1 root root  470241280 Sep  3 20:39 mysql-5.7.17-1.el6.x86_64.rpm-bundle.tar
-rw-r--r--  1 7155 31415  23844312 Nov 30  2016 mysql-community-client-5.7.17-1.el6.x86_64.rpm
-rw-r--r--  1 7155 31415    335508 Nov 30  2016 mysql-community-common-5.7.17-1.el6.x86_64.rpm
-rw-r--r--  1 7155 31415   3705436 Nov 30  2016 mysql-community-devel-5.7.17-1.el6.x86_64.rpm
-rw-r--r--  1 7155 31415  39087268 Nov 30  2016 mysql-community-embedded-5.7.17-1.el6.x86_64.rpm
-rw-r--r--  1 7155 31415 135718844 Nov 30  2016 mysql-community-embedded-devel-5.7.17-1.el6.x86_64.rpm
-rw-r--r--  1 7155 31415   2175836 Nov 30  2016 mysql-community-libs-5.7.17-1.el6.x86_64.rpm
-rw-r--r--  1 7155 31415   1723224 Nov 30  2016 mysql-community-libs-compat-5.7.17-1.el6.x86_64.rpm
-rw-r--r--  1 7155 31415 158856732 Nov 30  2016 mysql-community-server-5.7.17-1.el6.x86_64.rpm
-rw-r--r--  1 7155 31415 104780636 Nov 30  2016 mysql-community-test-5.7.17-1.el6.x86_64.rpm
-rw-r--r--  1 root root         58 Sep  3 10:12 text_input
-rw-r--r--  1  777 root         16 Sep  2 16:19 ZengWenFeng-hadoop.txt
[root@hadoop-master zwf]# 
[root@hadoop-master zwf]# pwd
/zwf



[root@hadoop-master zwf]# cd /zwf/hbase-2.0.6/conf
[root@hadoop-master conf]# ll
total 44
-rw-r--r-- 1 root root 1811 Jan 22  2020 hadoop-metrics2-hbase.properties
-rw-r--r-- 1 root root 4284 Jan 22  2020 hbase-env.cmd
-rw-r--r-- 1 root root 7674 Jan 22  2020 hbase-env.sh
-rw-r--r-- 1 root root 2257 Jan 22  2020 hbase-policy.xml
-rw-r--r-- 1 root root 2301 Jan 22  2020 hbase-site.xml
-rw-r--r-- 1 root root 1169 Jan 22  2020 log4j-hbtop.properties
-rw-r--r-- 1 root root 5735 Jan 22  2020 log4j.properties
-rw-r--r-- 1 root root   10 Jan 22  2020 regionservers
[root@hadoop-master conf]# 
[root@hadoop-master conf]# pwd
/zwf/hbase-2.0.6/conf
[root@hadoop-master conf]# 
[root@hadoop-master conf]# 


[root@hadoop-master conf]# mkdir /zwf_hbase /zwf_hbase/tmp /zwf_hbase/tmp/zookeeper

hosts

#127.0.0.1	localhost
::1	localhost ip6-localhost ip6-loopback
fe00::0	ip6-localnet
ff00::0	ip6-mcastprefix
ff02::1	ip6-allnodes
ff02::2	ip6-allrouters
172.18.0.11	hadoop-master
172.18.0.12	hadoop-node-02
172.18.0.13	hadoop-node-03

/etc/profile

# /etc/profile

# System wide environment and startup programs, for login setup
# Functions and aliases go in /etc/bashrc

# It's NOT a good idea to change this file unless you know what you
# are doing. It's much better to create a custom.sh shell script in
# /etc/profile.d/ to make custom changes to your environment, as this
# will prevent the need for merging in future updates.

pathmunge () {
    case ":${PATH}:" in
        *:"$1":*)
            ;;
        *)
            if [ "$2" = "after" ] ; then
                PATH=$PATH:$1
            else
                PATH=$1:$PATH
            fi
    esac
}


if [ -x /usr/bin/id ]; then
    if [ -z "$EUID" ]; then
        # ksh workaround
        EUID=`/usr/bin/id -u`
        UID=`/usr/bin/id -ru`
    fi
    USER="`/usr/bin/id -un`"
    LOGNAME=$USER
    MAIL="/var/spool/mail/$USER"
fi

# Path manipulation
if [ "$EUID" = "0" ]; then
    pathmunge /usr/sbin
    pathmunge /usr/local/sbin
else
    pathmunge /usr/local/sbin after
    pathmunge /usr/sbin after
fi

HOSTNAME=`/usr/bin/hostname 2>/dev/null`
HISTSIZE=1000
if [ "$HISTCONTROL" = "ignorespace" ] ; then
    export HISTCONTROL=ignoreboth
else
    export HISTCONTROL=ignoredups
fi

export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL

# By default, we want umask to get set. This sets it for login shell
# Current threshold for system reserved uid/gids is 200
# You could check uidgid reservation validity in
# /usr/share/doc/setup-*/uidgid file
if [ $UID -gt 199 ] && [ "`/usr/bin/id -gn`" = "`/usr/bin/id -un`" ]; then
    umask 002
else
    umask 022
fi

for i in /etc/profile.d/*.sh /etc/profile.d/sh.local ; do
    if [ -r "$i" ]; then
        if [ "${-#*i}" != "$-" ]; then 
            . "$i"
        else
            . "$i" >/dev/null
        fi
    fi
done


# set jdk environment
export JAVA_HOME=/zwf/jdk1.8.0_45
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=$CLASSPATH:%{JAVA_HOME}/lib:%{JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH

# set hadoop environment
export HADOOP_HOME=/zwf/hadoop-2.7.7
export PATH=${JAVA_HOME}/bin:${HADOOP_HOME}/bin:${HADOOP_HOME}/sbin:$PATH
export HADOOP_HOME_WARN_SUPPRESS=1
export HADOOP_COMMON_LIB_NATIVE_DIR=${HADOOP_HOME}/lib/native
export HADOOP_OPTS="-Djava.library.path=${HADOOP_HOME}/lib/native"

# set hbase environment
export HBASE_HOME=/zwf/hbase-2.0.6
export PATH=$PATH:${HBASE_HOME}/bin
export CLASSPATH=$CLASSPATH:${HBASE_HOME}/lib/


unset i
unset -f pathmunge

/zwf/hbase-2.0.6/conf

 hbase-env.sh

#!/usr/bin/env bash
#
#/**
# * Licensed to the Apache Software Foundation (ASF) under one
# * or more contributor license agreements.  See the NOTICE file
# * distributed with this work for additional information
# * regarding copyright ownership.  The ASF licenses this file
# * to you under the Apache License, Version 2.0 (the
# * "License"); you may not use this file except in compliance
# * with the License.  You may obtain a copy of the License at
# *
# *     http://www.apache.org/licenses/LICENSE-2.0
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# */

# Set environment variables here.

# This script sets variables multiple times over the course of starting an hbase process,
# so try to keep things idempotent unless you want to take an even deeper look
# into the startup scripts (bin/hbase, etc.)

# The java implementation to use.  Java 1.8+ required.
# export JAVA_HOME=/usr/java/jdk1.8.0/

# Extra Java CLASSPATH elements.  Optional.
# export HBASE_CLASSPATH=

# The maximum amount of heap to use. Default is left to JVM default.
# export HBASE_HEAPSIZE=1G

# Uncomment below if you intend to use off heap cache. For example, to allocate 8G of 
# offheap, set the value to "8G".
# export HBASE_OFFHEAPSIZE=1G

# Extra Java runtime options.
# Below are what we set by default.  May only work with SUN JVM.
# For more on why as well as other possible settings,
# see http://hbase.apache.org/book.html#performance
export HBASE_OPTS="$HBASE_OPTS -XX:+UseConcMarkSweepGC"

# Uncomment one of the below three options to enable java garbage collection logging for the server-side processes.

# This enables basic gc logging to the .out file.
# export SERVER_GC_OPTS="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps"

# This enables basic gc logging to its own file.
# If FILE-PATH is not replaced, the log file(.gc) would still be generated in the HBASE_LOG_DIR .
# export SERVER_GC_OPTS="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:<FILE-PATH>"

# This enables basic GC logging to its own file with automatic log rolling. Only applies to jdk 1.6.0_34+ and 1.7.0_2+.
# If FILE-PATH is not replaced, the log file(.gc) would still be generated in the HBASE_LOG_DIR .
# export SERVER_GC_OPTS="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:<FILE-PATH> -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=1 -XX:GCLogFileSize=512M"

# Uncomment one of the below three options to enable java garbage collection logging for the client processes.

# This enables basic gc logging to the .out file.
# export CLIENT_GC_OPTS="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps"

# This enables basic gc logging to its own file.
# If FILE-PATH is not replaced, the log file(.gc) would still be generated in the HBASE_LOG_DIR .
# export CLIENT_GC_OPTS="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:<FILE-PATH>"

# This enables basic GC logging to its own file with automatic log rolling. Only applies to jdk 1.6.0_34+ and 1.7.0_2+.
# If FILE-PATH is not replaced, the log file(.gc) would still be generated in the HBASE_LOG_DIR .
# export CLIENT_GC_OPTS="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:<FILE-PATH> -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=1 -XX:GCLogFileSize=512M"

# See the package documentation for org.apache.hadoop.hbase.io.hfile for other configurations
# needed setting up off-heap block caching. 

# Uncomment and adjust to enable JMX exporting
# See jmxremote.password and jmxremote.access in $JRE_HOME/lib/management to configure remote password access.
# More details at: http://java.sun.com/javase/6/docs/technotes/guides/management/agent.html
# NOTE: HBase provides an alternative JMX implementation to fix the random ports issue, please see JMX
# section in HBase Reference Guide for instructions.

# export HBASE_JMX_BASE="-Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"
# export HBASE_MASTER_OPTS="$HBASE_MASTER_OPTS $HBASE_JMX_BASE -Dcom.sun.management.jmxremote.port=10101"
# export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS $HBASE_JMX_BASE -Dcom.sun.management.jmxremote.port=10102"
# export HBASE_THRIFT_OPTS="$HBASE_THRIFT_OPTS $HBASE_JMX_BASE -Dcom.sun.management.jmxremote.port=10103"
# export HBASE_ZOOKEEPER_OPTS="$HBASE_ZOOKEEPER_OPTS $HBASE_JMX_BASE -Dcom.sun.management.jmxremote.port=10104"
# export HBASE_REST_OPTS="$HBASE_REST_OPTS $HBASE_JMX_BASE -Dcom.sun.management.jmxremote.port=10105"

# File naming hosts on which HRegionServers will run.  $HBASE_HOME/conf/regionservers by default.
# export HBASE_REGIONSERVERS=${HBASE_HOME}/conf/regionservers

# Uncomment and adjust to keep all the Region Server pages mapped to be memory resident
#HBASE_REGIONSERVER_MLOCK=true
#HBASE_REGIONSERVER_UID="hbase"

# File naming hosts on which backup HMaster will run.  $HBASE_HOME/conf/backup-masters by default.
# export HBASE_BACKUP_MASTERS=${HBASE_HOME}/conf/backup-masters

# Extra ssh options.  Empty by default.
# export HBASE_SSH_OPTS="-o ConnectTimeout=1 -o SendEnv=HBASE_CONF_DIR"

# Where log files are stored.  $HBASE_HOME/logs by default.
# export HBASE_LOG_DIR=${HBASE_HOME}/logs

# Enable remote JDWP debugging of major HBase processes. Meant for Core Developers 
# export HBASE_MASTER_OPTS="$HBASE_MASTER_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8070"
# export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8071"
# export HBASE_THRIFT_OPTS="$HBASE_THRIFT_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8072"
# export HBASE_ZOOKEEPER_OPTS="$HBASE_ZOOKEEPER_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8073"

# A string representing this instance of hbase. $USER by default.
# export HBASE_IDENT_STRING=$USER

# The scheduling priority for daemon processes.  See 'man nice'.
# export HBASE_NICENESS=10

# The directory where pid files are stored. /tmp by default.
# export HBASE_PID_DIR=/var/hadoop/pids

# Seconds to sleep between slave commands.  Unset by default.  This
# can be useful in large clusters, where, e.g., slave rsyncs can
# otherwise arrive faster than the master can service them.
# export HBASE_SLAVE_SLEEP=0.1

# Tell HBase whether it should manage it's own instance of ZooKeeper or not.
# export HBASE_MANAGES_ZK=true

# The default log rolling policy is RFA, where the log file is rolled as per the size defined for the 
# RFA appender. Please refer to the log4j.properties file to see more details on this appender.
# In case one needs to do log rolling on a date change, one should set the environment property
# HBASE_ROOT_LOGGER to "<DESIRED_LOG LEVEL>,DRFA".
# For example:
# HBASE_ROOT_LOGGER=INFO,DRFA
# The reason for changing default to RFA is to avoid the boundary case of filling out disk space as 
# DRFA doesn't put any cap on the log size. Please refer to HBase-5655 for more context.


export JAVA_HOME=/zwf/jdk1.8.0_45
export HBASE_MANAGES_ZK=true
export HBASE_DISABLE_HADOOP_CLASSPATH_LOOKUP="true"
export HBASE_CLASSPATH=/zwf/hbase-2.0.6/lib
export LD_LIBRARY_PATH=${HADOOP_HOME}/lib/native/

hbase-site.xml

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!-- /** * * Licensed to the Apache Software Foundation (ASF) under one * 
	or more contributor license agreements. See the NOTICE file * distributed 
	with this work for additional information * regarding copyright ownership. 
	The ASF licenses this file * to you under the Apache License, Version 2.0 
	(the * "License"); you may not use this file except in compliance * with 
	the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 
	* * Unless required by applicable law or agreed to in writing, software * 
	distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT 
	WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the 
	License for the specific language governing permissions and * limitations 
	under the License. */ -->
<configuration>

	<property>
		<name>hbase.unsafe.stream.capability.enforce</name>
		<value>false</value>
	</property>

	<property>
		<name>hbase.cluster.distributed</name>
		<value>true</value>
	</property>

	<property>
		<name>hbase.master</name>
		<value>hadoop-master:16000</value>
	</property>

	<property>
		<name>hbase.master.port</name>
		<value>16000</value>
	</property>

	<property>
		<name>hbase.master.maxclockskew</name>
		<value>180000</value>
	</property>
	<property>
		<name>hbase.rootdir</name>
		<value>hdfs://hadoop-master:9000/hbase</value>
	</property>

	<property>
		<name>hbase.zookeeper.quorum</name>
		<value>hadoop-master,hadoop-node-02,hadoop-node-03</value>
	</property>

	<property>
		<name>hbase.tmp.dir</name>
		<value>/zwf_hbase/tmp</value>
	</property>

	<property>
		<name>hbase.zookeeper.property.dataDir</name>
		<value>/zwf_hbase/tmp/zookeeper</value>
	</property>

	<property>
		<name>zookeeper.session.timeout</name>
		<value>120000</value>
	</property>

	<property>
		<name>hbase.zookeeper.property.clientPort</name>
		<value>2181</value>
		<description>Property from ZooKeeper's config zoo.cfg. The port
			atwhich the clients will connect.
		</description>
	</property>

</configuration>

regionservers

hadoop-master
hadoop-node-02
hadoop-node-03

[root@hadoop-master conf]# source /etc/profile

[root@hadoop-master conf]# chmod -R 777 /zwf/hbase-2.0.6
[root@hadoop-master conf]# chmod -R 777 /zwf_hbase/tmp/zookeeper

[root@hadoop-master bin]# start-hbase.sh

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值