hbase-0.98.2-hadoop2安裝

thamsyangsw發表於2014-07-16
該安裝基於hadoop2.4.1版本,hadoop安裝參考:
hadoop2.4.1完全分散式安裝 :http://blog.itpub.net/26613085/viewspace-1219710/

環境介紹
Hostname IP Hadoop-role Hbase-role
master 100.12.56.228 NameNode/ResourceManager Master
slave-1 100.12.56.221 DataNode/NodeManager RegionServer
slave-2 100.12.56.222 DataNode/NodeManager RegionServer
slave-3 100.12.56.223 DataNode/NodeManager RegionServer
slave-4 100.12.56.224 DataNode/NodeManager RegionServer
slave-5 100.12.56.227 DataNode/NodeManager RegionServer

[hadoop@master ~]$ id
uid=500(hadoop) gid=500(hadoop) groups=500(hadoop)
[hadoop@master ~]$ pwd
/home/hadoop
[hadoop@master ~]$ ll
total 215964
drwxrwxr-x  4 hadoop hadoop      4096 Jul 15 22:42 dfs
drwxr-xr-x 10 hadoop hadoop      4096 Jul 15 23:30 hadoop-2.4.1
-rwxrwxrwx  1 root   root   138656756 Jul 15 17:12 hadoop-2.4.1.tar.gz
-rwxrwxrwx  1 hadoop hadoop  82246622 Jul 16 23:22 hbase-0.98.2-hadoop2-bin.tar.gz
drwxrwxr-x  3 hadoop hadoop      4096 Jul 15 23:30 tmp

[hadoop@master ~]$ tar -zxvf hbase-0.98.2-hadoop2-bin.tar.gz
[hadoop@master ~]$ ll
total 215968
drwxrwxr-x  4 hadoop hadoop      4096 Jul 15 22:42 dfs
drwxr-xr-x 10 hadoop hadoop      4096 Jul 15 23:30 hadoop-2.4.1
-rwxrwxrwx  1 root   root   138656756 Jul 15 17:12 hadoop-2.4.1.tar.gz
drwxrwxr-x  7 hadoop hadoop      4096 May  1 11:30 hbase-0.98.2-hadoop2
-rwxrwxrwx  1 hadoop hadoop  82246622 Jul 16 23:22 hbase-0.98.2-hadoop2-bin.tar.gz
drwxrwxr-x  3 hadoop hadoop      4096 Jul 15 23:30 tmp
[hadoop@master ~]$ su - root
Password:
[root@master ~]# vi /etc/profile(該操作在所有節點執行)
export HBASE_HOME=/home/hadoop/hbase-0.98.2-hadoop2
export PATH=$HBASE_HOME/bin:$PATH
[root@master ~]# exit
[hadoop@master ~]$ cd hbase-0.98.2-hadoop2/conf
[hadoop@master conf]$ ll
total 32
-rw-r--r-- 1 hadoop hadoop 1026 May  1 09:08 hadoop-metrics2-hbase.properties
-rw-r--r-- 1 hadoop hadoop 4023 May  1 09:08 hbase-env.cmd
-rw-r--r-- 1 hadoop hadoop 7014 May  1 09:08 hbase-env.sh
-rw-r--r-- 1 hadoop hadoop 2257 May  1 09:08 hbase-policy.xml
-rw-r--r-- 1 hadoop hadoop  934 May  1 09:08 hbase-site.xml
-rw-r--r-- 1 hadoop hadoop 3451 May  1 09:08 log4j.properties
-rw-r--r-- 1 hadoop hadoop   10 May  1 09:08 regionservers
[hadoop@master conf]$ vi hbase-env.sh
export JAVA_HOME=/usr/java/jdk1.7.0_51
[hadoop@master conf]$ vi hbase-site.xml

 
    hbase.rootdir
    hdfs://master:8020/hbase
 

 
    hbase.cluster.distributed
    true
 

 
    hbase.zookeeper.quorum
    master,slave-1,slave-2,slave-3,slave-4,slave-5
 

 
    hbase.zookeeper.property.dataDir
    /home/hadoop/zookeeper
 

