Hadoop 2.6+Zookper3.4+Hbase 1.0 Deployment and Installation

Keywords: Database HBase Zookeeper Hadoop Apache

Following hadoop fully distributed installation After that, zookper+hbase security is combined.
Continue with the previous environment configuration.

I. zookper Installation

1.1 Download and Unzip Software

cd /software
wget -c http://apache.fayea.com/zookeeper/zookeeper-3.4.10/zookeeper-3.4.10.tar.gz
tar -zxf zookeeper-3.4.10.tar.gz -C /usr/local/
ln -sv /usr/local/zookeeper-3.4.10/ /usr/local/zookeeper
echo 

1.2 Modify configuration file

Detailed configuration file parameters are available for reference zookeeper parameter

cat > /usr/local/zookeeper/conf/zoo.cfg<<EOF
tickTime=2000 
initLimit=10
syncLimit=5
dataDir=/usr/local/zookeeper/data
datalogDir=/usr/local/zookeeper/logs
clientPort=2181
server.1=172.20.2.203:2888:3888
server.2=172.20.2.203:2888:3888
server.3=172.20.2.203:2888:3888
EOF

1.3 Create directories to add environment variables

mkdir -p /usr/local/zookeeper/{data,logs}
echo "1">/usr/local/zookeeper/data/myid
chown hadoop.hadoop /usr/local/zookeeper/ -R
cat >/etc/profile.d/zookeeper.sh<<EOF
export PATH=\$PATH:/usr/local/zookeeper/bin
EOF
source /etc/profile.d/zookeeper.sh

1.4 Configure other servers in the same way

You can distribute files to hadoop-2/3 and need to modify myid to 2/3

1.5 Startup Services

zkServer.sh start startup service
zkServer.sh status view server status

2. hbase installation

2.1 Download and Unzip Software

cd /software 
wget -c http://archive.apache.org/dist/hbase/1.0.1.1/hbase-1.0.1.1-bin.tar.gz
tar -zxf hbase-1.0.1.1-bin.tar.gz -C /usr/local/
mkdir -p /usr/local/hbase/logs
ln -sv /usr/local/hbase-1.0.1.1/ /usr/local/hbase
chown hadoop.hadoop /usr/local/hbase-1.0.1.1/ -R

2.2 Modify configuration files

Modify hbase-env.sh Adding java environment variables and using external zookeeper for life

cat >/usr/local/hbase/conf/hbase-env.sh<<EOF
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-3.b10.el6_9.x86_64
export HBASE_LOG_DIR=/usr/local/hbase/logs
export HBASE_MANAGES_ZK=false
EOF

Modify hbase-site.xml to add the storage path of HBase on HDFS

cat >/usr/local/hbase/conf/hbase-site.xml<<EOF
<configuration>  
    <!-- Appoint hbase stay HDFS Upper Storage Path -->  
       <property>  
               <name>hbase.rootdir</name>  
               <value>hdfs://hadoop-1:8020/data</value>      
       </property>  
    <!-- Appoint hbase It's distributed. -->  
       <property>  
               <name>hbase.cluster.distributed</name>  
               <value>true</value>  
       </property>  
    <!-- Appoint zk Address, multiple use“,"Division -->  
       <property>  
               <name>hbase.zookeeper.quorum</name>  
               <value>hadoop-1,hadoop-2,hadoop-3</value>  
       </property>  
       <property>  
               <name>hbase.master.info.port</name>  
               <value>60010</value>  
       </property>  
</configuration>  
EOF

Modify regionservers

cat>/usr/local/hbase/conf/regionservers<<EOF
hadoop-2
hadoop-3
EOF

2.3 Adding environment variables

cat >/etc/profile.d/hbase.sh<<EOF
export PATH=\$PATH:/usr/local/hbase/bin
EOF
source /etc/profile.d/hbase.sh

2.3 Configure other servers and start services in the same way

You can distribute files to hadoop-2/3 and need to modify myid to 2/3
Start the service start-hbase.sh


2.3 web Page View

2.4 hbase shell test



Note: Start-stop sequence of services
Service startup: Hadoop - > zookeeper - > HBase
Service Stop: HBase - > zookeeper - > Hadoop

Posted by berrberr on Thu, 31 Jan 2019 14:30:16 -0800