[[PageOutline]] ◢ <[wiki:YZU130807/Lab15 實作十五]> | <[wiki:YZU130807 回課程大綱]> ▲ | <[wiki:YZU130807/Lab17 實作十七]> ◣ = 實作十六 Lab 16 = {{{ #!html
單機模式(Local Mode)操作觀察
Hadoop Local Mode (Standalong Mode)
}}} {{{ 請準備 Ubuntu 12.04 實驗環境(安裝光碟 Live CD 亦可),以下步驟請以安裝光碟 Live CD 為例 }}} == 下載 VirtualBox (Download VirtualBox) == * 請前往 VirtualBox 官方網站 https://www.virtualbox.org/ 下載最新 VirtualBox 安裝檔。 * https://www.virtualbox.org/wiki/Downloads * 例如:[http://download.virtualbox.org/virtualbox/4.2.16/VirtualBox-4.2.16-86992-Win.exe VirtualBox 4.2.16 for Windows hosts x86/amd64] == 下載 Ubuntu ISO 光碟 == * Ubuntu Linux 是一套以桌面使用為主要訴求的作業系統,習慣上我個人比較喜歡安裝 Debian Linux 提供線上服務,但如果遇到一些比較新的硬體,則選用源自 Debian 的 Ubuntu 會是比較容易上手的選擇。 * 首先,請到 Ubuntu 正體中文站下載光碟 ISO 檔 * http://www.ubuntu-tw.org/modules/tinyd0/ * 為了統一步驟起見,這裡我們選擇使用 Ubuntu 12.04 LTS 的版本,並由國網中心的映射站下載 * 以下的實作我們使用的是 Ubuntu 12.04 LTS PC (Intel x86) desktop CD * http://free.nchc.org.tw/ubuntu-cd/precise/ubuntu-12.04.3-desktop-i386.iso == 製作 USB 開機碟 == * 參考 https://help.ubuntu.com/community/Installation/FromUSBStick * 這裡我們使用 Windows 版的 UNetbootin 來製作 Ubuntu 12.04 的 Live USB * 首先下載 [http://sourceforge.net/projects/unetbootin/files/UNetbootin/585/unetbootin-windows-585.exe/download?use_mirror=jaist unetbootin-windows-585.exe] == Install Git == {{{ ubuntu@ubuntu:~$ sudo apt-get install git }}} {{{ ubuntu@ubuntu:~$ git clone https://github.com/jazzwang/hadoop_labs.git }}} {{{ ubuntu@ubuntu:~$ hadoop_labs/lab000/hadoop-local-mode }}} * 操作參考 - https://raw.github.com/jazzwang/hadoop_labs/master/outline {{{ user@node36:~$ sudo apt-get install git user@node36:~$ git clone https://github.com/jazzwang/hadoop_labs.git user@node36:~$ hadoop_labs/lab000/hadoop-local-mode user@node36:~$ jps user@node36:~$ netstat -nap | grep java user@node36:~$ export PATH=${HOME}/hadoop/bin:$PATH user@node36:~$ hadoop fs -ls user@node36:~$ hadoop fs -mkdir tmp user@node36:~$ hadoop fs -ls user@node36:~$ cd tmp user@node36:~/tmp$ hadoop fs -put ${HOME}/hadoop/conf input user@node36:~/tmp$ cp ~/hadoop/hadoop-examples-1.0.4.jar . user@node36:~/tmp$ hadoop jar hadoop-examples-1.0.4.jar wordcount input output }}}