In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
Vi / etc/hosts
Add Node dns Information
192.168.209.157 node1
192.168.209.158 node2
192.168.209.159 node3
Vi / etc/profile
Add a running directory
Export HADOOP_HOME=/home/hadoop/hadoop-3.1.0
ExportPATH=$PATH:$HADOOP_HOME/bin
Copy to each node in the past
Scp / etc/profile node2:/etc/profile
Scp / etc/profile node3:/etc/profile
Execute at each node
Source / etc/profile
Refresh configuration
Then copy the key to different nodes
Ssh-copy-id node1
Ssh-copy-id node2
Ssh-copy-id node3
Mkdir tmp creates a temporary directory
Create data and name in / home/hadoop/hadoop-3.1.0
Vi / home/hadoop/hadoop-3.1.0/etc/hadoop/core-site.xml
Fs.defaultFS
Hdfs://node1:50070
Hadoop.tmp.dir
/ home/hadoop/hadoop-3.1.0/tmp
Vi / home/hadoop/hadoop-3.1.0/etc/hadoop/hdfs-site.xml
Dfs.namenode.http-address node1:50070 dfs.namenode.secondary.http-address node2:50090 dfs.namenode.name.dir / home/hadoop/hadoop-3.1.0/name dfs.replication 2 dfs.datanode.data.dir / home/hadoop/hadoop-3.1.0/data
Vi / home/hadoop/hadoop-3.1.0/etc/hadoop/mapred-site.xml
Mapreduce.framework.name yarn
Vi / home/hadoop/hadoop-3.1.0/etc/hadoop/yarn-site.xml
Yarn.resourcemanager.hostname master yarn.nodemanager.aux-services mapreduce_shuffle yarn.nodemanager.aux-services.mapreduce.shuffle.class org.apache.hadoop.mapred.ShuffleHandler
It's starting to start.
. / bin/hdfs namenode-format
I can't find java. Let me fix a mistake.
Find the location of the bag.
Rpm-qal | grep jdk
Vi / etc/profile
Join the java environment configuration information
Export JAVA_HOME=/usr/java/jdk1.8.0_162 export PATH=$JAVA_HOME/bin:$PATH
Export HADOOP_HOME=/home/hadoop/hadoop-3.1.0
ExportPATH=$PATH:$HADOOP_HOME/bin
Refresh the configuration source / etc/profile
Format it again.
. / bin/hdfs namenode-format
Start the failed bird.
Let me fix a mistake.
SHUTDOWN_MSG: Shutting down NameNode at java.net.UnknownHostException: hadoop-1: hadoop-1: Name or service not known
The local name is hadoop-1, which is different from the node1 in the configuration, so nmtui is changed to hostname first.
Format again
Start dfs
. / sbin/start-dfs.sh
Wrong bird
Starting namenodes on [node1] node1: ERROR: JAVA_HOME is not set and could not be found.
I have obviously set up javahome. Take a look at the log again. There is a black word.
Vi. / etc/hadoop/hadoop-env.sh
Export JAVA_HOME=/usr/java/jdk1.8.0_162
Start dfs again
None of the three stations reported anything wrong.
Start yarm
. / sbin/start-yarn.sh
Components started by node1
Node2 component
Node3 component
There are all startup commands in the sbin directory
. sbin/start-all.sh
. sbin/stop-all.sh
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.