Rate This Document
Findability
Accuracy
Completeness
Readability

Compiling and Configuring Hadoop

This section describes how to compile and deploy Hadoop and configure environment variables to ensure that Hadoop can run properly.

  1. Compile the Hadoop software deployment package hadoop-3.1.1.tar.gz by following the instructions in Hadoop Porting Guide (CentOS & openEuler).
  2. Place hadoop-3.1.1.tar.gz in the /usr/local directory on server1 and decompress it.
    1
    2
    3
    mv hadoop-3.1.1.tar.gz /usr/local
    cd /usr/local
    tar -zxvf hadoop-3.1.1.tar.gz
    
  3. Create a soft link for later version replacement.
    1
    ln -s hadoop-3.1.1 hadoop
    
  4. Setting the Hadoop environment variables.
    1. Open the /etc/profile file.
      1
      vi /etc/profile
      
    2. Press i to enter the insert mode and add environment variables at the end of the file.
      1
      2
      export HADOOP_HOME=/usr/local/hadoop
      export PATH=$HADOOP_HOME/bin:$HADOOP_HOME/sbin:$PATH
      
    3. Press Esc, type :wq!, and press Enter to save the file and exit.
    4. Make the environment variables take effect.
      1
      source /etc/profile