VMware configuration hadoop to achieve pseudo-distributed graphic tutorial

VMware configuration hadoop to achieve pseudo-distributed graphic tutorial

1. Experimental Environment

serial number project Software and version
1 operating system CentOS6
2 Environmental Software VMware 12
3 jdk environment jdk1.8.0_181
4 Hadoop Hadoop 2.8.5
5 Native operating system Win10 Professional Edition

2. Prepare the Linux network environment

1.0 Click the VMware shortcut, right-click to open the file location -> double-click vmnetcfg.exe -> VMnet1 host-only -> modify subnet ip to set the network segment: 192.168.150.0 subnet mask: 255.255.255.0 -> apply -> ok

insert image description here

insert image description here

insert image description here

insert image description here

Go back to Windows --> Open Network and Sharing Center -> Change adapter settings -> Right click VMnet1 -> Properties -> Double-click IPv4 -> Set Windows IP: 192.168.150.110 Subnet mask: 255.255.255.0 -> Click OK

insert image description here

insert image description here

insert image description here

insert image description here

On the virtualization software--My Computer -> select the virtual machine -> right click -> settings -> network adapter -> host only -> ok

insert image description here

insert image description here

3. Configure hostname

Change the host name (permanently change)
Modify the hosts file

insert image description here

insert image description here

insert image description here

insert image description here

4. Modify the IP in centos

Modify through the Linux graphical interface (strongly recommended)

Enter the Linux graphical interface -> right click on the two small computers in the upper right corner -> click Edit connections -> select the current network System eth0 -> click the edit button -> select IPv4 -> select manual for method -> click the add button -> add IP: 192.168.150.110 Subnet mask: 255.255.255.0 Gateway: 192.168.150.1 -> apply

insert image description here

insert image description here

5. Permanently turn off the firewall

Check the firewall status

insert image description here

Stop the firewall

insert image description here

Permanently turn off the firewall

insert image description here

6. Unzip JDK

insert image description here

Modify the environment variables and source them

insert image description here

insert image description here

insert image description here

7. Unzip Hadoop

insert image description here

8. Modify configuration files (5)

First: hadoop-env.sh, under /cloud/hadoop-2.8.5/etc/hadoop

Modify about line 27. To see the line number, you can vi the file, press esc, enter a colon, enter set nu and press Enter, and the line number will be displayed.

export JAVA_HOME=/usr/java/jdk1.8.0_181 

insert image description here

insert image description here

Second: core-site.xml

<configuration>
		<!-- Specify the communication address of the HDFS boss (namenode) -->
		<property>
				<name>fs.defaultFS</name>
				<value>hdfs://itcast01:9000</value>
		</property>
		<!-- Specify the storage path for files generated by hadoop during runtime-->
		<property>
				<name>hadoop.tmp.dir</name>
				<value>/cloud/hadoop-2.8.5/tmp</value>
		</property>
	</configuration> 

insert image description here

Third: mapred-site.xml.template needs to be renamed: mv mapred-site.xml.template mapred-site.xml

	<configuration>
<!-- Notify the framework MR to use YARN -->
<property>
		<name>mapreduce.framework.name</name>
		<value>yarn</value>
</property>
		</configuration> 

insert image description here

insert image description here

After finishing here, enter and modify the name of the xml file

mv mapred-site.xml.template mapred-site.xml

Fourth: hdfs-site.xml

	<configuration>
<!-- Set the number of HDFS replicas -->
<property>
		<name>dfs.replication</name>
		<value>1</value>
</property>
		</configuration> 

insert image description here

Fifth: yarn-site.xml

	<configuration>
<!-- The way reducer gets data is mapreduce_shuffle -->
<property>
	<name>yarn.nodemanager.aux-services</name>
	<value>mapreduce_shuffle</value>
</property>
		</configuration> 

insert image description here

insert image description here

9. Add hadoop to environment variables

vim /etc/profile
	export JAVA_HOME=/usr/java/jdk1.8.0_181
export HADOOP_HOME=/cloud/hadoop-2.8.5
export PATH=$PATH:$JAVA_HOME/bin:$HADOOP_HOME/bin
	
		source /etc/profile 

insert image description here

10. Format HDFS (namenode) when using it for the first time (forgot to take a screenshot)

hadoop namenode -format

11. Start Hadoop

Start start-all
Enter ./start-all.sh in /cloud/hadoop/sbin/

insert image description here

Then keep entering the password and yes

insert image description here

12. Enter jps to check whether the configuration is successful

There are 6 things in the red box, and none of them can be missing, otherwise something is not configured properly. According to the experience of my classmates, either the network is not configured properly, or the 5 configuration files above are not written properly. If you can't find them, the simplest, crudest, troublesome but effective method is to install the machine from the beginning. I succeeded in one go.

insert image description here

Enter the browser in centos

Enter the centos ip port number 50070 from the browser to see the following picture

insert image description here

Enter the centos ip port number 8088 from the browser and the following picture will appear, success

insert image description here

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • How to install hadoop1.x under VMware virtual machine
  • Detailed explanation of VMware12 using three virtual machines Ubuntu16.04 system to build hadoop-2.7.1+hbase-1.2.4 (fully distributed)

<<:  JavaScript to achieve a simple carousel effect

>>:  Detailed explanation of MySQL combined index and leftmost matching principle

Recommend

Solution to MySQL master-slave delay problem

Today we will look at why master-slave delay occu...

Mysql transaction concurrency problem solution

I encountered such a problem during development A...

How to configure two-way certificate verification on nginx proxy server

Generate a certificate chain Use the script to ge...

Java example code to generate random characters

Sample code: import java.util.Random; import java...

Example of creating a virtual host based on Apache port

apache: create virtual host based on port Take cr...

Vue implements countdown between specified dates

This article example shares the specific code of ...

How to achieve centered layout in CSS layout

1. Set the parent container to a table and the ch...

How to import, register and use components in batches in Vue

Preface Components are something we use very ofte...

How does JS understand data URLs?

Table of contents Overview Getting started with d...

Example of how to quickly build a Redis cluster with Docker

What is Redis Cluster Redis cluster is a distribu...

Detailed explanation of count(), group by, order by in MySQL

I recently encountered a problem when doing IM, a...

Summary of events that browsers can register

Html event list General Events: onClick HTML: Mous...