sudo tar -zxvf hadoop-3.1.2.tar.gz -C /usr/local
sudo mv hadoop-3.1.2/ ./hadoop
sudo chown -R hosea ./hadoop/
vim etc/hadoop/hadoop-env.sh
export JAVA_HOME=/usr/lib/jvm/jdk1.8.0_212
./bin/hadoop
mkdir input
cp etc/hadoop/*.xml input
./bin/hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-3.1.2.jar grep input output 'dfs[a-z.]+'
cat output/*
sudo vim /etc/profile
export HADOOP_HOME=/usr/local/hadoop
export PATH=${HADOOP_HOME}/bin:${HADOOP_HOME}/sbin:$PATH
source /etc/profile
hadoop version