Article From:https://www.cnblogs.com/lyr999736/p/9061460.html

One: the types of construction

  1)Local mode

  2)Pseudo distributed model

  3)Fully distributed mode

Let’s learn to build a pseudo – distributed model.

Two: Requirements

  hadoopVersion 2.7.3, this version of the Hadoop some small bug, but does not affect the use of the computer requires 8G memory, the best solid hard disk, will greatly improve the performance of the computer, centos6.5/6.8.

Three: installation steps

    1.Install centos6.5 / 6.8, attention: use the self built user * * *, we use hyxy, password set, we use 123456, can not use root, all of the software in the /home/hyxy/soft directory.

    2.Uninstall the machine with JDK, first use the commandrpm -qa | grep javaDetect what JDK is on the machine, then use JDK rpm -e –nodeps * * * * * to detect the JDK name for you, reg:rpm -e –nodeps java-1.6.0-openjdk-1.6.0.0-1.45.1.11.1.el6.x86_64.

    3.Install JDK1.8 version, create soft connection, create soft connection command: ln -s source file target file.

    4.Configure environment variables in.Bash_profile, write JAVA_HOME, CLASSPATH, PATH.

    5.Install Hadoop, decompress, create soft connections, configure environment variables under.Bash_profile, and specify HADOOP_HOME and PATH.

    6.Use the command source.Bash_profile to take effect. Check whether Java and Hadoop are configured successfully. Input Java -version and Hadoop version will display corresponding version numbers, indicating that the configuration is successful.

    7.Configuration file for configuring Hadoop

      1)hadoop-env.sh Add JAVA_HOME

      2)yarn-env.sh Add JAVA_HOME

      3)core-site.xml 

        Note: localhost is the host name, port number is 9000, the default port number is 8020, and it can not be written.

<configuration>
    <property>
        <name>fs.defaultFS</name>
        <value>hdfs://localhost:9000</value>
    </property>
</configuration>

         4) hdfs-site.xml

<configuration>
    <property>
        <name>dfs.replication</name>
        <value>1</value>
    </property>
</configuration>

 

     8.Configuring non – dense landing

$ ssh localhost(Host name)
$ ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa (Generate secret key) Description: -t set the secret key algorithm using RSA, -P set the password to be empty by default, -f set secret key generated file location ~/.ssh$cat ~/.ssh/id_rsa.pub > > ~/.ssh/autHorized_keys (generating authentication library)$Chmod 0600 ~/.ssh/authorized_keys (modify permissions)

 

    9.Formatted file system

      Use the command: HDFS namenode -format

    10.Open service

      Using the command start-all.sh, enter the JPS command to view the daemon, a total of 5, and the input http://localhost:50070/ will see that your live node is configured correctly for a description, and 50070 is the default port number.

    

 

Leave a Reply

Your email address will not be published. Required fields are marked *