一、简介
hue是一个开源的apache hadoop ui系统,由cloudear desktop演化而来,最后cloudera公司将其贡献给了apache基金会的hadoop社区,它基于python框架django实现的。
通过使用hue,我们可以使用可视化的界面在web浏览器上与hadoop集群交互来分析处理数据,例如操作hdfs上的数据,运行MapReduce Job,查看HBase中的数据
 
二、安装
(1)下载
http://archive.cloudera.com/cdh5/cdh/5/
从这里下载cdh5.11.1的最新版本的hue,3.9.0版本,到本地,并上传到服务器,解压缩到app目录下
(2)必要的组件准备
需要先安装好mysql数据库
需要安装好下面的组件
sudo yum install ant asciidoc cyrus-sasl-devel cyrus-sasl-gssapi gcc gcc-c++ krb5-devel libtidy libxml2-devel libxslt-devel openldap-devel python-devel python-simplejson sqlite-devel gmp-devel -y
(3)编译到hue的根目录下,运行
  make apps
(4)配置
基础配置,打开desktop/conf/hue.ini文件
[desktop]
 
  # Set this to a random string, the longer the better.
  # This is used for secure hashing in the session store.
  secret_key=jFE93j;2[290-eiw.KEiwN2s3[‘d;/.q[eIW^y#e=+Iei*@Mn<qW5o
 
  # Webserver listens on this address and port
  http_host=hadoop001
  http_port=8888
 
  # Time zone name
  time_zone=Asia/Shanghai
 
  # Enable or disable Django debug mode.
  django_debug_mode=false
 
  # Enable or disable backtrace for server error
  http_500_debug_mode=false
 
  # Enable or disable memory profiling.
  ## memory_profiler=false
 
  # Server email for internal error messages
  ## django_server_email=‘hue@localhost.localdomain‘
 
  # Email backend
  ## django_email_backend=django.core.mail.backends.smtp.EmailBackend
 
  # Webserver runs as this user
  server_user=hue
  server_group=hue
 
  # This should be the Hue admin and proxy user
  ## default_user=hue
 
  # This should be the hadoop cluster admin
  #default_hdfs_superuser=hadoop
 
配置hue集成hadoop
首先hadoop里设置代理用户,需要配置hadoop的core-site.xml
hadoop.proxyuser.hue.hosts
   *
 
 
   hadoop.proxyuser.hue.groups
   *
加入这两个属性即可。
然后重启hadoop集群
sbin/stop-dfs.sh
sbin/stop-yarn.sh
sbin/start-dfs.sh
sbin/start-yarn.sh
 
配置hue与hadoop集成
 
[hadoop]
 
  # Configuration for HDFS NameNode
  # ------------------------------------------------------------------------
  [[hdfs_clusters]]
    # HA support by using HttpFs
 
    [[[default]]]
      # Enter the filesystem uri
      fs_defaultfs=hdfs://hadoop001:8020
 
      # NameNode logical name.
      ## logical_name=
 
      # Use WebHdfs/HttpFs as the communication mechanism.
      # Domain should be the NameNode or HttpFs host.
      # Default port is 14000 for HttpFs.
      webhdfs_url=http://hadoop001:50070/webhdfs/v1
 
      # Change this if your HDFS cluster is Kerberos-secured
      ## security_enabled=false
 
      # Default umask for file and directory creation, specified in an octal value.
      ## umask=022
 
      # Directory of the Hadoop configuration
      hadoop_conf_dir=/home/hadoop/app/hadoop/etc/hadoop
 
  # Configuration for YARN (MR2)
  # ------------------------------------------------------------------------
  [[yarn_clusters]]
 
    [[[default]]]
      # Enter the host on which you are running the ResourceManager
      resourcemanager_host=hadoop002
 
      # The port where the ResourceManager IPC listens on
      resourcemanager_port=8032
 
      # Whether to submit jobs to this cluster
      submit_to=True
 
      # Resource Manager logical name (required for HA)
      ## logical_name=
 
      # Change this if your YARN cluster is Kerberos-secured
      ## security_enabled=false
 
      # URL of the ResourceManager API
      resourcemanager_api_url=http://hadoop002:8088
 
      # URL of the ProxyServer API
      proxy_api_url=http://hadoop002:8088
 
      # URL of the HistoryServer API
      history_server_api_url=http://hadoop002:19888
 
      # In secure mode (HTTPS), if SSL certificates from Resource Manager‘s
      # Rest Server have to be verified against certificate authority
      ## ssl_cert_ca_verify=False
 
    # HA support by specifying multiple clusters
    # e.g.
 
    # [[[ha]]]
      # Resource Manager logical name (required for HA)
      ## logical_name=my-rm-name
 
  # Configuration for MapReduce (MR1)
 
 
 
配置hue集成hive
 
[beeswax]
 
  # Host where HiveServer2 is running.
  # If Kerberos security is enabled, use fully-qualified domain name (FQDN).
    hive_server_host=hadoop001
 
  # Port where HiveServer2 Thrift server runs on.
    hive_server_port=10000
 
  # Hive configuration directory, where hive-site.xml is located
    hive_conf_dir=/home/hadoop/app/hive/conf
 
  # Timeout in seconds for thrift calls to Hive service
  server_conn_timeout=120
 
 
 
(5)启动hue
先启动hive的metastore服务,和hiveserver2服务
nohup hive --service metastore &
noh
up hive --service hiveserver2 &
 
再启动hue
nohup /home/hadoop/app/hue/build/env/bin/supervisor &
 
(6)访问hue
http://hadoop004:8888
 
可能会遇到的问题:
Failed to contact an active Resource Manager: YARN RM returned a failed response: { "RemoteException" : { "message" : "User: hue is not allowed to impersonate admin", "exception" : "AuthorizationException", "javaClassName" : "org.apache.hadoop.security.authorize.AuthorizationException" } } (error 403)
这个问题是hadoop的core-site.xml配置的代理的用户和hue配置文件的用户不一致造成的。
比如,hadoop的core-site.xml是这样配置的
    hadoop.proxyuser.hue.hosts   *     hadoop.proxyuser.hue.groups   *
代理用户是hue。
而hue里面是这样配置的:
 # Webserver runs as this user#server_user=hue#server_group=hue
需要把server_user和server_group设置成hue,即可
请大佬们多多提意见

教你一步学会安装Hue的更多相关文章

  1. [最直白版]一步一步教你用VMware Workstation12安装Ubuntu 16.04和VMware Tools的教程

    [最直白版]Win10下一步一步教你用 VMware Workstation12安装Ubuntu 16.04和VMware Tools的教程 安装过程中使用的软件(要保证电脑里面有下列三个东西): 1 ...

  2. OpenVAS漏洞扫描基础教程之OpenVAS概述及安装及配置OpenVAS服务

    OpenVAS漏洞扫描基础教程之OpenVAS概述及安装及配置OpenVAS服务   1.  OpenVAS基础知识 OpenVAS(Open Vulnerability Assessment Sys ...

  3. 教你6步定制你的Ubuntu桌面

    转自教你6步定制你的Ubuntu桌面 对于那些想要一个易于使用的界面的用户,Ubuntu是一个很好的Linux发行版,并且对于一个Linux新手也可以说是最好的Linux发行版.不过这产生了一些副作用 ...

  4. 教你轻松快速学会用Calibre TXT转MOBI

    教你轻松快速学会TXT转为有目录的MOBI###授人以渔,lllll5500制作### 需使用软件按先后顺序如下:一.排版助手 官网http://www.gidot.net/typesetter/二. ...

  5. 教你一招 - 如何安装nopcommerce2.5

    教你一招 - 如何安装nopcommerce2.5 29. 五月 2012 16:22         /          wcf         /          教你一招 . 解决方案    ...

  6. 安装Hue后的一些功能的问题解决干货总结(博主推荐)

    不多说,直接上干货! 我的集群机器情况是 bigdatamaster(192.168.80.10).bigdataslave1(192.168.80.11)和bigdataslave2(192.168 ...

  7. Ubuntu 14 Trusty安装hue

    想开始学习一下hive,需要一个使用起来方便的客户端,网上搜了一下发现hue是个很常用的工具.于是,就在自己的ubuntu14系统里,尝试安装hue.下面就是自己的安装步骤,记录如下: 1.先查看自己 ...

  8. Java 学习第一步-JDK安装和Java环境变量配置

    Java学习第一步——JDK安装及Java环境变量配置 [原文]  2014-05-30 9:09  Java SE  阿超  9046 views Java作为当下很主流的编程语言,学习Java的朋 ...

  9. Java基础:三步学会Java Socket编程

    Java基础:三步学会Java Socket编程 http://tech.163.com 2006-04-10 09:17:18 来源: java-cn 网友评论11 条 论坛        第一步 ...

随机推荐

  1. C盘空间太大,分区助手减小分区大小教程

    首先看一个需要缩小C盘或需要减少分区空间的一个例子:“我的电脑里C盘剩余空间为530GB,除了C盘外还有一个D盘,但D盘的空间不到30GB,另外还有两个隐藏分区,一个200MB,一个15GB.我想把C ...

  2. 4 - 函数&装饰器 and 迭代器&生成器

    函数是什么 函数一词来源于数学,但编程中的「函数」概念,与数学中的函数是有很大不同的.程序里函数的定义是: 定义:将一组语句的集合通过一个名字(函数名)封装起来,要想执行这个函数,只需调用其函数名即可 ...

  3. Bonita portal 源码编译(未完成)

    首先下载源代码 https://github.com/bonitasoft/bonita-portal-js 以下内容为Github 的安装教程包含我安装过程中遇到的问题.并加以修正 Bonita p ...

  4. 设有三个进程A、B、C,其中A与B构成一对生产者与消费者(A为生产者,B为消费者),共享一个由n个缓冲块组成的缓冲池;B与C也构成一对生产者与消费者(此时B为生产者,C为消费者)共享另一个由m个缓冲块组成的缓冲池。用P、V操作描述它们之间的同步关系。

    生产者消费者问题 设信号量mutex1, mutex2, full1, full2, empty1, empty2分别表示1和2号缓冲区的访问互斥, 是否满, 是否空 semaphore mutex1 ...

  5. nginx架构分析之 模块化

    Nginx涉及到的模块分为核心模块.标准HTTP模块.可选HTTP模块.邮件服务模块以及第三方模块等五大类. 核心模块 核心模块是指Nginx服务器正常运行时必不可少的模块,它们提供了Nginx最基本 ...

  6. MCV 的几种表单提交方式

    一,MVC  HtmlHelper方法 Html.BeginForm(actionName,controllerName,method,htmlAttributes){}   其中actionName ...

  7. Javascript和HTML5的关系

    HTML5是一种新的技术,就目前而言,我们所知的HTML5都是一些标签,但是有了JS之后,这些标签深层的扩展功能才得以实现.       比如video标签,我们对其理解为一个简单的标签,但实际上,v ...

  8. 《Linux就该这么学》,刘小伙实在人,给打个广告

    本书是由全国多名红帽架构师(RHCA)基于最新Linux系统共同编写的高质量Linux技术自学教程,极其适合用于Linux技术入门教程或讲课辅助教材,目前是国内最值得去读的Linux教材,也是最有价值 ...

  9. java的八种基本数据类型

             据说表格的方式一目了然 一. java数据类型的取值范围如下: 注意:long型后如果不加 L 则默认为int型,float型如果不加 F 则默认为double型: 注意!注意!注意 ...

  10. 区分js中的null,undefined,"",0和false

    console.log(typeof null);//object console.log(typeof undefined);//undefined console.log(typeof " ...