{"id":42454,"date":"2024-10-03T13:47:39","date_gmt":"2024-10-03T05:47:39","guid":{"rendered":"https:\/\/server.hk\/cnblog\/42454\/"},"modified":"2024-10-03T13:47:39","modified_gmt":"2024-10-03T05:47:39","slug":"centos-6-4-%e4%b8%8b-hbase-%e9%9b%86%e7%be%a4%e5%ae%89%e8%a3%9d","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/42454\/","title":{"rendered":"CentOS 6.4 \u4e0b HBase \u96c6\u7fa4\u5b89\u88dd"},"content":{"rendered":"<h1 id=\"centos-6-4-%e4%b8%8b-hbase-%e9%9b%86%e7%be%a4%e5%ae%89%e8%a3%9d-dQpSswFIEy\">CentOS 6.4 \u4e0b HBase \u96c6\u7fa4\u5b89\u88dd<\/h1>\n<p>Apache HBase \u662f\u4e00\u500b\u958b\u6e90\u7684\u5206\u4f48\u5f0f\u3001\u53ef\u64f4\u5c55\u7684 NoSQL \u6578\u64da\u5eab\uff0c\u5c08\u70ba\u5927\u6578\u64da\u61c9\u7528\u800c\u8a2d\u8a08\u3002\u5b83\u57fa\u65bc Hadoop \u7684 HDFS\uff08Hadoop Distributed File System\uff09\u69cb\u5efa\uff0c\u80fd\u5920\u8655\u7406\u5927\u91cf\u7684\u6578\u64da\u4e26\u63d0\u4f9b\u96a8\u6a5f\u8b80\u5beb\u7684\u80fd\u529b\u3002\u5728\u9019\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u5011\u5c07\u63a2\u8a0e\u5982\u4f55\u5728 CentOS 6.4 \u4e0a\u5b89\u88dd HBase \u96c6\u7fa4\uff0c\u4e26\u63d0\u4f9b\u8a73\u7d30\u7684\u6b65\u9a5f\u548c\u6ce8\u610f\u4e8b\u9805\u3002<\/p>\n<h2 id=\"%e5%89%8d%e6%9c%9f%e6%ba%96%e5%82%99-dQpSswFIEy\">\u524d\u671f\u6e96\u5099<\/h2>\n<p>\u5728\u958b\u59cb\u5b89\u88dd\u4e4b\u524d\uff0c\u60a8\u9700\u8981\u78ba\u4fdd\u4ee5\u4e0b\u5e7e\u9ede\uff1a<\/p>\n<ul>\n<li>\u5df2\u5b89\u88dd Java 1.7 \u6216\u66f4\u9ad8\u7248\u672c\u3002<\/li>\n<li>\u5df2\u5b89\u88dd Hadoop\uff0c\u4e26\u4e14 Hadoop \u96c6\u7fa4\u5df2\u7d93\u6b63\u5e38\u904b\u884c\u3002<\/li>\n<li>\u78ba\u4fdd\u6240\u6709\u7bc0\u9ede\u4e4b\u9593\u7684\u7db2\u7d61\u9023\u63a5\u6b63\u5e38\u3002<\/li>\n<li>\u8a2d\u7f6e SSH \u7121\u5bc6\u78bc\u767b\u9304\uff0c\u4ee5\u4fbf\u65bc\u7bc0\u9ede\u4e4b\u9593\u7684\u901a\u4fe1\u3002<\/li>\n<\/ul>\n<h2 id=\"%e5%ae%89%e8%a3%9d-hbase-dQpSswFIEy\">\u5b89\u88dd HBase<\/h2>\n<p>\u4ee5\u4e0b\u662f\u5b89\u88dd HBase \u7684\u6b65\u9a5f\uff1a<\/p>\n<h3 id=\"1-%e4%b8%8b%e8%bc%89-hbase-dQpSswFIEy\">1. \u4e0b\u8f09 HBase<\/h3>\n<p>\u9996\u5148\uff0c\u60a8\u9700\u8981\u5f9e Apache \u5b98\u65b9\u7db2\u7ad9\u4e0b\u8f09 HBase \u7684\u6700\u65b0\u7248\u672c\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre><code>wget https:\/\/archive.apache.org\/dist\/hbase\/2.4.9\/hbase-2.4.9-bin.tar.gz<\/code><\/pre>\n<h3 id=\"2-%e8%a7%a3%e5%a3%93%e7%b8%ae-hbase-dQpSswFIEy\">2. \u89e3\u58d3\u7e2e HBase<\/h3>\n<p>\u4e0b\u8f09\u5b8c\u6210\u5f8c\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u89e3\u58d3\u7e2e\uff1a<\/p>\n<pre><code>tar -zxvf hbase-2.4.9-bin.tar.gz<\/code><\/pre>\n<h3 id=\"3-%e9%85%8d%e7%bd%ae%e7%92%b0%e5%a2%83%e8%ae%8a%e9%87%8f-dQpSswFIEy\">3. \u914d\u7f6e\u74b0\u5883\u8b8a\u91cf<\/h3>\n<p>\u7de8\u8f2f\u60a8\u7684 .bashrc \u6587\u4ef6\uff0c\u6dfb\u52a0 HBase \u7684\u74b0\u5883\u8b8a\u91cf\uff1a<\/p>\n<pre><code>echo 'export HBASE_HOME=\/path\/to\/hbase-2.4.9' &gt;&gt; ~\/.bashrc\necho 'export PATH=$PATH:$HBASE_HOME\/bin' &gt;&gt; ~\/.bashrc\nsource ~\/.bashrc<\/code><\/pre>\n<h3 id=\"4-%e9%85%8d%e7%bd%ae-hbase-dQpSswFIEy\">4. \u914d\u7f6e HBase<\/h3>\n<p>\u5728 HBase \u7684\u914d\u7f6e\u76ee\u9304\u4e2d\uff0c\u7de8\u8f2f <code>hbase-site.xml<\/code> \u6587\u4ef6\uff0c\u6dfb\u52a0\u4ee5\u4e0b\u914d\u7f6e\uff1a<\/p>\n<pre><code>&lt;configuration&gt;\n    &lt;property&gt;\n        &lt;name&gt;hbase.rootdir&lt;\/name&gt;\n        &lt;value&gt;hdfs:\/\/namenode:9000\/hbase&lt;\/value&gt;\n    &lt;\/property&gt;\n    &lt;property&gt;\n        &lt;name&gt;hbase.zookeeper.quorum&lt;\/name&gt;\n        &lt;value&gt;zookeeper1,zookeeper2,zookeeper3&lt;\/value&gt;\n    &lt;\/property&gt;\n&lt;\/configuration&gt;<\/code><\/pre>\n<p>\u78ba\u4fdd\u5c07 <code>namenode<\/code> \u548c <code>zookeeper<\/code> \u7684\u5730\u5740\u66ff\u63db\u70ba\u60a8\u7684\u5be6\u969b\u5730\u5740\u3002<\/p>\n<h3 id=\"5-%e5%95%9f%e5%8b%95-hbase-dQpSswFIEy\">5. \u555f\u52d5 HBase<\/h3>\n<p>\u5728 HBase \u7684\u5b89\u88dd\u76ee\u9304\u4e2d\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u555f\u52d5 HBase\uff1a<\/p>\n<pre><code>.\/bin\/start-hbase.sh<\/code><\/pre>\n<h2 id=\"%e9%a9%97%e8%ad%89%e5%ae%89%e8%a3%9d-dQpSswFIEy\">\u9a57\u8b49\u5b89\u88dd<\/h2>\n<p>\u555f\u52d5 HBase \u5f8c\uff0c\u60a8\u53ef\u4ee5\u901a\u904e\u8a2a\u554f HBase \u7684 Web \u754c\u9762\u4f86\u9a57\u8b49\u5b89\u88dd\u662f\u5426\u6210\u529f\u3002\u9ed8\u8a8d\u60c5\u6cc1\u4e0b\uff0cHBase \u7684 Web \u754c\u9762\u904b\u884c\u5728 <code>http:\/\/localhost:16010<\/code>\u3002<\/p>\n<h2 id=\"%e6%b3%a8%e6%84%8f%e4%ba%8b%e9%a0%85-dQpSswFIEy\">\u6ce8\u610f\u4e8b\u9805<\/h2>\n<ul>\n<li>\u78ba\u4fdd Zookeeper \u6b63\u5728\u904b\u884c\uff0c\u56e0\u70ba HBase \u4f9d\u8cf4\u65bc Zookeeper \u4f86\u9032\u884c\u96c6\u7fa4\u7ba1\u7406\u3002<\/li>\n<li>\u5728\u751f\u7522\u74b0\u5883\u4e2d\uff0c\u5efa\u8b70\u4f7f\u7528\u591a\u500b RegionServer \u4f86\u63d0\u9ad8\u6027\u80fd\u548c\u53ef\u7528\u6027\u3002<\/li>\n<li>\u5b9a\u671f\u6aa2\u67e5 HBase \u7684\u65e5\u8a8c\u6587\u4ef6\uff0c\u4ee5\u4fbf\u53ca\u6642\u767c\u73fe\u548c\u89e3\u6c7a\u554f\u984c\u3002<\/li>\n<\/ul>\n<h2 id=\"%e7%b8%bd%e7%b5%90-dQpSswFIEy\">\u7e3d\u7d50<\/h2>\n<p>\u5728 CentOS 6.4 \u4e0a\u5b89\u88dd HBase \u96c6\u7fa4\u7684\u904e\u7a0b\u76f8\u5c0d\u7c21\u55ae\uff0c\u53ea\u9700\u9075\u5faa\u4e0a\u8ff0\u6b65\u9a5f\u5373\u53ef\u5b8c\u6210\u3002HBase \u63d0\u4f9b\u4e86\u5f37\u5927\u7684\u6578\u64da\u5b58\u5132\u548c\u6aa2\u7d22\u80fd\u529b\uff0c\u9069\u5408\u8655\u7406\u5927\u898f\u6a21\u6578\u64da\u96c6\u3002\u5982\u679c\u60a8\u9700\u8981\u7a69\u5b9a\u7684 <a href=\"https:\/\/server.hk\">\u9999\u6e2f VPS<\/a> \u4f86\u904b\u884c HBase\uff0c\u8acb\u8003\u616e\u9078\u64c7\u5408\u9069\u7684\u670d\u52d9\u63d0\u4f9b\u5546\u4ee5\u78ba\u4fdd\u6700\u4f73\u6027\u80fd\u548c\u652f\u6301\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learn how to install an HBase cluster on CentOS 6.4 with step-by-step instructions for optimal performance and configuration.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4924],"tags":[],"class_list":["post-42454","post","type-post","status-publish","format-standard","hentry","category-setup-tutorials"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/42454","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=42454"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/42454\/revisions"}],"predecessor-version":[{"id":42455,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/42454\/revisions\/42455"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=42454"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=42454"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=42454"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}