Changeset 163 for nutchez-0.2


Ignore:
Timestamp:
Jun 7, 2010, 6:44:27 PM (14 years ago)
Author:
shunfa
Message:

修改安裝檔

Location:
nutchez-0.2/src/test
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • nutchez-0.2/src/test/install

    r161 r163  
    4747}
    4848
     49# todo: 處理/etc/hosts
     50# 多張網卡時的bug
    4951main
  • nutchez-0.2/src/test/install_func.sh

    r161 r163  
    2525Index_DB=$User_HOME/search
    2626Admin_email=nutchuser@nutch
    27 
    28 # $MasterIP_Address
    29 # $net_MacAddr
     27Start_PATH=`pwd`
     28MasterIP_Address=`/sbin/ifconfig eth0 | grep 'inet addr' |  sed 's/^.*addr://g' | sed 's/Bcast.*$//g' | sed 's/ .*// '`
     29net_MacAddr=`/sbin/ifconfig eth0 | grep 'HW' | sed 's/^.*HWaddr //g'`
    3030
    3131######function section section#######
     
    7373    net_address=$(ifconfig $net_interfaces | grep "inet addr:" | sed 's/^.*inet addr://g' | cut -d " " -f1)
    7474    net_MacAddr=$(ifconfig $net_interfaces | grep 'HW' | sed 's/^.*HWaddr //g')
    75     echo "net_address is $net_address"
    76     echo "net_MacAddr is $net_MacAddr"
     75    #echo "net_address is $net_address"
     76    #echo "net_MacAddr is $net_MacAddr"
    7777
    7878  # 若有多個 eth 時
     
    9494    echo "Your choice is $net_choice"
    9595    net_interface=$(echo $net_interfaces | cut -d " " -f $net_choice)
    96     ifconfig $net_interface | grep "inet addr:" | sed 's/^.*inet addr://g' | cut -d " " -f1
     96    #ifconfig $net_interface | grep "inet addr:" | sed 's/^.*inet addr://g' | cut -d " " -f1
    9797    net_address=$(ifconfig $net_interface | grep "inet addr:" | sed 's/^.*inet addr://g' | cut -d " " -f1)
    9898    net_MacAddr=$(ifconfig $net_interfaces | grep 'HW' | sed 's/^.*HWaddr //g')
     
    105105function show_info () {
    106106  echo "The Master IP Address is $MasterIP_Address"
     107  echo "The Master MacAddr is $net_MacAddr"
    107108}
    108109
     
    179180
    180181function client_PassMasterIPAddr () {
     182  cd $Start_PATH
    181183  Line_NO=`cat client_install | grep -n '# Master IP here' | sed 's/:.*//g'`
    182184  debug_echo "debug...Master IP here line number = $Line_NO..."
     
    187189}
    188190
     191
    189192function client_PassMaster_Hostname () {
     193  cd $Start_PATH
    190194  Line_NO=`cat client_install | grep -n '# Master Hostname here' | sed 's/:.*//g'`
    191195  debug_echo "debug...Master hostname here line number = $Line_NO..."
     
    195199  debug_echo "edit client_install done..."
    196200}
     201
    197202
    198203function make_client_install () {
     
    210215  # 複製檔案至$User_HOME/source目錄下
    211216  mv NutchezForClientOf_$Master_IP_Address.tar.gz /home/nutchuser/nutchez/source
    212   cp client_install client_install_func.sh /home/nutchuser/nutchez/source
     217  cp $Start_PATH/client_install $Start_PATH/client_install_func.sh /home/nutchuser/nutchez/source
    213218}
    214219
     
    223228# client簡易步驟
    224229function client_install_command () {
    225   debug_echo "Client Install Command as Follows:"
    226   debug_echo "cd ~"
    227   debug_echo "mkdir nutchez_client_install"
    228   debug_echo "cd nutchez_client_install"
    229   debug_echo "scp nutchuser@masterIP:/home/nutchuser/nutchez/source/* ."
    230   debug_echo "./client_install"
    231 }
     230  echo "Client Install Command as Follows:"
     231  echo "cd ~"
     232  echo "mkdir nutchez_client_install"
     233  echo "cd nutchez_client_install"
     234  echo "scp nutchuser@masterIP:/home/nutchuser/nutchez/source/* ."
     235  echo "./client_install"
     236}
Note: See TracChangeset for help on using the changeset viewer.