Hue 安装

Hue 安装CDH nbsp Cloudera sDistributio CDH4 安装 hue 之前 centos 系统需要安装以下组件 CentOS antasciidocc sasl develcyrus sasl gssapigccgcc c krb5 devellibtidy forunittests

CDH 

Python Dive into Python

Django The Django Tutorial

Mako

MooTools

安装hue之前,centos系统需要安装以下组件:

CentOS:

  • ant
  • asciidoc
  • cyrus-sasl-devel
  • cyrus-sasl-gssapi
  • gcc
  • gcc-c++
  • krb5-devel
  • libtidy (for unit tests only)
  • libxml2-devel
  • libxslt-devel
  • mvn (from maven2 package or tarball)
  • mysql
  • mysql-devel
  • openldap-devel
  • python-devel
  • python-simplejson
  • sqlite-devel

安装ant

下载ant tar .gz包  http://mirror.bjtu.edu.cn/apache//ant/binaries/

解压 [root@localhost ant]# tar -zxvf apache-ant-1.9.3-bin.tar.gz 

x : 从 tar 包中把文件提取出来
z : 表示 tar 包是被 gzip 压缩过的,所以解压时需要用 gunzip 解压
v : 显示详细信息
f xxx.tar.gz : 指定被处理的文件是 xxx.tar.gz








拷贝 [root@localhost ant]# cp apache-ant-1.9.3 /usr/local/ant -r   


cp -r 是 递归拷贝类似于 rm -r

配置环境变量

编辑  /etc/profile 对所有用户生效 添加

 export ANT_HOME=/usr/local/ant


export PATH=${PATH}:${ANT_HOME}/bin


保存后 初始化 source /etc/profile

[root@localhost ant]# ant -version
Apache Ant(TM) version 1.9.3 compiled on December 23 2013





安装 asciidoc cyrus-sasl-gssapi 

[root@localhost ant]# yum install asciidoc


[root@localhost ant]# yum install cyrus-sasl-gssapi


可一次安装多个组件 

[root@localhost ant]# yum -y install gcc gcc-c++ 

安装mvn


首先增加新的安装源:jpackage-generic-free.repo 和 jpackage-generic-devel.repo


cat > /etc/yum.repos.d/jpackage-generic-free.repo << EOF [jpackage-generic-free] name=JPackage generic free baseurl=http://mirrors.dotsrc.org/jpackage/6.0/generic/free/ enabled=1 gpgcheck=1 gpgkey=http://www.jpackage.org/jpackage.asc EOF
cat > /etc/yum.repos.d/jpackage-generic-devel.repo << EOF [jpackage-generic-devel] name=JPackage Generic Developer baseurl=http://mirrors.dotsrc.org/jpackage/6.0/generic/devel/ enabled=1 gpgcheck=1 gpgkey=http://www.jpackage.org/jpackage.asc EOF

yum upadte 

yum install maven2


安装中若提示  
Package xxx.rpm is not signed

yum install maven2 --nogpgcheck  注意 是 -- 不是 -

安装 hue

解压huexxx.tgz时出错

gzip: stdin: unexpected end of file tar: Unexpected EOF in archive tar: Unexpected EOF in archive tar: Error is not recoverable: exiting now





原因是tgz文件有损,可能在下载过程中出错导致

重新下载http://gethue.com/

在解压目录

$ PREFIX=/usr/share make install $ cd /usr/share/hue

在make install过程中报错

