Changes between Version 6 and Version 7 of 0428Hadoop_Lab3


Ignore:
Timestamp:
Apr 27, 2009, 6:40:38 PM (15 years ago)
Author:
waue
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • 0428Hadoop_Lab3

    v6 v7  
    3737~$ rm -rf ~/.ssh
    3838}}}
    39 
    40 
    4139 == step 0. 設定機器的ip & hostname 資訊 ==
    4240 ps: 此步驟相當重要,請務必兩台電腦都作妥
     
    4644# echo "node01" > /etc/hostname
    4745# hostname -F /etc/hostname
    48 # exit
    4946}}}
    5047 * 把hostname 放到hosts的第一行
    5148{{{
    52 $ sudo gedit /etc/hosts
     49# cat >> /etc/hosts << EOF
    5350}}}
    5451如:192.168.xx.xx 是指你手邊電腦的ip,192.168.oo.oo則是Node 2的ip
     
    5754192.168.xx.xx node01
    5855192.168.oo.oo node02
    59 ....(省略)
    60 }}}
    61 
    62  * 接著按組合鍵重新啟動圖形介面:''' [Ctrl]+[Alt]+[Backspace]''' (三鍵同時按)
     56127.0.0.1 localhost
     57EOF
     58}}}
     59 * 登出root
     60{{{
     61# exit
     62$
     63}}}
     64
    6365 == step 1. 設定兩台機器登入免密碼 ==
    64  
     66
     67 * 請注意我們實驗環境已經把 /etc/ssh/ssh_config裡的StrictHostKeyChecking改成no,下面的指令可以檢查,如果你的設定不同的話,請修改此檔會比較順。
     68{{{
     69$ cat /etc/ssh/ssh_config |grep StrictHostKeyChecking
     70StrictHostKeyChecking no
     71}}}
     72
    6573 * 在Node 1 上操作
    66  
    67 {{{
    68 ~$ sudo gedit /etc/ssh/ssh_config
    69 }}}
    70  * 把原本的ask改成no
    71 {{{
    72 #!sh
    73 StrictHostKeyChecking no
    74 }}}
    75  * 並且把此檔替換到其他node
    76 {{{
    77 ~$ sudo su -
    78 ~# scp /etc/ssh/ssh_config node02:/etc/ssh/
    79 ~# exit
    80 }}}
    81  * 接著將key複製到其他node上
     74 * 接著將key產生並複製到其他node上
    8275{{{
    8376~$ ssh-keygen -t rsa -f ~/.ssh/id_rsa -P ""