[hadoop@master conf]$ hadoop fs -mkdir /hbase
14/07/16 23:52:22 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
[hadoop@master conf]$ hadoop fs -ls /
14/07/16 23:53:12 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Found 1 items
drwxr-xr-x   - hadoop supergroup          0 2014-07-16 23:52 /hbase
[hadoop@master conf]$ vi regionservers
slave-1
slave-2
slave-3
slave-4
slave-5
[hadoop@master ~]$ scp -r hbase-0.98.2-hadoop2 slave-1:/home/hadoop
[hadoop@master ~]$ scp -r hbase-0.98.2-hadoop2 slave-2:/home/hadoop
[hadoop@master ~]$ scp -r hbase-0.98.2-hadoop2 slave-3:/home/hadoop
[hadoop@master ~]$ scp -r hbase-0.98.2-hadoop2 slave-4:/home/hadoop
[hadoop@master ~]$ scp -r hbase-0.98.2-hadoop2 slave-5:/home/hadoop
[hadoop@master ~]$ cd hbase-0.98.2-hadoop2
[hadoop@master hbase-0.98.2-hadoop2]$ cd bin
[hadoop@master bin]$ ll
total 176
-rwxr-xr-x 1 hadoop hadoop  1652 May  1 09:08 get-active-master.rb
-rwxr-xr-x 1 hadoop hadoop  4952 May  1 09:08 graceful_stop.sh
-rwxr-xr-x 1 hadoop hadoop 12424 May  1 09:08 hbase
-rwxr-xr-x 1 hadoop hadoop  4358 May  1 09:08 hbase-cleanup.sh
-rw-rw-r-- 1 hadoop hadoop 12623 May  1 09:08 hbase.cmd
-rwxr-xr-x 1 hadoop hadoop  1537 May  1 09:08 hbase-common.sh
-rw-rw-r-- 1 hadoop hadoop  2363 May  1 09:08 hbase-config.cmd
-rwxr-xr-x 1 hadoop hadoop  5114 May  1 09:08 hbase-config.sh
-rwxr-xr-x 1 hadoop hadoop  8113 May  1 09:08 hbase-daemon.sh
-rwxr-xr-x 1 hadoop hadoop  1659 May  1 09:08 hbase-daemons.sh
-rwxr-xr-x 1 hadoop hadoop   876 May  1 09:08 hbase-jruby
-rwxr-xr-x 1 hadoop hadoop  5640 May  1 09:08 hirb.rb
-rwxr-xr-x 1 hadoop hadoop  1774 May  1 09:08 local-master-backup.sh
-rwxr-xr-x 1 hadoop hadoop  1829 May  1 09:08 local-regionservers.sh
-rwxr-xr-x 1 hadoop hadoop  2325 May  1 09:08 master-backup.sh
-rwxr-xr-x 1 hadoop hadoop 17006 May  1 09:08 region_mover.rb
-rwxr-xr-x 1 hadoop hadoop  2435 May  1 09:08 regionservers.sh
-rwxr-xr-x 1 hadoop hadoop  4696 May  1 09:08 region_status.rb
drwxr-xr-x 2 hadoop hadoop  4096 May  1 11:31 replication
-rwxr-xr-x 1 hadoop hadoop  5765 May  1 09:08 rolling-restart.sh
-rw-rw-r-- 1 hadoop hadoop  2262 May  1 09:08 start-hbase.cmd
-rwxr-xr-x 1 hadoop hadoop  2040 May  1 09:08 start-hbase.sh
-rw-rw-r-- 1 hadoop hadoop  1752 May  1 09:08 stop-hbase.cmd
-rwxr-xr-x 1 hadoop hadoop  2290 May  1 09:08 stop-hbase.sh
drwxr-xr-x 2 hadoop hadoop  4096 May  1 11:31 test
-rwxr-xr-x 1 hadoop hadoop  1537 May  1 09:08 thread-pool.rb
-rwxr-xr-x 1 hadoop hadoop  1924 May  1 09:08 zookeepers.sh
[hadoop@master bin]$ ./start-hbase.sh
slave-2: starting zookeeper, logging to /home/hadoop/hbase-0.98.2-hadoop2/bin/../logs/hbase-hadoop-zookeeper-slave-2.out
slave-1: starting zookeeper, logging to /home/hadoop/hbase-0.98.2-hadoop2/bin/../logs/hbase-hadoop-zookeeper-slave-1.out
master: starting zookeeper, logging to /home/hadoop/hbase-0.98.2-hadoop2/bin/../logs/hbase-hadoop-zookeeper-master.out
slave-3: starting zookeeper, logging to /home/hadoop/hbase-0.98.2-hadoop2/bin/../logs/hbase-hadoop-zookeeper-slave-3.out
slave-4: starting zookeeper, logging to /home/hadoop/hbase-0.98.2-hadoop2/bin/../logs/hbase-hadoop-zookeeper-slave-4.out
slave-5: starting zookeeper, logging to /home/hadoop/hbase-0.98.2-hadoop2/bin/../logs/hbase-hadoop-zookeeper-slave-5.out
starting master, logging to /home/hadoop/hbase-0.98.2-hadoop2/logs/hbase-hadoop-master-master.out
slave-1: starting regionserver, logging to /home/hadoop/hbase-0.98.2-hadoop2/bin/../logs/hbase-hadoop-regionserver-slave-1.out
slave-2: starting regionserver, logging to /home/hadoop/hbase-0.98.2-hadoop2/bin/../logs/hbase-hadoop-regionserver-slave-2.out
slave-5: starting regionserver, logging to /home/hadoop/hbase-0.98.2-hadoop2/bin/../logs/hbase-hadoop-regionserver-slave-5.out
slave-3: starting regionserver, logging to /home/hadoop/hbase-0.98.2-hadoop2/bin/../logs/hbase-hadoop-regionserver-slave-3.out
slave-4: starting regionserver, logging to /home/hadoop/hbase-0.98.2-hadoop2/bin/../logs/hbase-hadoop-regionserver-slave-4.out

[hadoop@master bin]$ jps
18083 HQuorumPeer
18322 Jps
8981 SecondaryNameNode
9132 ResourceManager
18144 HMaster
8783 NameNode
[hadoop@slave-1 ~]$ jps(在RegionServer節點上執行)
11030 HQuorumPeer
6910 DataNode
7033 NodeManager
11206 Jps

[hadoop@master ~]$ hbase shell
2014-07-17 00:32:40,081 INFO  [main] Configuration.deprecation: hadoop.native.lib is deprecated. Instead, use io.native.lib.available
HBase Shell; enter 'help' for list of supported commands.
Type "exit" to leave the HBase Shell
Version 0.98.2-hadoop2, r1591526, Wed Apr 30 20:17:33 PDT 2014

hbase(main):001:0>
至此,hbase安裝成功。



 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26613085/viewspace-1220611/,如需轉載,請註明出處,否則將追究法律責任。

相關文章