[root@localhost hue-3.5.0]# PREFIX=/usr/share make install --- Installing core source structure... --- Installing Desktop core... INSTALL_DIR=/usr/share/hue make -C desktop install make[1]: Entering directory `/opt/hue/hue-3.5.0/desktop' INSTALL_DIR=/usr/share/hue/desktop/core \ INSTALL_CONF_DIR=/usr/share/hue/desktop/conf \ make -C core install-bdist Traceback (most recent call last): File "setup.py", line 16, in 
      
        from setuptools import setup, find_packages ImportError: No module named setuptools Traceback (most recent call last): File "setup.py", line 16, in 
       
         from setuptools import setup, find_packages ImportError: No module named setuptools Traceback (most recent call last): File "setup.py", line 16, in 
        
          from setuptools import setup, find_packages ImportError: No module named setuptools Traceback (most recent call last): File "setup.py", line 16, in 
         
           from setuptools import setup, find_packages ImportError: No module named setuptools Traceback (most recent call last): File "setup.py", line 16, in 
          
            from setuptools import setup, find_packages ImportError: No module named setuptools Traceback (most recent call last): File "setup.py", line 16, in 
           
             from setuptools import setup, find_packages ImportError: No module named setuptools Traceback (most recent call last): File "setup.py", line 16, in 
            
              from setuptools import setup, find_packages ImportError: No module named setuptools Traceback (most recent call last): File "setup.py", line 16, in 
             
               from setuptools import setup, find_packages ImportError: No module named setuptools make[2]: Entering directory `/opt/hue/hue-3.5.0/desktop/core' --- Building egg for avro-1.5.0 Traceback (most recent call last): File " 
              
                ", line 1, in 
               
                 ImportError: No module named setuptools.sandbox make[2]: * [/opt/hue/hue-3.5.0/desktop/core/build/avro-1.5.0/egg.stamp] Error 1 make[2]: Leaving directory `/opt/hue/hue-3.5.0/desktop/core' make[1]: * [.recursive-install-bdist/core] Error 2 make[1]: Leaving directory `/opt/hue/hue-3.5.0/desktop' make: * [install-desktop] Error 2 
                
               
              
             
            
           
          
         
        
      

关于

ImportError: No module named setuptools

网上给出的解决办法http://eatsalt.blog.163.com/blog/static/1/

wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz tar zxvf setuptools-0.6c11.tar.gz cd setuptools-0.6c11 python setup.py build python setup.py install

下面是 hue tar包里的read me

按下面的配置

Install ------- Install in any directory, e.g. /home/hue, /usr/share, /home/my_user PREFIX=/usr/share make install If you don't have the permissions, you will need to 'sudo' the command and make sure that the 'hue' user has write access to the 'logs' directory and 'desktop/desktop.db'. Run! ${PREFIX}/hue/build/env/bin/supervisor Configure Hadoop ---------------- Install JobTracker plug-in cd /usr/lib/hadoop-0.20-mapreduce/lib ln -s ${PREFIX}/hue/desktop/libs/hadoop/java-lib/hue*jar Configure Hadoop Edit hdfs-site.xml: 
         
         
           dfs.webhdfs.enable 
          
         
           true 
          
         Edit mapred-site.xml: 
         
         
           mapred.jobtracker.plugins 
          
         
           org.apache.hadoop.thriftfs.ThriftJobTrackerPlugin 
          
         
           Comma-separated list of jobtracker plug-ins to be activated. 
          
        

修改/hue/desktop/conf/hue.ini

hadoop_home等信息

注意端口号是否与hadoop上一致

例如默认hdfs_port=8020, 实际上hadoop上配置的为9000


运行hue

/usr/share/hue/build/env/bin/superviser
报错

[root@localhost lib]# /usr/share/hue/build/env/bin/supervisor Traceback (most recent call last): File "/usr/share/hue/build/env/bin/supervisor", line 8, in 
           
             load_entry_point('desktop==3.5.0', 'console_scripts', 'supervisor')() File "/usr/share/hue/desktop/core/src/desktop/supervisor.py", line 319, in main setup_user_info() File "/usr/share/hue/desktop/core/src/desktop/supervisor.py", line 257, in setup_user_info desktop.lib.daemon_utils.get_uid_gid(SETUID_USER, SETGID_GROUP) File "/usr/share/hue/desktop/core/src/desktop/lib/daemon_utils.py", line 45, in get_uid_gid raise KeyError("Couldn't get user id for user %s" % (username,)) KeyError: "Couldn't get user id for user hue" 
           

参考 https://github.com/cloudera/hue/issues/27   

adduser hue

[root@localhost lib]# adduser hue [root@localhost lib]# /usr/share/hue/build/env/bin/supervisor 又报错 /usr/share/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/conf/__init__.py:110: DeprecationWarning: The SECRET_KEY setting must not be empty. warnings.warn("The SECRET_KEY setting must not be empty.", DeprecationWarning) /usr/share/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/conf/__init__.py:110: DeprecationWarning: The SECRET_KEY setting must not be empty. warnings.warn("The SECRET_KEY setting must not be empty.", DeprecationWarning) /usr/share/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/conf/__init__.py:110: DeprecationWarning: The SECRET_KEY setting must not be empty. warnings.warn("The SECRET_KEY setting must not be empty.", DeprecationWarning) starting server with options {'ssl_certificate': None, 'workdir': None, 'server_name': 'localhost', 'host': '0.0.0.0', 'daemonize': False, 'threads': 10, 'pidfile': None, 'ssl_private_key': None, 'server_group': 'hue', 'ssl_cipher_list': 'DEFAULT:!aNULL:!eNULL:!LOW:!EXPORT:!SSLv2', 'port': 8888, 'server_user': 'hue'}

