{"id":1463,"date":"2020-06-02T17:39:37","date_gmt":"2020-06-02T09:39:37","guid":{"rendered":"http:\/\/39.97.231.10\/?p=1463"},"modified":"2020-06-02T17:39:37","modified_gmt":"2020-06-02T09:39:37","slug":"ambari%e5%ae%89%e8%a3%85%e9%85%8d%e7%bd%aehue","status":"publish","type":"post","link":"http:\/\/www.weijing.co\/?p=1463","title":{"rendered":"Ambari\u5b89\u88c5HUE"},"content":{"rendered":"<p>Hue\uff08Hadoop User Experience\uff09\u662f\u4e00\u4e2a\u5f00\u6e90\u7684Apache Hadoop UI\u7cfb\u7edf\uff0c\u6700\u65e9\u662f\u7531Cloudera Desktop\u6f14\u5316\u800c\u6765\uff0c\u7531Cloudera\u8d21\u732e\u7ed9\u5f00\u6e90\u793e\u533a\uff0c\u5b83\u662f\u57fa\u4e8ePython Web\u6846\u67b6Django\u5b9e\u73b0\u7684\u3002\u901a\u8fc7\u4f7f\u7528Hue\u6211\u4eec\u53ef\u4ee5\u5728\u6d4f\u89c8\u5668\u7aef\u7684Web\u63a7\u5236\u53f0\u4e0a\u4e0eHadoop\u96c6\u7fa4\u8fdb\u884c\u4ea4\u4e92\u6765\u5206\u6790\u5904\u7406\u6570\u636e\uff0c\u4f8b\u5982\u64cd\u4f5cHDFS\u4e0a\u7684\u6570\u636e\uff0c\u8fd0\u884cMapReduce Job\u7b49\u7b49\u3002<\/p>\n<h2><b>1 <\/b><strong><b>\u5b89\u88c5\u5305<\/b><\/strong><\/h2>\n<p>\u5728\u5b89\u88c5\u524d\uff0c\u8bf7\u83b7\u53d6\u5982\u4e0b\u8868\u6240\u793a\u7684\u5b89\u88c5\u5305\uff1a<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\\\"248\\\"><strong><b>\u5b89\u88c5\u5305\u540d\u79f0<\/b><\/strong><\/td>\n<td width=\\\"413\\\"><strong><b>\u4e0b\u8f7d\u5730\u5740<\/b><\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\\\"248\\\">hue-3.11.0.tgz<\/td>\n<td width=\\\"413\\\">http:\/\/gethue.com\/downloads\/hue-3.11.0.tgz<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h1><b>2\u00a0<\/b><strong><b>\u5b89\u88c5\u51c6\u5907<\/b><\/strong><\/h1>\n<p>\u672c\u8282\u4ecb\u7ecdHUE\u5b89\u88c5\u524d\u7684\u51c6\u5907\u3002<\/p>\n<h2><b>2.1\u00a0<\/b><strong><b>\u4e0a\u4f20\u8f6f\u4ef6\u5305<\/b><\/strong><\/h2>\n<p>\u8bf7\u6267\u884c\u5982\u4e0b\u547d\u4ee4\u4e0a\u4f20\u5e76\u89e3\u538b\u5b89\u88c5\u5305\u3002<\/p>\n<ul>\n<li>\u5c06\u5b89\u88c5\u5305hue-3.11.0.tgz\u4e0a\u4f20\u5230\u4ee5\u4e0b\u76ee\u5f55\u4e2d<\/li>\n<\/ul>\n<pre>\/var\/www\/html\/HDP\/centos7\/2.6.4.0-91\/hue\n\/var\/www\/html\/HDP-UTILS\/hue<\/pre>\n<ul>\n<li>\u6dfb\u52a0hue\u7528\u6237<\/li>\n<\/ul>\n<pre>groupadd hue\nuseradd -m hue\necho hue\u00a0| passwd --stdin hue\nsed -i \\'N;94a\\\\hue ALL=NOPASSWD:ALL\\' \/etc\/sudoers<\/pre>\n<ul>\n<li>\u521b\u5efahue\u76ee\u5f55<\/li>\n<\/ul>\n<pre>mkdir -p \/usr\/local\/hue\nchown -R hue:hue \/usr\/local\/hue<\/pre>\n<h2><b>2.2\u00a0<\/b><strong><b>\u5b89\u88c5HUE\u4f9d\u8d56\u5305<\/b><\/strong><\/h2>\n<p>\u901a\u8fc7yum\u5b89\u88c5HUE\u4f9d\u8d56\u5305\uff0c\u5982\u679c\u5176\u4ed6\u8282\u70b9\u4e5f\u662f\u7528HUE\uff0c\u4e5f\u9700\u8981\u5b89\u88c5\u4e00\u4e0b\u4f9d\u8d56\u5305\u3002<\/p>\n<pre>yum install gcc \u00a0gcc-c++ libxml2-devel libxslt-devel cyrus-sasl-devel cyrus-sasl-gssapi mysql-devel python-devel python-setuptools sqlite-devel ant cyrus-sasl-plain gmp-devel \u00a0libffi-devel openldap-devel asciidoc libyaml-devel pycrypto saslwrapper-devel rsync \u00a0python-psycopg2 \u00a0krb5-devel python-simplejson openssl<\/pre>\n<h2><b>2.3\u00a0<\/b><strong><b>HUE\u7eb3\u5165Ambari\u7684\u7ba1\u7406<\/b><\/strong><\/h2>\n<p>\u5728ambari\u4e3b\u673a\u8282\u70b9\u4e0a\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre>VERSION=`hdp-select status hadoop-client | sed \\'s\/hadoop-client - \\\\([0-9]\\\\.[0-9]\\\\).*\/\\\\1\/\\'`\nrm -rf \/var\/lib\/ambari-server\/resources\/stacks\/HDP\/$VERSION\/services\/HUE<\/pre>\n<h2><b>2.4\u00a0<\/b><strong><b>\u5728PostgreSQL\u6dfb\u52a0hue\u4fe1\u606f<\/b><\/strong><\/h2>\n<p>\u5728ambari\u4e3b\u673a\u8282\u70b9\u4e0a\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre>#su postgers\n$psql\ncreate user hue with password \\'Zetyun2018\\' ;\ncreate database hue with owner hue ;\ngrant all privileges on database hue to hue ;<\/pre>\n<h2><b>2.5\u00a0<\/b><strong><b>httpfs\u5b89\u88c5<\/b><\/strong><\/h2>\n<pre>yum install hadoop-httpfs\nsystemctl start hadoop-httpfs<\/pre>\n<h2><b>2.6\u00a0<\/b><strong><b>\u91cd\u542fAmbari Server<\/b><\/strong><\/h2>\n<p>\u5728ambari\u4e3b\u673a\u8282\u70b9\u4e0a\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre>Systemctl resart ambari-server<\/pre>\n<h2><b>2.7\u00a0<\/b><strong><b>Hue\u7eb3\u5165Ambari\u7684\u7ba1\u7406<\/b><\/strong><\/h2>\n<p>\u5728ambari\u4e3b\u673a\u8282\u70b9\u4e0a\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre>VERSION=`hdp-select status hadoop-client | sed \\'s\/hadoop-client - \\\\([0-9]\\\\.[0-9]\\\\).*\/\\\\1\/\\'`\nrm -rf \/var\/lib\/ambari-server\/resources\/stacks\/HDP\/$VERSION\/services\/HUE<\/pre>\n<h1><b>3\u00a0<\/b><strong><b>HUE\u5b89\u88c5<\/b><\/strong><\/h1>\n<p>\u672c\u8282\u4ecb\u7ecdHUE\u5b89\u88c5\u540e\u7684\u68c0\u67e5\u4e8b\u9879\u53ca\u5176\u6b65\u9aa4\u3002<\/p>\n<h2><b>3.1\u00a0<\/b><strong><b>\u901a\u8fc7Ambari\u5b89\u88c5HUE<\/b><\/strong><\/h2>\n<ul>\n<li>Ambari\u5b89\u88c5HUE<\/li>\n<\/ul>\n<p>\u91cd\u542fAmbari Server\u670d\u52a1\u540e\u53ef\u901a\u8fc7\uff0c\u53ef\u901a\u8fc7web\u7ba1\u7406\u8fdb\u884c\u5b89\u88c5HUE\u3002<br \/>\n<img class=\\\"wp-image-1464 aligncenter\\\" src=\\\"http:\/\/www.iweijing.cn\/wp-content\/uploads\/2020\/06\/\u56fe\u72471-300x125.png\\\" alt=\\\"\\\" width=\\\"530\\\" height=\\\"221\\\" \/><br \/>\n\u7136\u540e\u9009\u62e9\u201cNext\u201d\u53ef\u5b8c\u6210\u5b89\u88c5\u3002<\/p>\n<h2><b>3.2\u00a0<\/b><strong><b>\u624b\u52a8\u5b89\u88c5HUE<\/b><\/strong><\/h2>\n<p>\u5982\u679c\u901a\u8fc7ambari\u5b89\u88c5\u5931\u8d25\uff0c\u9700\u8981\u624b\u52a8\u8fdb\u884c\u7f16\u8bd1\u5b89\u88c5\uff1a<\/p>\n<ul>\n<li><strong><b>H<\/b><\/strong><strong><b>ue\u7f16\u8bd1\u5b89\u88c5<\/b><\/strong><\/li>\n<\/ul>\n<pre>tar -zxvf hue-3.11.0.tgz -C \/usr\/local\ncd \/usr\/local\/hue3.11.0\ncd \/usr\/local\/hue3.11.0\nPREFIX=\/usr\/local\nmake install\n# \u5b89\u88c5\u8fc7\u7a0b\u6ca1\u6709\u62a5\u9519\u5219\u8bf4\u660e\u5b89\u88c5\u6210\u529f\uff0c\/usr\/local\/hue\/build\/env\/bin\/\u76ee\u5f55\u5982\u4e0b\u5c31\u8868\u660e\u5b89\u88c5\u6210\u529f\u3002<\/pre>\n<ul>\n<li><strong><b>\u521d\u59cb\u5316\u6570\u636e\u5e93<\/b><\/strong><\/li>\n<\/ul>\n<pre>cd \/usr\/local\/hue\nsource build\/env\/bin\/activate\nhue syncdb --noinput\nhue migrate<\/pre>\n<ul>\n<li><strong><b>\u914d\u7f6eHUE<\/b><\/strong><\/li>\n<\/ul>\n<pre># \u4fee\u6539\u914d\u7f6e\u6587\u4ef6\/usr\/local\/hue\/desktop\/conf\/hue.ini\n[desktop]\n\u00a0\u00a0secret_key=beijing\u00a0\n\u00a0\u00a0server_user=hue\n\u00a0\u00a0server_group=hue\ndefault_user=hue\ndefault_hdfs_superuser=hdfs\napp_blacklist=spark,zookeeper,search,impala,sqoop,rdbms,pig,oozie,hbase\nallowed_hosts=*\n[[database]]\n\u00a0\u00a0\u00a0\u00a0engine=postgresql_psycopg2\n\u00a0\u00a0\u00a0\u00a0host=172.20.20.14\n\u00a0\u00a0\u00a0\u00a0port=5432\n\u00a0\u00a0\u00a0\u00a0user=hue\n\u00a0\u00a0\u00a0\u00a0password=hue\n\u00a0\u00a0\u00a0\u00a0name=hue\n\u00a0\u00a0\u00a0\u00a0schema=public\n[hadoop]\n\u00a0\u00a0[[hdfs_clusters]]\n\u00a0\u00a0\u00a0\u00a0[[[default]]]\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0fs_defaultfs=hdfs:\/\/172.20.20.13:8020 \u00a0\u00a0\u00a0\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0webhdfs_url=http:\/\/172.20.20.13:50070\/webhdfs\/v1\n\u00a0\u00a0[[yarn_clusters]]\n\u00a0\u00a0\u00a0\u00a0[[[default]]]\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0resourcemanager_host=172.20.20.14\n[beeswax]\n\u00a0\u00a0hive_server_host=172.20.20.14\n\u00a0\u00a0hive_server_port=10000\n\u00a0\u00a0[[database]]\n\u00a0\u00a0\u00a0\u00a0\n\u00a0\u00a0\u00a0\u00a0engine=postgresql_psycopg2\n\u00a0\u00a0\u00a0\u00a0host=172.20.20.14\n\u00a0\u00a0\u00a0\u00a0port=5432\n\u00a0\u00a0\u00a0\u00a0user=hue\n\u00a0\u00a0\u00a0\u00a0password=hue\n\u00a0\u00a0\u00a0\u00a0name=hue\n\u00a0\u00a0\u00a0\u00a0schema=public<\/pre>\n<h2><b>3.3<\/b><strong><b>hadoop\u914d\u7f6e<\/b><\/strong><\/h2>\n<p>Hive\u914d\u7f6e<br \/>\n<img class=\\\"alignnone  wp-image-1466\\\" src=\\\"http:\/\/www.iweijing.cn\/wp-content\/uploads\/2020\/06\/hive-300x144.png\\\" alt=\\\"\\\" width=\\\"721\\\" height=\\\"346\\\" \/><br \/>\nHDFS\u914d\u7f6e<br \/>\n<img class=\\\"alignnone  wp-image-1465\\\" src=\\\"http:\/\/www.iweijing.cn\/wp-content\/uploads\/2020\/06\/hdfs-300x158.png\\\" alt=\\\"\\\" width=\\\"704\\\" height=\\\"371\\\" \/><br \/>\nHUE\u914d\u7f6e\uff0c\u5f00\u542f\u9700\u8981\u7684\u670d\u52a1\u6a21\u5757\u3002<br \/>\n<img class=\\\"alignnone  wp-image-1467\\\" src=\\\"http:\/\/www.iweijing.cn\/wp-content\/uploads\/2020\/06\/hue-2-300x173.png\\\" alt=\\\"\\\" width=\\\"690\\\" height=\\\"398\\\" \/><\/p>\n<h2><b>3.4 <\/b><strong><b>\u91cd\u542fAmbari Server<\/b><\/strong><\/h2>\n<p>\u5728ambari\u4e3b\u673a\u8282\u70b9\u4e0a\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre>Systemctl resart ambari-server<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Hue\uff08Hadoop User Experience\uff09\u662f\u4e00\u4e2a\u5f00\u6e90\u7684Apache Hadoop UI\u7cfb\u7edf\uff0c\u6700\u65e9\u662f &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"http:\/\/www.weijing.co\/?p=1463\"> <span class=\"screen-reader-text\">Ambari\u5b89\u88c5HUE<\/span> \u67e5\u770b\u5168\u6587 &raquo;<\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":""},"categories":[114],"tags":[],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"mailpoet_newsletter_max":false,"woocommerce_thumbnail":false,"woocommerce_single":false,"woocommerce_gallery_thumbnail":false,"shop_catalog":false,"shop_single":false,"shop_thumbnail":false},"uagb_author_info":{"display_name":"weijing","author_link":"http:\/\/www.weijing.co\/?author=4"},"uagb_comment_info":0,"uagb_excerpt":"Hue\uff08Hadoop User Experience\uff09\u662f\u4e00\u4e2a\u5f00\u6e90\u7684Apache Hadoop UI\u7cfb\u7edf\uff0c\u6700\u65e9\u662f&hellip;","_links":{"self":[{"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/posts\/1463"}],"collection":[{"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"http:\/\/www.weijing.co\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1463"}],"version-history":[{"count":0,"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/posts\/1463\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.weijing.co\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1463"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.weijing.co\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1463"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.weijing.co\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1463"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}