Hadoop实战(7)_Apache Hadoop安装和配置Hue

系列目录:

Hadoop实战(1)_阿里云搭建Hadoop2.x的伪分布式环境

Hadoop实战(2)_虚拟机搭建Hadoop的全分布模式

Hadoop实战(3)_虚拟机搭建CDH的全分布模式

Hadoop实战(4)_Hadoop的集群管理和资源分配

Hadoop实战(5)_Hadoop的运维经验

Hadoop实战(6)_搭建Apache Hadoop的Eclipse开发环境

配置Hue的主要步骤:

  • 安装所需的rpm包
  • 编辑Hadoop的配置文件
  • 安装Hue
  • 启动Hue及验证

安装所需的rpm包

yum install ant
yum install asciidoc
yum install cyrus-sasl-devel
yum install cyrus-sasl-gssapi
yum install gcc
yum install gcc-c++
yum install krb5-devel

# for unit tests only
yum install libtidy 

yum install libxml2-devel
yum install libxslt-devel
yum install make
# yum install mvn (from maven package or maven3 tarball)
yum install mysql
yum install mysql-devel
yum install openldap-devel
yum install python-devel
yum install sqlite-devel

# for version 7+
yum install openssl-devel

yum install gmp-devel

编辑Hadoop的配置文件

参数文件 参数 参考值 说明
hdfs-site.xml dfs.webhdfs.enabled true 开启webhdfs功能
core-site.xml hadoop.proxyuser.root.hosts * 设置Hadoop集群的代理用户,*表示任何用户
core-site.xml hadoop.proxyuser.root.groups * 设置Hadoop集群的代理用户组

hdfs-site.xml

<property>
    <name>dfs.webhdfs.enabledname>
    <value>truevalue>
property>

core-site.xml

<property>
    <name>hadoop.proxyuser.root.hostsname>
    <value>*value>
property>
<property>
    <name>hadoop.proxyuser.root.groupsname>
    <value>*value>
property>

安装Hue

解压hue-3.7.0-cdh5.4.2.tar.gz

mkdir -p /root/tools
tar -zxvf hue-3.7.0-cdh5.4.2.tar.gz -C ~/training/

编译安装:注意系统时间

cd ~/training/hue-3.7.0-cdh5.4.2
PREFIX=/root/training/ make install

bug解决

/usr/include/gnu/stubs.h:9:27: error: gnu/stubs-64.h: No such file or direct                          ory
error: command 'gcc' failed with exit status 1

[root@hadoop25pseudo hue-3.7.0-cdh5.4.2]# rpm -qa | grep glibc*
glibc-headers-2.12-1.132.el6.x86_64
glibc-static-2.12-1.132.el6.i686
glibc-common-2.12-1.132.el6.x86_64
glibc-2.12-1.132.el6.x86_64
glib2-2.26.1-3.el6.x86_64
dbus-glib-0.86-6.el6.x86_64
glibc-2.12-1.132.el6.i686
glibc-devel-2.12-1.132.el6.i686

# 缺少64位的
yum install -y glibc-devel
/bin/bash: rsync: command not found

yum install -y rsync

添加用户hue

adduser hue
chown -R hue.hue /root/training/hue/

修改hue.ini($HUE_HOME/desktop/conf/hue.ini)参数文件

参数 参考值
http_host hadoop25pseudo
http_port 8888
server_user root
server_group root
default_user root
default_hdfs_superuser root
fs_defaultfs hdfs://hadoop25pseudo:9000
webhdfs_url http://hadoop25pseudo:50070/webhdfs/v1
hadoop_conf_dir /root/training/hadoop-2.4.1/etc/hadoop
resourcemanager_host hadoop25pseudo
resourcemanager_api_url http://hadoop25pseudo:8088
proxy_api_url http://hadoop25pseudo:8088
history_server_api_url http://hadoop25pseudo:19888
find . -name hue.ini
# ./desktop/conf/hue.ini
cd desktop/conf/
vi hue.ini
http_host=hadoop25pseudo
http_port=8888
server_user=root
server_group=root
default_user=root
default_hdfs_superuser=root

fs_defaultfs=hdfs://hadoop25pseudo:9000
webhdfs_url=http://hadoop25pseudo:50070/webhdfs/v1
hadoop_conf_dir=/root/training/hadoop-2.4.1/etc/hadoop
resourcemanager_host=hadoop25pseudo
resourcemanager_api_url=http://hadoop25pseudo:8088
proxy_api_url=http://hadoop25pseudo:8088
history_server_api_url=http://hadoop25pseudo:19888

启动Hue及验证

启动Hadoop相关组件start-all.sh

启动Hue:

cd ~/training/hue/build/env
bin/supervisor

验证,访问首页:http://hadoop25pseudo:8888/


微信公众号「数据分析」,分享数据科学家的自我修养,既然遇见,不如一起成长。
Hadoop实战(7)_Apache Hadoop安装和配置Hue_第1张图片


你可能感兴趣的:(Hadoop,Hadoop)