hadoop-docker环境从零搭

《1,虚拟机ubuntu16.04》

设置root用户初始密码

sudo passwd

《2,ssh》

apt-get update

apt-get install openssh-server

允许root登录

vi /etc/ssh/sshd_config 

=》1

# Authentication: 

LoginGraceTime 120 

#PermitRootLogin without-password 

PermitRootLogin yes 

StrictModes yes 

=》2

service ssh restart

关闭防火墙

ufw disable

ufw enable

《3,git》

《4,python》

apt-get install python2.7 or apt-get install python3.4 

python2.7 --version 

软连接python

ln -s /usr/bin/python2.7 /usr/bin/python

安装pip

apt-get install python-pip

《5,docker》

sudo apt-get -y install \

  apt-transport-https \

  ca-certificates \

  curl


curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -


sudo add-apt-repository \

      "deb [arch=amd64] https://download.docker.com/linux/ubuntu \

      $(lsb_release -cs) \

      stable"


apt-get update

apt-get -y install docker-ce

=>1,配置镜像加速

mkdir -p /etc/docker

vi /etc/docker/daemon.json

{

  "registry-mirrors": ["https://tgkmf0a7.mirror.aliyuncs.com"]

}

sudo systemctl daemon-reload

sudo systemctl restart docker

=>2,安装docker-compose

pip install docker-compose

=>3,下载docker镜像文件

(1)从github

https://github.com/big-data-europe/docker-hive.git

docker-compose up -d

重构,启动

(2)从仓库

https://hub.docker.com/r/bde2020/hive/

simple as:

docker run -it --rm -p 8080:8080 -p 8081:8081 -p 7077:7077 -p 50070:50070 -p 8088:8088 gsoertsz/hadoop-hive-spark -bash

你可能感兴趣的:(hadoop-docker环境从零搭)