{"id":226,"date":"2024-06-29T15:22:32","date_gmt":"2024-06-29T07:22:32","guid":{"rendered":"https:\/\/abytelalala.cn\/?p=226"},"modified":"2024-07-03T18:27:30","modified_gmt":"2024-07-03T10:27:30","slug":"%e4%b8%80%e9%94%ae%e9%83%a8%e7%bd%b2%e5%90%8e%e5%90%af%e5%8a%a8%e6%96%b9%e5%bc%8f","status":"publish","type":"post","link":"https:\/\/abytelalala.cn\/index.php\/2024\/06\/29\/%e4%b8%80%e9%94%ae%e9%83%a8%e7%bd%b2%e5%90%8e%e5%90%af%e5%8a%a8%e6%96%b9%e5%bc%8f\/","title":{"rendered":"\u4e00\u952e\u90e8\u7f72\u540e\u542f\u52a8\u65b9\u5f0f"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\" id=\"header-id-25\">\u4fee\u653902\uff0c03\u673a\u5668\u4e0a\u7684myid<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>docker start hadoop01 hadoop02 hadoop03\n\ndocker exec -it hadoop01 bash\nexit\n\ndocker exec -it hadoop02 bash \/\/\u5206\u522b\u5728\u4e0d\u540c\u7ec8\u7aef\u8fd0\u884c\ncd \/usr\/local\/zookeeper\/data\nnano myid\n\u5c06\u5176myid\u5185\u5bb9\u4fee\u6539\u4e3a2\nexit\n\ndocker exec -it hadoop03 bash \/\/\u5206\u522b\u5728\u4e0d\u540c\u7ec8\u7aef\u8fd0\u884c\ncd \/usr\/local\/zookeeper\/data\nnano myid\n\u5c06\u5176myid\u5185\u5bb9\u4fee\u6539\u4e3a3\nexit<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"header-id-26\">\u4fee\u6539hosts\u6587\u4ef6<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>docker exec -it hadoop01 bash\ndocker exec -it hadoop02 bash\ndocker exec -it hadoop03 bash\n\/\/\u8fdb\u5165\u7ec8\u7aef\u540e\nsu - \/\/\u8fdb\u5165\u4e00\u4e0broot\u6743\u9650\u4e0d\u7136\u4e00\u4f1a\u73af\u5883\u53d8\u91cf\u7528\u4e0d\u4e86<\/code><\/pre>\n\n\n\n<p>\u4e09\u4e2a\u7ec8\u7aef\u90fd\u8f93\u5165\u5982\u4e0b<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nano \/etc\/hosts\n\/\/\u4fee\u6539ip\u548c\u4e3b\u673a\u6620\u5c04\u5173\u7cfb\u4e3a\u5982\u4e0b\u5185\u5bb9\n172.17.0.2      hadoop01\n172.17.0.3      hadoop02\n172.17.0.4      hadoop03<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"header-id-27\">\u4e09\u4e2a\u673a\u5668\u4e92\u76f8ssh<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/\u4e09\u4e2a\u7ec8\u7aef\u90fd\u8981\u6253\u8fd9\u51e0\u884c\u547d\u4ee4\n\/\/\u6ce8\u610f\u5728\u4ea4\u4e92\u8fc7\u7a0b\u8981\u8f93\u5165yes\u5168\u90e8\u4e09\u4e2a\u5b57\u6bcd\uff0c\u4e0d\u8981\u53ea\u8bf4\u4e00\u4e2ay\nservice ssh start\nssh hadoop01\nexit\nssh hadoop02\nexit\nssh hadoop03\nexit<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"header-id-28\">\u542f\u52a8<\/h2>\n\n\n\n<p>\u5148\u542f\u52a8hadoop\u96c6\u7fa4<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>su -\nhdfs namenode -format \/\/\u521d\u59cb\u5316\nstart-all.sh \/\/\u542f\u52a8\njps \/\/\u67e5\u770b\u4e00\u4e0b\n\u7ed3\u679c\uff1a\nroot@hadoop01:~# jps\n816 ResourceManager\n1393 Jps\n299 NameNode\n477 DataNode\n990 NodeManager<\/code><\/pre>\n\n\n\n<p>zookeeper\u542f\u52a8\u9700\u8981\u4e09\u53f0\u673a\u5668\u90fd\u542f\u52a8\uff0c\u505c\u6b62\u4e5f\u662f\u5206\u522b\u505c\u6b62\uff0c\u4e09\u53f0\u673a\u5668\u90fd\u542f\u52a8\u624d\u80fd\u770b\u89c1\u72b6\u6001<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>su -\nzkServer.sh start\nzkServer.sh status \/\/\u9700\u8981\u4e09\u53f0\u90fd\u542f\u52a8\u540e\u518d\u67e5\u770b\u72b6\u6001<\/code><\/pre>\n\n\n\n<p>hbase\u542f\u52a8\u5728hadoop01\u4e0a\u542f\u52a8\u5c31\u884c\u4e86<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>su -\nstart-hbase.sh\nhbase shell \/\/\u8fdb\u5165\u63a7\u5236\u53f0\ncreate 'c','d'\nlist \/\/\u5c55\u793a\u521a\u521a\u5efa\u7acb\u7684\u8868\nexit\nhbase-daemon.sh start thrift \/\/\u542f\u52a8thrift\u670d\u52a1\uff0cpython\u53ef\u4ee5\u8fde\u63a5<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>\u6700\u540e\u7684\u7ed3\u679c\u5e94\u8be5\u662f\u8fd9\u4e9b\nroot@hadoop01:~# jps\n4705 NameNode\n2354 DataNode\n6786 ThriftServer\n5188 ResourceManager\n5832 QuorumPeerMain\n6058 HMaster\n6203 HRegionServer\n3021 NodeManager\n6893 Jps<\/code><\/pre>\n\n\n\n<p>\u542f\u52a8spark<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/usr\/local\/spark\/sbin\/start-all.sh --webui-port 8081<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u4fee\u653902\uff0c03\u673a\u5668\u4e0a\u7684myid \u4fee\u6539hosts\u6587\u4ef6 \u4e09\u4e2a\u7ec8\u7aef\u90fd\u8f93\u5165\u5982\u4e0b \u4e09\u4e2a\u673a\u5668\u4e92\u76f8ssh \u542f\u52a8 \u5148\u542f\u52a8had [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[10,11,15,14,16],"class_list":["post-226","post","type-post","status-publish","format-standard","hentry","category-8","tag-docker","tag-hadoop","tag-hbase","tag-spark","tag-zookeeper"],"_links":{"self":[{"href":"https:\/\/abytelalala.cn\/index.php\/wp-json\/wp\/v2\/posts\/226","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/abytelalala.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/abytelalala.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/abytelalala.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/abytelalala.cn\/index.php\/wp-json\/wp\/v2\/comments?post=226"}],"version-history":[{"count":2,"href":"https:\/\/abytelalala.cn\/index.php\/wp-json\/wp\/v2\/posts\/226\/revisions"}],"predecessor-version":[{"id":228,"href":"https:\/\/abytelalala.cn\/index.php\/wp-json\/wp\/v2\/posts\/226\/revisions\/228"}],"wp:attachment":[{"href":"https:\/\/abytelalala.cn\/index.php\/wp-json\/wp\/v2\/media?parent=226"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/abytelalala.cn\/index.php\/wp-json\/wp\/v2\/categories?post=226"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/abytelalala.cn\/index.php\/wp-json\/wp\/v2\/tags?post=226"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}