System environment :

                CentOS7.9

close :    

                selinux、firewalld

Software version :

               jdk-16_linux-x64 

               hadoop-2.10.1      

One 、 Create two directories

mkdir -p /opt/software

mkdir -p /opt/module

Two 、 Upload hadoop-2.10.1 and jdk-16_linux-x64 To /opt/software Catalog

image.png

3、 ... and 、 Decompress package

tar -xvf /opt/software/jdk-16_linux-x64_bin.tar.gz -C /opt/module/

tar -xvf /opt/software/hadoop-2.10.1.tar.gz -C /opt/module/


Four 、 To configure jdk、hadoop Environment variables of

image.png

image.png

5、 ... and 、 Load the newly added environment variable parameters into the system to take effect

source /etc/profile

6、 ... and 、 To configure hadoop Call path in software

vim /opt/module/hadoop-2.10.1/etc/hadoop/hadoop-env.sh

image.png


7、 ... and 、 Stand alone mode has been configured , Start a statistics file and try

./bin/hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-2.10.1.jar wordcount /test_data/test.txt /home/test1.txt

image.png

8、 ... and 、 Check the statistics

cat /home/test1.txt/part-r-00000

image.png