Hey. Follow these steps to install hadoop.
First you need to download Hadoop files. You can download it by running the following command in terminal:
$ wget http://mirrors.estointernet.in/apache/hadoop/common/hadoop-3.1.2/hadoop-3.1.2.tar.gz
Next, you will have to extract the Hadoop files:
$ tar -xvf hadoop-3.1.2.tar.gz
Now, you will have to add path to the Hadoop files in the .bashrc file:
$ nano .bashrc
And then add these entries in the file:
export HADOOP_HOME=$HOME/hadoop-3.1.2
export HADOOP_CONF_DIR=$HOME/hadoop-3.1.2/etc/hadoop
export HADOOP_MAPRED_HOME=$HOME/hadoop-3.1.2
export HADOOP_COMMON_HOME=$HOME/hadoop-3.1.2
export HADOOP_HDFS=$HOME/hadoop-3.1.2
export YARN_HOME=$HOME/hadoop-3.1.2
export PATH=$PATH:$HOME/hadoop-3.1.2/bin
Save the file (Ctrl+O and press Enter) and then exit (Ctrl+X)
And then run
$ source .bashrc
Hadoop is installed. To verify, run the below command and you should see a similar output:
$ hadoop version