CentOS6.7安装Client(hadoop、hive)
查看Linux系统版本
[root@AAC-DMP-06 amos]# lsb_release -a
LSB Version:
:base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 6.7 (Final)
Release: 6.7
CentOS系统
如果有问题,需要先升级包
[root@AAC-DMP-06 amos]# wget -nv http://public-repo-1.hortonworks.com/HDP/centos6/2.x/GA/2.2.0.0/hdp.repo -O /etc/yum.repos.d/hdp.repo
如果不能解析,需要修改公共的nameserver
[root@AAC-DMP-06 ~]# vim /etc/resolv.conf
nameserver 8.8.8.8
[root@AAC-DMP-06 amos]# yum -y upgrade //升级所有包,不改变软件设置和系统设置,系统版本升级,内核不改变
[root@AAC-DMP-06 amos]# yum search hadoop |more
找到:hadoop-client.noarch
安装client:
nohup yum install -yhadoop-client.noarch //使用nohup的原因是防止终端断开,安装中断
[root@AAC-DMP-06 ~]# screen yum install -y hive* //centos6.7上安装
root@az-aacdb01:~# sudo apt-get install hive-2-2-0-0-2041*//ubuntu上安装
[root@AAC-DMP-06 ~]# hi TAB键
history hive hiveserver2
Ubuntu系统:
查看系统版本:
azureuser@az-aacdb01:~$ cat /etc/issue
Ubuntu 12.04.5 LTS \n \l
添加拓展源
[root@az-aacdb01:~# wget http://public-repo-1.hortonworks.com/HDP/ubuntu12/2.x/GA/2.2.0.0/hdp.list -O /etc/apt/sources.list.d/hdp.list
[root@az-aacdb01:~# sudo apt-get update
问题1:不能正确解析域名,导致下载中断
解决方法:注释默认nameserver,添加nameserver为8.8.8.8
azureuser@az-aacdb01:~$ vim /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
#nameserver 168.63.129.16
search az-dmp-aacdb.b5.internal.chinacloudapp.cn
nameserver 8.8.8.8
问题2:安装过程中不能识别public key
解决方法:一串数字如下添加public key
SECURE APT
The Ubuntu archives on CRAN are signed with the key of "MichaelRutter <[email protected]>" with key ID E084DAB9. To add the key to yoursystem with one command use (thanks to Brett Presnell for the tip):
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9
gpg -a --export E084DAB9 | sudo apt-key add -
root@az-aacdb01:~# sudo apt-cache search hadoop //查找hadoop client的客户端安装包
ubuntu-orchestra-modules-hadoop - Modules mainly used byorchestra-management-server
root@az-aacdb01:~# screen apt-get install hadoop-2-2-0-0-2041-client //安装client