The SECRET_KEY setting must not be empty


Specifying the Secret Key

For security, you should also specify the secret key that is used for secure hashing in the session store. Enter a long series of random characters (30 to 60 characters is recommended).

secret_key=jFE93j;2[290-eiw.KEiwN2s3['d;/.q[eIW^y#e=+Iei*@Mn 
                 
                 
[Note]  

If you don’t specify a secret key, your session cookies will not be secure. Hue will run but it will also display error messages telling you to set the secret key.









完善各种配置



在core-site.xml 配置

 

hadoop.tmp.dir

 

/tmp/hadoop-${user.name}${hue.suffix}















由于已经安装hive需在hue.ini中指定变量



  # Hive configuration directory, where hive-site.xml is located

  hive_conf_dir=/etc/hive/conf
hive_conf_dir=/opt/hadoop/hive-0.10.0-bin/conf









启动 
/usr/share/hue/build/env/bin/supervisor
command line里显示正常

[root@localhost desktop]# /usr/share/hue/build/env/bin/supervisor starting server with options {'ssl_certificate': None, 'workdir': None, 'server_name': 'localhost', 'host': '127.0.0.1', 'daemonize': False, 'threads': 10, 'pidfile': None, 'ssl_private_key': None, 'server_group': 'hue', 'ssl_cipher_list': 'DEFAULT:!aNULL:!eNULL:!LOW:!EXPORT:!SSLv2', 'port': 8888, 'server_user': 'hue'} /usr/share/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/views/generic/simple.py:8: DeprecationWarning: Function-based generic views have been deprecated; use class-based views instead. DeprecationWarning





但是http://localhost:8888/accounts/login/?next=/ 进入出现报错信息

[25/Feb/2014 01:32:08 +0000] middleware INFO Redirecting to login page: / [25/Feb/2014 01:32:08 +0000] access INFO 127.0.0.1 -anon- - "GET / HTTP/1.1" -- login redirection [25/Feb/2014 01:32:09 +0000] base ERROR Internal Server Error: /accounts/login/ Traceback (most recent call last): File "/usr/share/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/core/handlers/base.py", line 188, in get_response response = middleware_method(request, response) File "/usr/share/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/contrib/sessions/middleware.py", line 36, in process_response request.session.save() File "/usr/share/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/contrib/sessions/backends/db.py", line 58, in save obj.save(force_insert=must_create, using=using) File "/usr/share/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/db/models/base.py", line 463, in save self.save_base(using=using, force_insert=force_insert, force_update=force_update) File "/usr/share/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/db/models/base.py", line 551, in save_base result = manager._insert([self], fields=fields, return_id=update_pk, using=using, raw=raw) File "/usr/share/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/db/models/manager.py", line 203, in _insert return insert_query(self.model, objs, fields, kwargs) File "/usr/share/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/db/models/query.py", line 1593, in insert_query return query.get_compiler(using=using).execute_sql(return_id) File "/usr/share/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/db/models/sql/compiler.py", line 912, in execute_sql cursor.execute(sql, params) File "/usr/share/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/db/backends/sqlite3/base.py", line 344, in execute return Database.Cursor.execute(self, query, params) DatabaseError: attempt to write a readonly database

原因是 /usr/share/hue/desktop/desktop.db  对root用户权限777但对其它用户:hue只有读的权限

chmod o+w desktop.db

又报错

[25/Feb/2014 01:33:26 +0000] base ERROR Internal Server Error: /accounts/login/ Traceback (most recent call last): File "/usr/share/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/core/handlers/base.py", line 188, in get_response response = middleware_method(request, response) File "/usr/share/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/contrib/sessions/middleware.py", line 36, in process_response request.session.save() File "/usr/share/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/contrib/sessions/backends/db.py", line 58, in save obj.save(force_insert=must_create, using=using) File "/usr/share/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/db/models/base.py", line 463, in save self.save_base(using=using, force_insert=force_insert, force_update=force_update) File "/usr/share/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/db/models/base.py", line 551, in save_base result = manager._insert([self], fields=fields, return_id=update_pk, using=using, raw=raw) File "/usr/share/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/db/models/manager.py", line 203, in _insert return insert_query(self.model, objs, fields, kwargs) File "/usr/share/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/db/models/query.py", line 1593, in insert_query return query.get_compiler(using=using).execute_sql(return_id) File "/usr/share/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/db/models/sql/compiler.py", line 912, in execute_sql cursor.execute(sql, params) File "/usr/share/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/db/backends/sqlite3/base.py", line 344, in execute return Database.Cursor.execute(self, query, params) DatabaseError: unable to open database file

原因是包含desktop.db的文件夹对hue用户也是只能读不能写的

干脆把这个hue文件所属用户和组都给hue

chown chown -R hue.hue /usr/share/hue

再启动 完美运行 

注意:

若提示

Resource Manager Failed to contact Resource Manager at http://localhost:8088/ws/v1:。。。

原因是 hue.ini 中同时配置了 [[yarn_clusters]] 和 [[mapred_clusters]] 中的 

两者只能选一,MR1就选后者MR2选 [[yarn_clusters]] 





























版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/208495.html原文链接:https://javaforall.net

(0)
上一篇 2026年3月19日 上午11:27
下一篇 2026年3月19日 上午11:28


相关推荐

  • GlusterFS 应用

    GlusterFS 应用GlusterFS 应用 1 glusterfs 简介 2 glusterfs 部署 1 介绍 2 安装 glusterfs 前的环境准备 3 操作 3 glustefs 分布式存储优化 4 glusterfs 在企业中应用场景 1 glusterfs 简介 Glusterfs 是一个开源的分布式文件系统 是 Scale 存储的核心 能够处理千数量级的客户端 是整合了许多存储块 server 通过 InfinibandRD 或者 Tcp Ip 方式互联的一个并行的网络文件系统 2 特征容量可

    2026年3月18日
    2
  • SWIG介绍

    SWIG介绍SWIG 介绍 1 SWIG2 作用 3 例子参考 1 SWIGSimplifi SWIG 简化包装器和接口生成器 2 作用向脚本语言接口公开 C C 代码因为 的高效性能 所有对开发人员的一个常见要求是向脚本语言接口公开 C C 代码 这正是 SimplifiedWr SWIG 的用武之地 3 例子 SWIG 允许您向广泛的脚本语言公开 C

    2026年3月17日
    1
  • Mac 不显示未知来源选项的解决办法

    Mac 不显示未知来源选项的解决办法在 macOSSierra 系统的 安全与隐私 设置 在允许从以下位置下载的应用中 只有 AppStore 与 AppStore 和被认可的开发者二个选项 唯独任何来源这个选项不见了打开了 Terminal 终端后 在命令提示后输入 sudospctlmas disable 并按下回车执行随后再输入当前 Mac 用户的密码当执行完之前输入的命令后 成功返

    2026年3月18日
    3
  • 阿里云服务器怎么开放端口_云服务器开启端口

    阿里云服务器怎么开放端口_云服务器开启端口阿里云服务器如何开放端口,这里我将开放8082端口,我们来看下吧方法/步骤 登录阿里云服务器并进入控制台,点击【云服务器ECS】。 在【云服务器ECS】点击【实例】并跳转到实例列表。 在实例列表找到要开放端口的云服务器实例。并点击后面的【更多】–》【网络和安全组】–》【安全组配置】。 在【本实例安全组】内点击【配置规则】打开【安全组规则】。这里有出\入的方向,这里我开放的是8082端口,属于入方向的。在这里可以新增规则,这里为了方便直接对已有的规

    2022年10月2日
    4
  • 即梦AI电脑版怎么查看uid?宝藏教程,手把手教你快速搞定!

    即梦AI电脑版怎么查看uid?宝藏教程,手把手教你快速搞定!

    2026年3月12日
    2
  • 织梦CMS首页调用分类信息栏目及列表方法

    织梦CMS首页调用分类信息栏目及列表方法

    2021年9月20日
    47

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号