官术网_书友最值得收藏!

Time for action – downloading Hadoop

Carry out the following steps to download Hadoop:

  1. Go to the Hadoop download page at http://hadoop.apache.org/common/releases.html and retrieve the latest stable version of the 1.0.x branch; at the time of this writing, it was 1.0.4.
  2. You'll be asked to select a local mirror; after that you need to download the file with a name such as hadoop-1.0.4-bin.tar.gz.
  3. Copy this file to the directory where you want Hadoop to be installed (for example, /usr/local), using the following command:
    $ cp Hadoop-1.0.4.bin.tar.gz /usr/local
    
  4. Decompress the file by using the following command:
    $ tar –xf hadoop-1.0.4-bin.tar.gz
    
  5. Add a convenient symlink to the Hadoop installation directory.
    $ ln -s /usr/local/hadoop-1.0.4 /opt/hadoop
    
  6. Now you need to add the Hadoop binary directory to your path and set the HADOOP_HOME environment variable, just as we did earlier with Java.
    $ export HADOOP_HOME=/usr/local/Hadoop
    $ export PATH=$HADOOP_HOME/bin:$PATH
    
  7. Go into the conf directory within the Hadoop installation and edit the Hadoop-env.sh file. Search for JAVA_HOME and uncomment the line, modifying the location to point to your JDK installation, as mentioned earlier.

What just happened?

These steps ensure that Hadoop is installed and available from the command line. By setting the path and configuration variables, we can use the Hadoop command-line tool. The modification to the Hadoop configuration file is the only required change to the setup needed to integrate with your host settings.

As mentioned earlier, you should put the export commands in your shell startup file or a standalone-configuration script that you specify at the start of the session.

Don't worry about some of the details here; we'll cover Hadoop setup and use later.

主站蜘蛛池模板: 泰安市| 汉源县| 安乡县| 亳州市| 丹寨县| 黄浦区| 全椒县| 新化县| 兴山县| 襄城县| 松江区| 措勤县| 郎溪县| 葫芦岛市| 辽中县| 尼木县| 凤阳县| 会理县| 兰西县| 奇台县| 浮山县| 营山县| 油尖旺区| 万州区| 读书| 乐山市| 怀仁县| 通城县| 宁河县| 梨树县| 虞城县| 灵山县| 阿坝县| 雷山县| 醴陵市| 永康市| 宁海县| 兰考县| 铜鼓县| 嫩江县| 通榆县|