
上QQ阅读APP看书,第一时间看更新
Apache Hadoop installation
After the successful installation of the prerequisites, it is now time to start the installation and configuration of Hadoop itself. The following are the steps to get started:
- Download the stable version of Apache Hadoop from http://www-us.apache.org/dist/hadoop/common/. As of now the stable version available for download is hadoop-2.8.1.
- Extract the downloaded file by using the following command:
$ tar zxvf hadoop-2.8.1.tar.gz
- It's time to configure some parameters to run Hadoop. Use the following command to edit the hadoop-env.sh configuration file:
$ gedit etc/hadoop/hadoop-env.sh
- Look for the following line to set the JAVA_HOME path. Replace /home/hadoopadmin/jdk1.8.0_144/ with the directory where you have installed it. In our case, it will remain the same:
# set to the root of your Java installation
export JAVA_HOME=/home/hadoopadmin/jdk1.8.0_144/
- It's time to test the basic configuration of Hadoop. Try to run the following command in your terminal:
$ bin/hadoop
If you get some usage documentation of the Hadoop script, it means it is configured correctly. If not, it may be that you have made a mistake in one of the preceding steps. Try to go through them again to make sure every step has been followed correctly.