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包


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
1yum install ant
2yum install asciidoc
3yum install cyrus-sasl-devel
4yum install cyrus-sasl-gssapi
5yum install gcc
6yum install gcc-c++
7yum install krb5-devel
8
9# for unit tests only
10yum install libtidy
11
12yum install libxml2-devel
13yum install libxslt-devel
14yum install make
15# yum install mvn (from maven package or maven3 tarball)
16yum install mysql
17yum install mysql-devel
18yum install openldap-devel
19yum install python-devel
20yum install sqlite-devel
21
22# for version 7+
23yum install openssl-devel
24
25yum install gmp-devel
26

编辑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


1
2
3
4
5
1<property>
2    <name>dfs.webhdfs.enabled</name>
3    <value>true</value>
4</property>
5

core-site.xml


1
2
3
4
5
6
7
8
9
1<property>
2    <name>hadoop.proxyuser.root.hosts</name>
3    <value>*</value>
4</property>
5<property>
6    <name>hadoop.proxyuser.root.groups</name>
7    <value>*</value>
8</property>
9

安装Hue

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


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

编译安装:注意系统时间


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

bug解决


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
1/usr/include/gnu/stubs.h:9:27: error: gnu/stubs-64.h: No such file or direct                          ory
2error: command 'gcc' failed with exit status 1
3
4[root@hadoop25pseudo hue-3.7.0-cdh5.4.2]# rpm -qa | grep glibc*
5glibc-headers-2.12-1.132.el6.x86_64
6glibc-static-2.12-1.132.el6.i686
7glibc-common-2.12-1.132.el6.x86_64
8glibc-2.12-1.132.el6.x86_64
9glib2-2.26.1-3.el6.x86_64
10dbus-glib-0.86-6.el6.x86_64
11glibc-2.12-1.132.el6.i686
12glibc-devel-2.12-1.132.el6.i686
13
14# 缺少64位的
15yum install -y glibc-devel
16

1
2
3
4
1/bin/bash: rsync: command not found
2
3yum install -y rsync
4

添加用户hue


1
2
3
1adduser hue
2chown -R hue.hue /root/training/hue/
3

修改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


1
2
3
4
5
1find . -name hue.ini
2# ./desktop/conf/hue.ini
3cd desktop/conf/
4vi hue.ini
5

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
1http_host=hadoop25pseudo
2http_port=8888
3server_user=root
4server_group=root
5default_user=root
6default_hdfs_superuser=root
7
8fs_defaultfs=hdfs://hadoop25pseudo:9000
9webhdfs_url=http://hadoop25pseudo:50070/webhdfs/v1
10hadoop_conf_dir=/root/training/hadoop-2.4.1/etc/hadoop
11resourcemanager_host=hadoop25pseudo
12resourcemanager_api_url=http://hadoop25pseudo:8088
13proxy_api_url=http://hadoop25pseudo:8088
14history_server_api_url=http://hadoop25pseudo:19888
15

启动Hue及验证

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

启动Hue:


1
2
3
1cd ~/training/hue/build/env
2bin/supervisor
3

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



给TA打赏
共{{data.count}}人
人已打赏
安全运维

基于spring boot和mongodb打造一套完整的权限架构(五)【集成用户模块、菜单模块、角色模块】

2021-12-11 11:36:11

安全运维

Ubuntu上NFS的安装配置

2021-12-19 17:36:11

个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索