Skip to content

Instantly share code, notes, and snippets.

@wignesh
Created May 3, 2021 06:10
Show Gist options
  • Select an option

  • Save wignesh/5eefb2e97a167c8344a36a7f34ced0aa to your computer and use it in GitHub Desktop.

Select an option

Save wignesh/5eefb2e97a167c8344a36a7f34ced0aa to your computer and use it in GitHub Desktop.
Hadoop 3.1.4 installation
#!/bin/bash
sudo apt update -y
sudo apt-get install openjdk-8-jre -y
echo "export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-i386" >>~/.bashrc
echo "export PATH=$JAVA_HOME/bin:$PATH" >>~/.bashrc
source ~/.bashrc
wget -qO- https://apachemirror.wuchna.com/hadoop/common/hadoop-3.1.4/hadoop-3.1.4.tar.gz | tar zxvf -
cat > hadoop-3.1.4/etc/hadoop/core-site.xml <<EOF
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://localhost:9000</value>
</property>
</configuration>
EOF
cat > hadoop-3.1.4/etc/hadoop/hdfs-site.xml <<EOF
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
</configuration>
EOF
./hadoop-3.1.4/bin/hdfs namenode -format
./hadoop-3.1.4/sbin/start-dfs.sh
ps -ef | grep hadoop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment