Hbase fully distributed construction

1. Build and prepare JDK, install Hadoop cluster, install Hbase installation package

2. SSH password-free login: linux1 password-free login to all machines, linux2 password-free login to all machines linux1====>linux1, linux2, linux3linux2====>linux1, linux2, linux33. Hbase configuration file configuration 1 ). Modify and add configuration items in hbase-env.sh: JDK path configuration: export JAVA_HOME=/app/jdk If you have completed HDFS client configuration changes on the Hadoop cluster, such as HDFS client configuration instructions, instead of server side configuration, then you must enable HBase to view and use these configuration changes: export HBASE_CLASSPATH=/app/hadoop/etc/hadoop

Use external zk configuration: export HBASE_MANAGES_ZK=false

2). The configuration of hbase-site.xml sets hbase to be distributed. Set the storage location of Hbase data. The port number should be the same as the port number configured by hadoop. Set the access directory of zk. configure this)

3). Configuration of Regionservers: add all HregionServer nodes in regionservers, linu1, linux2, linux3vim /app/hbase-1.2.5/conf/regionservers

4). Configuration of backup-masters: Modify the backup-masters file and add the backup HMaster machine name.vim /app/hbase-1.2.5/conf/backup-masters

Distribute the configured Hbase to linux2 and linux3, and configure the environment variables vim /etc/profile of hbase and zookeeper on the three machines

4. The configuration of zookeeper (all three must be configured) copy the default configuration file to the zoo.cfg file cp /app/zookeeper/conf/zoo.sample.cfg /app/zookeeper/conf/zoo.cfg to see if the copy is successful ll / app/zookeeper/conf

Modify the configuration file vim /app/zookeeper/conf/zoo.cfg mainly to modify the storage location of the zk file, the id and communication port of the zk cluster service

Create a myid file in the /opt/zookeeper/ directory. The contents are 1 under linux1, 2 under linux2, 35 under linux3. Start the hadoop cluster and start ZK on the three machines

6. Use the command start-hbase.sh to start the hbase service

7. Connect to hbase service: hbase shell

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325930227&siteId=291194637