- ####在参考 博客: [基于Docker搭建Hadoop集群之升级版] 前提下从Ubuntu 更改成 Centos7 (http://kiwenlau.com/2016/06/12/160612-hadoop-cluster-docker-update/)
sudo docker pull kiwenlau/hadoop:1.0
git clone https://github.com/pkeropen/hadoop-docker.git
sudo docker network create --driver=bridge hadoop
cd hadoop-cluster-docker
sudo ./start-container.sh
output:
start hadoop-master container...
start hadoop-slave1 container...
start hadoop-slave2 container...
root@hadoop-master:~#
- 开启3个容器 ,一个主容器, 二个副容器
- 同时进去主容器, 可以执行下一步命令
./start-hadoop.sh
./run-wordcount.sh