89 | | |
90 | | == HBase Local Mode == |
91 | | |
92 | | * 修改 /etc/hosts |
93 | | {{{ |
94 | | echo "127.0.0.1 localhost $(hostname)" > hosts |
95 | | sudo mv hosts /etc/hosts |
96 | | }}} |
97 | | * 產生 /opt/hbase/conf/hbase-site.xml |
98 | | {{{ |
99 | | cat > /opt/hbase/conf/hbase-site.xml << EOF |
100 | | <?xml version="1.0"?> |
101 | | <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> |
102 | | <configuration> |
103 | | <property> |
104 | | <name>hbase.rootdir</name> |
105 | | <value>hdfs://localhost:9000/hbase</value> |
106 | | </property> |
107 | | </configuration> |
108 | | EOF |
109 | | }}} |
110 | | * 啟動 Hadoop 與 HBase |
111 | | {{{ |
112 | | /opt/hadoop/bin/start-all.sh |
113 | | /opt/hbase/bin/start-hbase.sh |
114 | | }}} |
115 | | * 檢查 jps 是否有 NameNode 等 java process,以及 HMaster 與 HQuorumPeer,正常應該要有以下的 java process (PID 可能不同) |
116 | | {{{ |
117 | | 13019 HMaster |
118 | | 10513 NameNode |
119 | | 10838 SecondaryNameNode |
120 | | 12952 HQuorumPeer |
121 | | 10916 JobTracker |
122 | | 13312 Jps |
123 | | 11068 TaskTracker |
124 | | 10676 DataNode |
125 | | }}} |