Hadoop environment configuration

Facing the school courses that require students to build their own pseudo-distributed model, they will step on the various pitfalls they face.

1. Installation environment ubuntu
2. Install jdk
3. Install Hadoop

1. When installing ubuntu, you need to pay attention to installing ubuntu to create users. The waiting time is relatively long, so you need to be patient.
2. When installing jdk, you need to pay attention to the version number of jdk. It is best to go to the official website to download the 18 version with the linux logo. When configuring the environment: Note: the actual path of jdk on your computer is added after export , do not follow your exact path The textbook, because it is not exactly the same as your computer, don't copy it! ! !
In this case, the version number of java -version will display success .
3. To install Hadoop, first unzip the Hadoop software package and download it from the official website.
Similarly, the path of Hadoop also needs to be changed here, the actual environment of Hadoop after export
is /home/sdm/hadoop-2.7.3. Something like this path.
You can use whereis hadoop to view.

The ls command needs to make full use of the real-time names of jdk and Hadoop, otherwise the file will not be found.

According to the content of the textbook, the address of _ core-site.xml***
Hadoop also needs to be changed to
/home/sdm/hadoop-2.7.3_* (mine is like this)

The five files are in the {HADOOP_HOME}/etc/hadoop directory.
Need to know the real-time path (JAVA_HOME)

Finally, 1. Format HDFS
2.start-all.sh
3.jps (display at least five processes).

Open port 50070 interface
Open port 8088 interface

Maybe you can do it for the first time, but you will find yourself stupid the next day, and you will not be able to open the DataNode and namenode nodes if you open it again.

The IP will change.
It should be noted here that the xshell software will not be able to connect. It is very likely that the ip of ubuntu has changed and
can be viewed by ifconfig.

**Port 8088 cannot be opened no matter what, and the log reports an error warning log warning "Failed to add storage directory"**Solution:
link: add link description

Finally, we restarted the virtual machine and everything was OK. . . . . . . . . . (Speechless four, it’s too troublesome, there is no way, then you have to complete the homework, don’t you, everyone)
Format hdfs
start-all.sh
Both interfaces can be opened.

Originality is not easy, I hope everyone can give us a thumbs up! ! !

Guess you like

Origin blog.csdn.net/m0_54850467/article/details/126665490