Hadoop2.7.3分布式环境准备
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Hadoop2.7.3分布式环境准备相关的知识,希望对你有一定的参考价值。
一.安装CentOS7主机名 | IP |
hadoop0 | 192.168.1.111 |
hadoop1 | 192.168.1.112 |
hadoop2 | 192.168.1.113 |
2.1.从普通用户切换到root用户:
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=hadoop0
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=hadoop1
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=hadoop2
sudo systemctl enable iptables && sudo systemctl enable ip6tables
sudo systemctl start iptables && sudo systemctl start ip6tables
# chown lsq: ~/.ssh
# chown lsq: ~/.ssh/*
# chmod 700 ~/.ssh
# chmod 600 ~/.ssh/*
# scp ~/.ssh/hadoop1.id_rsa.pub hadoop0:~/.ssh
# cp ~/.ssh/id_rsa.pub ~/.ssh/hadoop2.id_rsa.pub# scp ~/.ssh/hadoop2.id_rsa.pub hadoop0:~/.ssh
# cat id_rsa.pub >> authorized_keys
# cat hadoop1.id_rsa.pub >>authorized_keys
# cat hadoop2.id_rsa.pub >>authorized_keys
# scp authorized_keys hadoop1:~/.ssh
# scp authorized_keys hadoop2:~/.ssh
# scp -r /usr/local/jdk1.8 hadoop1:/usr/local/
# scp -r /usr/local/jdk1.8 hadoop2:/usr/local/
export JAVA_HOME=/usr/local/jdk1.8
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$JAVA_HOME/bin:$PATH
# source /etc/profile
以上是关于Hadoop2.7.3分布式环境准备的主要内容,如果未能解决你的问题,请参考以下文章
Ubuntu14.04或16.04下安装JDK1.8+Scala+Hadoop2.7.3+Spark2.0.2