Ubuntu 18 单机安装 HDP 3

准备

HDP-2 的安装文档
https://docs.cloudera.com/HDPDocuments/Ambari-2.6.2.2/bk_ambari-installation/content/ch_Getting_Ready.html

HDP-3 的安装文档
https://docs.cloudera.com/HDPDocuments/Ambari-2.7.3.0/bk_ambari-installation/content/ch_Getting_Ready.html

各版本的兼容关系
https://supportmatrix.hortonworks.com

检查要安装的软件比如 Java, scp, curl, unzip, tar, wget, gcc 等

检查可打开的最大文件数

ulimit -Sn
ulimit -Hn

如果小于 10000 要改配置

/etc/systemd/system.conf
DefaultLimitNOFILE=10240

/etc/security/limits.config
* soft nofile 10240
* hard nofile 10240

安装 NTP

sudo apt-get install ntp
sudo update-rc.d ntp defaults

配置 SSH 免密登录

# Ubuntu 默认已安装了 SSH client,需要安装 SSH server
sudo apt-get install openssh-server

# 尝试用 ssh 登录本机,需要密码
ssh localhost

# 退出登录,生成密钥并加入到授权
cd ~/.ssh/              # 若没有该目录,请先执行一次 ssh localhost
ssh-keygen -t rsa       # 会有提示,都按回车就可以
cat ./id_rsa.pub >> ./authorized_keys       # 加入授权

# 现在无需密码就可以登录了
ssh localhost

如果是多台机,就是要把 *.pub 文件复制到目标机上,并添加到目标机的授权 authorized_keys

安装 Ambari

下载

sudo wget -O /etc/apt/sources.list.d/ambari.list http://public-repo-1.hortonworks.com/ambari/ubuntu18/2.x/updates/2.7.3.0/ambari.list
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com B9733A7A07513CAD
sudo apt-get update

如果 adv 命令报错,可以尝试改成用

sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 B9733A7A07513CAD

检查

apt-cache showpkg ambari-server
apt-cache showpkg ambari-agent
apt-cache showpkg ambari-metrics-assembly

安装

sudo apt-get install ambari-server

配置

sudo ambari-server setup

启动

sudo ambari-server start
sudo ambari-server status

登录 localhost:8080 用户密码 admin/admin

安装 HDP

Ambari 第一次启动时,显示的是安装页面如下,点击 Launch Install Wizard

填写 Cluster Name

下一步选择 HDP 版本,这里可以选择从本地安装,或是从互联网安装

下一步填写 HOST NAME 和 SSH PRIVATE KEY 和 SSH USER

下一步是 Confirm Host,安装 Ambari Agent,如果失败了可以重试

下一步是选择要安装的服务

下一步是分配 Master 节点

下一步是选择 Slave 和 Client

下一步是对选择的服务进行配置

注意到数据库的配置下有这个说明

To use MySQL with Hive, you must download the https://dev.mysql.com/downloads/connector/j/ from MySQL. Once downloaded to the Ambari Server host, run:
ambari-server setup --jdbc-db=mysql --jdbc-driver=/path/to/mysql/com.mysql.jdbc.Driver

下载并执行以下命令

sudo ambari-server setup --jdbc-db=mysql --jdbc-driver=/home/lin/Downloads/mysql-connector-java_8.0.22-1ubuntu18.04_all.deb

下一步是 review 和 deploy,安装过程中可能出错,可以重试,或查看 log,有的把命令贴出来手动执行就可以

安装成功后登陆(这里我把很多服务删了,因为机子性能不够,带不起来)



原文地址:https://www.cnblogs.com/moonlight-lin/p/13929577.html