一、环境的准备
在单机的情况下,是通过docker添加server和client镜像,来创建三个容器来模拟真实的主机的。
环境的准备:
1.docker安装
2.server和client镜像的制作
3.ambari安装时,已下载的离线源制做,见附录
二、环境的安装
(1)首先安装docker,docker安装需要ubuntu版本的最低内核要求为3.1.ubuntu16与14的安装步骤不同
1.获取HTTPS 传输的软件包以及 CA 证书
$ sudo apt-get update
$ sudo apt-get install \
ca-certificates \
curl \
software-properties-common
2.安装dockerCE
$sudo apt-get install docker-ce
--net=host --name="net_host-hdp-client1" -v /home:/home
ambari-agent:v1.0 /bin/bash
分别创建了容器名,网络链接方式,挂载位置等,也可以启动后容器设置,具体命令见附
(3)启动起容器后可以使用ssh进行访问,接下来就是对ambari所需要的环境进行配置
1.设置root密码,方便后续ssh免密码登录,密码统一设置为123:
2.确保安装ntp,ssh ambari在安装时会检查你是否安装
同时
vim
/etc/ssh/sshd_config
0语句前加入:
start
start
4.允许使用公钥访问(每个虚拟机都做)
vi/etc/ssh/sshd_config
找到以下内容,并去掉注释符“#”
RSAAuthenticationyes
PubkeyAuthenticationyes
AuthorizedKeysFile.ssh/authorized_keys
5.如出现在容器中不能使用apt-getuodate换阿里源
6.确保集群中所有的节点都可以相互无密访问,包括自己ssh localhost包含
:127.0.0.1以及::1
(4)进行ambari的离线安装
已搭建好见附
3、配置
然后添加秘钥:apt-key
4.安装
安装ambari-server
在线配置ambari-server:
5.服务启动
ambari-server
start
6.访问网站
主机ip:8080