1. 下载docker.dmg
2. 运行docker pull拉去centos镜像
docker pull centos:centos7
docker run -it centos:centos7 /bin/bash
3. 创建hadoop用户4. 把wget,vim,sudo,telnet,openssl server和client还有initscripts都要记得装上
5. 下载hadoop
wget http://archive.cloudera.com/cdh5/cdh/5/hadoop-2.6.0-cdh5.9.1.tar.gz
6. 下载jdk8wget wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u91-b14/jdk-8u91-linux-x64.tar.gz
7. 解压安装后格式化HDFS:
遇到第一个问题:
[root@58d9fc9eb3de hadoop]# bin/hadoop namenode-format
Error: Could not find or load main class namenode-format
原因是namenode后面是有个空格的。。。之后遇到ssh无法连接问题,yum了openssl以及
yum install initscripts #用以解决functions找不到问题
8. 配置了ssh免密码登录
ssh-keygen -t rsa
cat id_rsa.pub >> authorized_keys
9. 修改配置文件: /etc/hosts,
修改slaves
localhost
yarn001
修改yarn-site.xml