{"id":141,"date":"2019-09-20T00:50:14","date_gmt":"2019-09-19T16:50:14","guid":{"rendered":"http:\/\/www.mimiq.com.cn\/?p=141"},"modified":"2019-10-07T01:16:08","modified_gmt":"2019-10-06T17:16:08","slug":"deepops%e5%b0%8f%e7%ac%94%e8%ae%b0-ubuntu-18-04-3%e7%8e%af%e5%a2%83%e4%b8%8bhadoop3-1-2%e7%9a%84%e5%ae%89%e8%a3%85%e4%b8%8e%e9%85%8d%e7%bd%ae","status":"publish","type":"post","link":"http:\/\/www.mimiq.com.cn\/?p=141","title":{"rendered":"DeepOps\u5c0f\u7b14\u8bb0-ubuntu-18.04.3\u73af\u5883\u4e0bhadoop3.1.2\u7684\u5b89\u88c5\u4e0e\u914d\u7f6e"},"content":{"rendered":"\n<blockquote class=\"wp-block-quote\"><p>\u53c2\u8003\u6587\u6863\uff1a<\/p><p><a href=\"https:\/\/hadoop.apache.org\/docs\/r3.1.2\/hadoop-project-dist\/hadoop-common\/SingleCluster.html\">https:\/\/hadoop.apache.org\/docs\/r3.1.2\/hadoop-project-dist\/hadoop-common\/SingleCluster.html<\/a><\/p><p>\u96c6\u7fa4\u5b89\u88c5\u53c2\u8003\u6587\u6863:<\/p><p> <a href=\"https:\/\/hadoop.apache.org\/docs\/r3.1.2\/hadoop-project-dist\/hadoop-common\/ClusterSetup.html\">https:\/\/hadoop.apache.org\/docs\/r3.1.2\/hadoop-project-dist\/hadoop-common\/ClusterSetup.html<\/a> <\/p><\/blockquote>\n\n\n\n<h2>\u4e3b\u8981\u5185\u5bb9<\/h2>\n\n\n\n<ul><li> \u73af\u5883\u53ca\u76f8\u5173\u8f6f\u4ef6\u5b89\u88c5 <\/li><li>\u8bbe\u7f6ehadoop<\/li><\/ul>\n\n\n\n<h2>1  \u73af\u5883\u53ca\u76f8\u5173\u8f6f\u4ef6\u5b89\u88c5  <\/h2>\n\n\n\n<p>1.1 \u5b89\u88c5java\uff1a<\/p>\n\n\n\n<ul><li>\u4e0b\u8f7djdk\u3002hadoop\u652f\u6301\u7684java\u7248\u672c\u8bf7\u53c2\u8003( <a href=\"https:\/\/cwiki.apache.org\/confluence\/display\/HADOOP\/Hadoop+Java+Versions\">https:\/\/cwiki.apache.org\/confluence\/display\/HADOOP\/Hadoop+Java+Versions<\/a> )<\/li><li>\u89e3\u538b\u5230\u6307\u5b9a\u76ee\u5f55\u3002<\/li><li>\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\uff0c\u8f83\u5bb9\u6613\u5fd8\uff0c\u6bcf\u6b21\u90fd\u5f97\u73b0\u641c\u7d22<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">export JAVA_HOME=\/home\/deepops\/envs\/java\/jdk\nexport JRE_HOME=\/home\/deepops\/envs\/java\/jdk\/jre\nexport CLASSPATH=.:$JAVA_HOME\/lib:$JRE_HOME\/lib\nexport PATH=$JAVA_HOME\/bin:$PATH  <\/pre>\n\n\n\n<p> 1.2 \u5b89\u88c5ssh\u8f6f\u4ef6<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo apt-get install ssh   \n$ sudo apt-get install pdsh <\/pre>\n\n\n\n<h2>2 \u8bbe\u7f6ehadoop<\/h2>\n\n\n\n<p>2.1\u8bbe\u7f6eJAVA_HOME<\/p>\n\n\n\n<p> \u6253\u5f00hadoop\u5b89\u88c5\u76ee\u5f55\u4e0betc\/hadoop\/hadoop-env.sh \uff0c\u627e\u5230JAVA_HOME\u63a5\u89e6\u6ce8\u91ca\uff0c\u75c5\u5c06\u81ea\u5df1\u7684java\u5b89\u88c5\u8def\u5f84\u586b\u5199<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># set to the root of your Java installation   \nexport JAVA_HOME= \/home\/deepops\/envs\/java\/jdk <\/pre>\n\n\n\n<p>\u7136\u540e\u8fd0\u884c   bin\/hadoop \u80fd\u591f\u51fa\u6765hadoop\u7684\u7528\u6cd5\u5c31ok\u4e86<\/p>\n\n\n\n<p>2.2 \u8fd0\u884c\u5b98\u65b9\u6559\u7a0b\u4e2d\u7684\u793a\u4f8b<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#\u5728hadoop\u76ee\u5f55\u4e0b\n$ mkdir input\n$ cp etc\/hadoop\/*.xml input\n$ bin\/hadoop jar share\/hadoop\/mapreduce\/hadoop-mapreduce-examples-3.1.2.jar grep input output 'dfs[a-z.]+'\n$ cat output\/*<\/pre>\n\n\n\n<p>\u5230\u6b64hadoop\u5355\u8282\u70b9\u90e8\u7f72\u5b8c\u6bd5\u3002\u6536\u5de5<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u53c2\u8003\u6587\u6863\uff1a https:\/\/hadoop.apache.org\/docs\/r3.1.2\/hadoop-project-dist\/hadoop-common\/SingleCluster.html \u96c6\u7fa4\u5b89\u88c5\u53c2\u8003\u6587\u6863: https:\/\/hadoop.apache.org\/docs\/r3.1.2\/hadoop-project-dist\/hadoop-common\/ClusterSetup.html \u4e3b\u8981\u5185\u5bb9 \u73af\u5883\u53ca\u76f8\u5173\u8f6f\u4ef6\u5b89\u88c5 \u8bbe\u7f6ehadoop 1 \u73af\u5883\u53ca\u76f8\u5173\u8f6f\u4ef6\u5b89\u88c5 1.1 \u5b89\u88c5java\uff1a \u4e0b\u8f7djdk\u3002hadoop\u652f\u6301\u7684java\u7248\u672c\u8bf7\u53c2\u8003( https:\/\/cwiki.apache.org\/confluence\/display\/HADOOP\/Hadoop+Java+Versions ) \u89e3\u538b\u5230\u6307\u5b9a\u76ee\u5f55\u3002 \u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\uff0c\u8f83\u5bb9\u6613\u5fd8\uff0c\u6bcf\u6b21\u90fd\u5f97\u73b0\u641c\u7d22 export JAVA_HOME=\/home\/deepops\/envs\/java\/jdk export JRE_HOME=\/home\/deepops\/envs\/java\/jdk\/jre export CLASSPATH=.:$JAVA_HOME\/lib:$JRE_HOME\/lib export PATH=$JAVA_HOME\/bin:$PATH 1.2 \u5b89\u88c5ssh\u8f6f\u4ef6 $ sudo apt-get install ssh $ sudo apt-get install pdsh 2 \u8bbe\u7f6ehadoop 2.1\u8bbe\u7f6eJAVA_HOME \u6253\u5f00hadoop\u5b89\u88c5\u76ee\u5f55\u4e0betc\/hadoop\/hadoop-env.sh \uff0c\u627e\u5230JAVA_HOME\u63a5\u89e6\u6ce8\u91ca\uff0c\u75c5\u5c06\u81ea\u5df1\u7684java\u5b89\u88c5\u8def\u5f84\u586b\u5199 # set to the root of your Java installation export JAVA_HOME= \/home\/deepops\/envs\/java\/jdk \u7136\u540e\u8fd0\u884c bin\/hadoop &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"http:\/\/www.mimiq.com.cn\/?p=141\"> <span class=\"screen-reader-text\">DeepOps\u5c0f\u7b14\u8bb0-ubuntu-18.04.3\u73af\u5883\u4e0bhadoop3.1.2\u7684\u5b89\u88c5\u4e0e\u914d\u7f6e<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[21],"tags":[],"_links":{"self":[{"href":"http:\/\/www.mimiq.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/141"}],"collection":[{"href":"http:\/\/www.mimiq.com.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.mimiq.com.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.mimiq.com.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.mimiq.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=141"}],"version-history":[{"count":30,"href":"http:\/\/www.mimiq.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/141\/revisions"}],"predecessor-version":[{"id":211,"href":"http:\/\/www.mimiq.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/141\/revisions\/211"}],"wp:attachment":[{"href":"http:\/\/www.mimiq.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=141"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.mimiq.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=141"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.mimiq.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=141"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}