环境准备(单节点伪分布)
192.168.111.135 master01
安装包下载
RedHat 6 / CentOS 6 / Oracle Linux 6 -- Ambari-2.5.0
下载地址:http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.5.0.3/ambari-2.5.0.3-centos6.tar.gz
RedHat 6 / CentOS 6 / Oracle Linux 6 -- HDP-2.6.0.3 -- HDP
下载地址:http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.6.0.3/HDP-2.6.0.3-centos6-rpm.tar.gz
RedHat 6 / CentOS 6 / Oracle Linux 6 -- HDP-2.6.0.3 -- HDP-UTILS
下载地址:http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos6/HDP-UTILS-1.1.0.21-centos6.tar.gz
配置http服务
- 查看http服务documentroot目录
默认为:/var/www/html - 上传并解压安装包
将下载的Ambari、HDP、HDP-UTILS安装包上传至规划的http服务器documentroot(默认:/var/www/html)目录下
在documentroot(默认:/var/www/html)目录下创建HDP-UTILS目录,并将HDP-UTILS-1.1.0.21-centos6.tar.gz移动至刚创建的HDP-UTILS目录下,解压:tar -zxvf HDP-UTILS-1.1.0.21-centos6.tar.gz
在documentroot(默认:/var/www/html)目录下解压Ambari、HDP安装包:tar -zxvf ambari-2.5.0.3-centos6.tar.gz && tar -zxvf HDP-2.6.0.3-centos6-rpm.tar.gz - 启动httpd服务
service httpd restart
- 验证http服务
在浏览器中访问如下地址:
http://192.168.111.135/ambari/centos6
http://192.168.111.135/HDP/centos6
http://192.168.111.135/HDP-UTILS
可获取相应目录及文件即证明http服务部署成功
配置本地源
在所有节点配置如下本地源文件
/etc/yum.repos.d/c6.repo
[c6-media]
name=CentOS-$releasever - Media
baseurl=file:///media/RHEL_6.4\ x86_64\ Disc\ 1
gpgcheck=1
enabled=1
/etc/yum.repos.d/ambari.repo
#VERSION_NUMBER=2.5.0.3-7
[ambari-2.5.0.3]
name=ambari Version - ambari-2.5.0.3
baseurl=http://192.168.111.135/ambari/centos6
gpgcheck=1
gpgkey=http://192.168.111.135/ambari/centos6/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1
/etc/yum.repos.d/HDP.repo
#VERSION_NUMBER=2.6.0.3-8
[HDP-2.6.0.3]
name=HDP Version - HDP-2.6.0.3
baseurl=http://192.168.111.135/HDP/centos6
gpgcheck=1
gpgkey=http://192.168.111.135/HDP/centos6/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1
/etc/yum.repos.d/HDP-UTILS.repo
[HDP-UTILS-1.1.0.21]
name=HDP-UTILS Version - HDP-UTILS-1.1.0.21
baseurl=http://192.168.111.135/HDP-UTILS
gpgcheck=1
gpgkey=http://192.168.111.135/HDP-UTILS/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1
配置网络源(用于依赖包安装)
/etc/yum.repos.d/163.repo
[base]
name=CentOS-6 - Base - 163.com
baseurl=http://mirrors.163.com/centos/6/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=os
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#released updates
[updates]
name=CentOS-6 - Updates - 163.com
baseurl=http://mirrors.163.com/centos/6/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=updates
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#additional packages that may be useful
[extras]
name=CentOS-6 - Extras - 163.com
baseurl=http://mirrors.163.com/centos/6/extras/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=extras
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-6 - Plus - 163.com
baseurl=http://mirrors.163.com/centos/6/centosplus/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=centosplus
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#contrib - packages by Centos Users
[contrib]
name=CentOS-6 - Contrib - 163.com
baseurl=http://mirrors.163.com/centos/6/contrib/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=contrib
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
检查本地源
yum list telnet
[root@master01 yum.repos.d]# yum list telnet
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
HDP-UTILS-1.1.0.21 | 2.9 kB 00:00
HDP-UTILS-1.1.0.21/primary_db | 36 kB 00:00
ambari-2.5.0.3 | 2.9 kB 00:00
ambari-2.5.0.3/primary_db | 8.5 kB 00:00
c6-media | 3.9 kB 00:00 ...
c6-media/primary_db | 3.1 MB 00:00 ...
Available Packages
telnet.x86_64 1:0.17-47.el6_3.1 c6-media
[root@master01 yum.repos.d]#
yum list ambari-server
[root@master01 yum.repos.d]# yum list ambari-server
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Available Packages
ambari-server.x86_64 2.5.0.3-7 ambari-2.5.0.3
[root@master01 yum.repos.d]#
yum list hadoop
[root@master01 yum.repos.d]# yum list hadoop
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Available Packages
hadoop.noarch 2.7.3.2.6.0.3-8.el6 HDP-2.6.0.3
[root@master01 yum.repos.d]#
yum list hadoop-lzo
[root@master01 yum.repos.d]# yum list hadoop-lzo
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Available Packages
hadoop-lzo.x86_64 0.6.0-1 HDP-UTILS-1.1.0.21
[root@master01 yum.repos.d]#
准备Mysql数据库
使用Redhat本地源安装Mysql服务:yum -y install mysql*
初始化Mysql服务:/usr/bin/mysql_install_db --defaults-file=/etc/my.cnf --datadir=/var/lib/mysql
启动mysql:service mysqld restart
设置root账号密码:/usr/bin/mysqladmin -S /var/lib/mysql/mysql.sock -u root password 'root'
登陆mysql开放远程访问:
#mysql -uroot -proot
>GRANT ALL PRIVILEGES ON *.* TO 'root'@'master01' IDENTIFIED BY 'root' WITH GRANT OPTION;
>GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY 'root' WITH GRANT OPTION;
>FLUSH PRIVILEGES;
安装Ambari
在规划的Ambari-server服务器上按照提示安装:
yum -y install ambari-server
设置Ambari Server
ambari-server setup
注意事项:
jdk选择1.8
数据库选择mysql
数据库用户名密码root/root
Ambari元数据需手工导入mysql数据库
启动Ambari Server
ambari-server start
安装HDP服务
成功启动Ambari Server之后,进入页面根据提示安装服务组件
服务组件全部安装完成之后,会自动启动所有组件,可在Ambari页面查看相关监控信息
注意:安装过程中如果出现缺少依赖包的错误,可根据日志提示,通过Redhat本地源或从网络下载对应rpm包进行安装
服务概览
新特性
Hive View 2.0
- QUERY界面
- TABLES界面
注意:TABLES界面可以对hive表元数据进行编辑操作
- SETTINGS界面
注意:SETTINGS界面可以用户自定义配置项,且重新登录后仍然生效
使用Hive View 2.0与之前的Hive View相同,需要关闭HDFS权限检查功能(dfs.permissions.enabled)
- 执行测试语句
select tb1.id,count(tb2.id) from dual tb1 join dual tb2 on tb1.id = tb2.id group by tb1.id order by tb1.id
更完善的Grafana
其它特性有待继续研究