(Review) installed in local mode the Hadoop

Network Configuration

The first is just a virtual machine installed

image.png

Then start configuring a static ip

image.png

 

image.png

 

image.png

 

Back to the virtual machine, select the graphical network settings

image.png

image.png

image.png

image.png

image.png

image.png

image.png

image.png

Restart to start the network, update some configuration

image.png

image.png

 

You can also modify the configuration file manually

image.png

 

image.png

Also do not forget to re-look at the network configuration 

bash systemctl restart network 

 

Host virtual machines can ping ping

image.png

Virtual machines can ping ping Baidu

image.png

 

Network configuration is completed.

 

JDK installation

 

Below using ssh for remote connection xshell

image.png

Enter the password.

 

Come to / at opt ​​directory, create two directories, software used to store jdk, hadoop archive, moduel used to store data after decompression

image.png

 

Install what files to upload gadget

image.png

 

image.png

 

jdk and hadoop (compiled) archive is ready, Portal:

Link: https: //pan.baidu.com/s/1PYqJhfkjYfUNxQTsYbeUcA

Extraction code: 97y4

 

After the upload is complete (local disk copy of the virtual machine thing) is unpacked, you go

image.png

image.png

 

Then configure the environment variable on the line, is JAVA_HOME

image.png

image.png

The final surface plus two on the line and, finally, the source command, check java version on the line, the command wrong, a bar

image.png

 

 

Hadoop Native Mode Installation

Local mode installation directly extract on the line, you go

image.png

 

image.png

 

Configure the look hadoop environment variables

image.png

Last added

image.png

Do not forget to use the source command

image.png

Direct knock hadoop configuration environment variable test it, no problems

image.png

 

Next, an example of using the hadoop, a jar containing a number of examples of packet

image.png

Start by creating a directory input input

image.png

Inside prepare some articles in English

image.png

 

You can then execute wordcount example of hadoop

image.png

You can then view the directory does not need to enter the directory output created in advance, if you create in advance the error, the red arrow pointing to a sign of success

image.png

Look at the results, you this word appears 26 times, ha ha ha, it really is high-frequency words, which you, you also as a word

Because of this example is to distinguish the word according to a space, so the need to put a comma into a space of pretreatment, there is not so deeply involved, and

It was what happened afterwards

image.png

image.png

 

Local Mode It's that simple, is running about hadoop locally, used for testing hadoop installation

Guess you like

Origin www.cnblogs.com/shuaiqi-XCJ/p/11248640.html