wiki:NTU131002/Lab6

◢ <實作五> | <回課程大綱> ▲ | <實作七> ◣

實作六 Lab6

Hadoop 叢集示範 (兩台 Linux)
Hadoop Cluster in Full Distributed Mode

  • 假設您申請到的第一台 easycloud VM 的 IP 是 192.168.125.1 ,也已經跑了 lab002/hadoop-full-mode
  • 讓我們再申請第2台,並且執行 lab000 跟 lab002。
    ~$ su -
    ~# locale-gen zh_TW.UTF-8
    ~# echo "nameserver 8.8.8.8" >> /etc/resolv.conf
    ~# apt-get update
    ~# apt-get -y install git
    ~# git clone https://github.com/jazzwang/hadoop_labs.git
    ~# cd hadoop_labs
    ~/hadoop_labs# lab000/hadoop-local-mode
    ~/hadoop_labs# lab002/hadoop-full-mode
    ~/hadoop_labs# lab000/hadoop-local-mode
    ~/hadoop_labs# cd
    ~# cp -R hadoop/conf.full hadoop/conf.new
    ~# rm hadoop/conf
    ~# ln -s ~/hadoop/conf.new ~/hadoop/conf
    ~# rm -rf ~/hadoop/var/
    ~# sed -i "s#$(hostname)#192.168.125.1#g" ~/hadoop/conf/core-site.xml
    ~# sed -i "s#$(hostname)#192.168.125.1#g" ~/hadoop/conf/mapred-site.xml
    ~# source .bashrc
    ~# hadoop-daemon.sh start datanode
    ~# hadoop-daemon.sh start tasktracker
    
Last modified 11 years ago Last modified on Oct 3, 2013, 3:20:18 PM