栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

centos7+docker+hadoop集群 搭建

centos7+docker+hadoop集群 搭建

安装docker

yum 即可

安装docker

yum 即可

下载镜像
git clone https://github.com/kiwenlau/hadoop-cluster-docker
获取配置文件 必备环节!
git clone https://github.com/kiwenlau/hadoop-cluster-docker
修改配置文件

在-p 8088:8088 下添加一行
-p 9000:9000

启动容器 进入下载目录
cd hadoop-cluster-docker/

./start-container.sh 

这时候会话自动变成了hadoop-master权限

进入容器终端

systemctl start docker 看情况是否使用
···

sudo docker attach hadoop-master
···
这里要回车下 不然显示空白,像是卡主一样

容器终端中安装vim

默认速度较慢,可修改国内源。

本地建
gedit sources.list

内容如下:

deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

复制到容器-注意本地路径和使用的终端左边是本地,右边是docker
sudo cp /etc/apt/sources.list /etc/apt/sources.list.copy

生效
sudo apt-get install vim
安装
sudo apt-get install vim

三分钟左右

启动

回到根目录 ~

./start-hadoop.sh

一堆warning出来,不用管。

查看运行情况

访问:
ip通过ifconfig拿到

http://192.168.58.129:50070/

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/775190.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号