Hadoop [Lesson 4]: Hadoop initialization

1. Configure Hadoop environment variables

(1) Modify the configuration file

# vi /etc/profile

Modify the following content:

export HADOOP_HOME=/usr/local/src/hadoop/hadoop-2.7.7
PATH=$PATH:$JAVA_HOME/bin:$HADOOP_HOME/bin

(2) Restart the configuration file

# source /etc/profile

(3) View the hadoop version

# hadoop version

Insert picture description here

2. Start Hadoop

(1) Format

# hdfs namenode -format

Insert picture description here
(2) Startup file

# cd sbin

Insert picture description here

# ./start-dfs.sh

Insert picture description here

# ./start-yarn.sh

Insert picture description here
(3) Check what are the current Jps processes (6)

# jps

Insert picture description here
(4) Turn off the firewall

# firewall-cmd --state

Insert picture description here

# systemctl stop firewalld.service

(5) Browser verification①
http://192.168.184.114:50070
Insert picture description here
② http://192.168.184.114:8088
Insert picture description here

Guess you like

Origin blog.csdn.net/qq_41315788/article/details/109271860