Network Configuration
The first is just a virtual machine installed
Then start configuring a static ip
Back to the virtual machine, select the graphical network settings
Restart to start the network, update some configuration
You can also modify the configuration file manually
Also do not forget to re-look at the network configuration
bash systemctl restart network
Host virtual machines can ping ping
Virtual machines can ping ping Baidu
Network configuration is completed.
JDK installation
Below using ssh for remote connection xshell
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
Install what files to upload gadget
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
Then configure the environment variable on the line, is JAVA_HOME
The final surface plus two on the line and, finally, the source command, check java version on the line, the command wrong, a bar
Hadoop Native Mode Installation
Local mode installation directly extract on the line, you go
Configure the look hadoop environment variables
Last added
Do not forget to use the source command
Direct knock hadoop configuration environment variable test it, no problems
Next, an example of using the hadoop, a jar containing a number of examples of packet
Start by creating a directory input input
Inside prepare some articles in English
You can then execute wordcount example of hadoop
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
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
Local Mode It's that simple, is running about hadoop locally, used for testing hadoop installation