Install by Docker

Docker 方式安装

快速安装

$ git clone https://github.com/big-data-europe/docker-hadoop.git
$ cd docker-hadoop
# 选择版本
$ git tag --list
# 切换到制定版本
$ git branch hadoop-3.2.1 2.0.0-hadoop3.2.1-java8
$ git checkout hadoop-3.2.1

# 启动
$ docker-compose up -d

# 退出并删除容器
# $ docker-compose down

依赖的镜像

$ docker images
REPOSITORY                       TAG                       IMAGE ID            CREATED             SIZE
bde2020/hadoop-nodemanager       2.0.0-hadoop3.2.1-java8   4e47dabd148f        6 months ago        1.37GB
bde2020/hadoop-resourcemanager   2.0.0-hadoop3.2.1-java8   3deba4a1885f        6 months ago        1.37GB
bde2020/hadoop-namenode          2.0.0-hadoop3.2.1-java8   839ec11d95f8        6 months ago        1.37GB
bde2020/hadoop-historyserver     2.0.0-hadoop3.2.1-java8   173c52d1f624        6 months ago        1.37GB
bde2020/hadoop-datanode          2.0.0-hadoop3.2.1-java8   df288ee0a7f9        6 months ago        1.37GB

测试集群

访问: http://localhost:9870/explorer.html#/

$ docker exec -it namenode bash

$ hadoop fs -ls /
Found 1 items
drwxr-xr-x   - root supergroup          0 2020-08-25 14:46 /rmstate

Read More