centos - hadoop fully distributed

1,配置DNS
vi /etc/hosts
192.168.73.130 hadoop01
192.168.73.128 hadoop02
192.168.73.129 hadoop03
192.168.73.131 hadoop04
2. Turn off the firewall testing phase
# close the service
systemctl STOP firewalld
# close the boot from the start
systemctl disable firewalld
3. Configure a free password
vi /etc/ssh/sshd_config
Yes RSAAuthentication
           
PubkeyAuthentication yes
           
# key file path          
           
AuthorizedKeysFile ~ / .ssh / authorized_keys
If the root user needs to log in as root open
-P keygen -t-RSA SSH '' -f ~ / .ssh / id_rsa
SCP hadoop01 the authorized_keys: ~ / .ssh /
CAT id_rsa.pub the authorized_keys >>
After copying machine is added to each copied back to the last four machines
ssh itself if there are problems copied to other machines
ssh-the Add id_rsa
ssh-Agent
eval $ (ssh-Agent)
ssh-the Add id_rsa
ssh-Copy-the above mentioned id root @ hadoop04
 

chmod 755 /root
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
service sshd restart
4JAVA environment and Hadoop
cd /home
mv jdk-8u201-linux-x64/ java

tar -zxvf hadoop-3.2.0.tar.gz
mv hadoop-3.2.0 hadoop
vi /etc/profile
export JAVA_HOME=/home/java/jdk1.8.0_201
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
export HADOOP_HOME=/home/hadoop
export PATH=$PATH:$HADOOP_HOME/bin
export PATH=$PATH:$HADOOP_HOME/sbin
export HADOOP_CONF_DIR=${HADOOP_HOME}/etc/hadoop
777 /home/java/jdk1.8.0_201/bin/java the chmod
Source / etc / Profile
verification Java
Java -version
cd / home / hadoop / etc / hadoop
we hadoop-env.sh
we mapred-env.sh
we yarn-env.sh
export JAVA_HOME="/home/java/jdk1.8.0_201"
5. Modify Profile Hadoop
-demand etc / hadoop Hadoop installation directory under the directory to be modified core-site.xml, hdfs-site.xml, mapred-site.xml, yarn-site.xml, workers file, in accordance with The actual situation modify configuration information.
 
 Attached link https://www.cnblogs.com/shireenlee4testing/p/10472018.html

Guess you like

Origin www.cnblogs.com/wygflying163/p/11511460.html