Windows Hadoop learning stand-alone installation

Hadoop configuration environment variable:
1.Windows environment variable configuration

   Right-click 'Computer' - 'Properties' - 'Advanced System Settings' - 'Environment Variables' - Click New Figure:

2. Then find the environment variable path, the hadoop's bin directory to back:

Hadoop modify configuration files

(1) Edit "D: \ hadoop-2.7.5 \ etc \ hadoop" core-site.xml file, paste the following text into it, and save it;

<configuration>
    <property>
        <name>hadoop.tmp.dir</name>
        <value>/D:/hadoop-2.7.5/workplace/tmp</value>
    </property>
    <property>
        <name>dfs.name.dir</name>
        <value>/D:/hadoop-2.7.5/workplace/name</value>
    </property>
    <property>
        <name>fs.default.name</name>
        <value>hdfs://localhost:9000</value>
    </property>
</configuration>

(2) Edit "D: \ hadoop-2.7.5 \ etc \ hadoop" directory under mapred-site.xml (mapred-site.xml.template will not rename mapred-site.xml) file, paste it and save it:

<configuration>
    <property>
       <name>mapreduce.framework.name</name>
       <value>yarn</value>
    </property>
    <property>
       <name>mapred.job.tracker</name>
       <value>hdfs://localhost:9001</value>
    </property>
</configuration>

(3) Edit "D: \ hadoop-2.7.5 \ etc \ hadoop" hdfs-site.xml file in the directory, paste the following content and save it. Please create your own data directory, where I create a workplace / data directory under HADOOP_HOME catalog:

<configuration>
    <!-- 这个参数设置为1,因为是单机版hadoop -->
    <property>
        <name>dfs.replication</name>
        <value>1</value>
    </property>
    <property>
        <name>dfs.data.dir</name>
        <value>/D:/hadoop-2.7.5/workplace/data</value>
    </property>
</configuration>

(4) Edit "D: \ hadoop-2.7.5 \ etc \ hadoop" yarn-site.xml file in the directory, paste the following content and save it;

<configuration>
    <property>
       <name>yarn.nodemanager.aux-services</name>
       <value>mapreduce_shuffle</value>
    </property>
    <property>
       <name>yarn.nodemanager.aux-services.mapreduce.shuffle.class</name>
       <value>org.apache.hadoop.mapred.ShuffleHandler</value>
    </property>
</configuration>

(5) Edit "D: \ hadoop-2.7.5 \ etc \ hadoop" hadoop-env.cmd files in the directory, comment out the JAVA_HOME with @rem, edit the JAVA_HOME path, and then save it:

@rem set JAVA_HOME=%JAVA_HOME%
set JAVA_HOME=D:\java\jdk

Replace the files
will be downloaded hadooponwindows-master.zip (note the first step in the download address, you do not know can go to the beginning of demand notes column view) unpack all of the files in the bin directory of the unzipped directly covered bin directory of Hadoop. Note: Download hadooponwindows-master.zip (useful for later)

Operating Environment

1. Run cmd window and execute "hdfs namenode -format

2. Run the cmd window, switch to the hadoop sbin directory, the implementation of "start-all.cmd", it will start the following process.

 

Transfer: https://blog.csdn.net/a2099948768/article/details/79577246

Guess you like

Origin www.cnblogs.com/sunfie/p/12243042.html