This post records how to install Apache Hadoop(single node) on Mac. This is useful when you want to run some simplge tasks on your local environment. From here. In my case the Hadoop version is “3.3.0” rather than “3.2.1” used in this article, and my JDK version is “1.8.0_201”.
- Install Hadoop with HomeBrew
1 | brew install hadoop |
- Configure
2.1 Open the “/usr/local/Cellar/hadoop/3.3.0/libexec/etc/hadoop/hadoop-env.sh” file and do the following modifications:
1 | # 1. Add the following content: |
2.2 “core-site.xml”
1 | <configuration> |
2.3 “hdfs-site.xml”
1 | <configuration> |
2.4 “mapred-site.xml”
1 | <configuration> |
2.5 “yarn-site.xml”
1 | <configuration> |
- SSH login
From here.
Go to “go to “System Preference > Sharing”, enable “Remote Login” and “Allow access for: All Users”. In my case I only enable the “administror” and it works.
- Format NameNode
1 | cd /usr/local/cellar/hadoop/3.3.0/libexec/bin |
- Run Hadoop
1 | cd /usr/local/cellar/hadoop/3.3.0/libexec/sbin |
- Check the status of Hadoop
Open the URL “http://localhost:9870“ in Browser.
- Close Hadoop
1 | cd /usr/local/cellar/hadoop/3.3.0/libexec/sbin |