環(huán)境準(zhǔn)備(單節(jié)點(diǎn)偽分布)
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服務(wù)
- 查看http服務(wù)documentroot目錄
默認(rèn)為:/var/www/html - 上傳并解壓安裝包
將下載的Ambari、HDP、HDP-UTILS安裝包上傳至規(guī)劃的http服務(wù)器documentroot(默認(rèn):/var/www/html)目錄下
在documentroot(默認(rèn):/var/www/html)目錄下創(chuàng)建HDP-UTILS目錄,并將HDP-UTILS-1.1.0.21-centos6.tar.gz移動至剛創(chuàng)建的HDP-UTILS目錄下,解壓:tar -zxvf HDP-UTILS-1.1.0.21-centos6.tar.gz
在documentroot(默認(rèn):/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服務(wù)
service httpd restart
- 驗(yàn)證http服務(wù)
在瀏覽器中訪問如下地址:
http://192.168.111.135/ambari/centos6
http://192.168.111.135/HDP/centos6
http://192.168.111.135/HDP-UTILS
可獲取相應(yīng)目錄及文件即證明http服務(wù)部署成功
配置本地源
在所有節(jié)點(diǎn)配置如下本地源文件
/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
配置網(wǎng)絡(luò)源(用于依賴包安裝)
/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]#
準(zhǔn)備Mysql數(shù)據(jù)庫
使用Redhat本地源安裝Mysql服務(wù):yum -y install mysql*
初始化Mysql服務(wù):/usr/bin/mysql_install_db --defaults-file=/etc/my.cnf --datadir=/var/lib/mysql
啟動mysql:service mysqld restart
設(shè)置root賬號密碼:/usr/bin/mysqladmin -S /var/lib/mysql/mysql.sock -u root password 'root'
登陸mysql開放遠(yuǎn)程訪問:
#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
在規(guī)劃的Ambari-server服務(wù)器上按照提示安裝:
yum -y install ambari-server
設(shè)置Ambari Server
ambari-server setup
注意事項(xiàng):
jdk選擇1.8
數(shù)據(jù)庫選擇mysql
數(shù)據(jù)庫用戶名密碼root/root
Ambari元數(shù)據(jù)需手工導(dǎo)入mysql數(shù)據(jù)庫
啟動Ambari Server
ambari-server start
安裝HDP服務(wù)
成功啟動Ambari Server之后,進(jìn)入頁面根據(jù)提示安裝服務(wù)組件
服務(wù)組件全部安裝完成之后,會自動啟動所有組件,可在Ambari頁面查看相關(guān)監(jiān)控信息
注意:安裝過程中如果出現(xiàn)缺少依賴包的錯誤,可根據(jù)日志提示,通過Redhat本地源或從網(wǎng)絡(luò)下載對應(yīng)rpm包進(jìn)行安裝
服務(wù)概覽
新特性
Hive View 2.0
- QUERY界面
- TABLES界面
注意:TABLES界面可以對hive表元數(shù)據(jù)進(jìn)行編輯操作
- SETTINGS界面
注意:SETTINGS界面可以用戶自定義配置項(xiàng),且重新登錄后仍然生效
使用Hive View 2.0與之前的Hive View相同,需要關(guān)閉HDFS權(quán)限檢查功能(dfs.permissions.enabled)
- 執(zhí)行測試語句
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
其它特性有待繼續(xù)研究