Changeset 244


Ignore:
Timestamp:
Jul 1, 2010, 4:33:15 PM (14 years ago)
Author:
shunfa
Message:

修改驗證資料夾及語言檔

Location:
nutchez-0.2/src/shell
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • nutchez-0.2/src/shell/client_install

    r241 r244  
    1111# 需要 master_install 設定的參數區
    1212# Master IP here
    13 Master_IP_Address=140.110.138.192
     13Master_IP_Address=your.master.ip.here
    1414# Master Hostname here
    15 Master_Hostname=u1004
     15Master_Hostname=your.msater.hostname.here
    1616# 此檔自己用的參數區
    1717Linux_Distribution="";
  • nutchez-0.2/src/shell/client_install_func.sh

    r242 r244  
    2525
    2626# Default: source english
    27 . $Work_Path/lang/lang_en_US_client_install
     27. $Work_Path/lang/lang_en_US
    2828# if locale is zh then source chinese
    2929
    30 echo $lang | grep 'zh' >> /dev/null && source $Work_Path/lang/lang_zh_TW_client_install
     30echo $lang | grep 'zh' >> /dev/null && source $Work_Path/lang/lang_zh_TW
    3131}
    3232
     
    291291    su nutchuser -c "scp -r -o StrictHostKeyChecking=no nutchuser@$1:/home/nutchuser/nutchez/source/NutchezForClientOf_$Master_IP_Address.tar.gz /home/nutchuser/nutchez/source"
    292292  fi
     293  cp -r lang /home/nutchuser/nutchez/system
     294  cp client_remove lang_link /home/nutchuser/nutchez/system
    293295}
    294296
  • nutchez-0.2/src/shell/client_remove

    r242 r244  
    1010
    1111
    12 source lang_link
    1312# 需要 master_install 設定的參數區
    1413# Master IP here
     
    3130}
    3231##########end echo function ##########
     32
     33function load_default_lang(){
     34
     35lang=$(locale | grep 'LANG=' | cut -d "=" -f2)
     36
     37# Default: source english
     38. lang/lang_en_US
     39# if locale is zh then source chinese
     40
     41echo $lang | grep 'zh' >> /dev/null && source lang/lang_zh_TW
     42}
     43
     44
    3345
    3446# check root
     
    8092# Main function
    8193function main () {
     94  load_default_lang
    8295  check_root
    8396  show_info "$CR_main_echo_1" #"警告 - 此一程式為移除此用戶端的nutch node, 若您為誤執行此一程式, 請按Ctrl+c離開此程序!"
  • nutchez-0.2/src/shell/install

    r224 r244  
    2525# Source functions
    2626  source $Work_Path/install_func.sh;
    27   source $Work_Path/lang_link;
     27#  source $Work_Path/lang_link;
    2828### real code #####
    2929
     
    3838
    3939main () {
     40  load_default_lang
    4041  check_info
    4142  show_info "$MI_main_echo_1"
     
    5253    unzip_nV2_pack
    5354
     55   
    5456    su nutchuser -c "mkdir /home/nutchuser/nutchez"
    5557    su nutchuser -c "mkdir /home/nutchuser/nutchez/urls"
     
    6163    Install_Nutch
    6264
    63     mkdir /var/nutchez
     65   if [ ! -d "/var/nutchez" ]; then
     66     mkdir /var/nutchez
     67   fi
     68
    6469    # 建立 nutch 與 tomcat 的 logs 資料夾
    6570    mkdir /var/nutchez/tomcat-logs
  • nutchez-0.2/src/shell/install_func.sh

    r241 r244  
    3131##########end echo function ##########
    3232
    33 function choose_lang(){
     33function load_default_lang(){
    3434
    3535lang=$(locale | grep 'LANG=' | cut -d "=" -f2)
    3636
    3737# Default: source english
    38 . $Work_Path/install_lang.en
     38. $Work_Path/lang/lang_en_US
    3939# if locale is zh then source chinese
    40 echo $lang | grep 'zh' >> /dev/null && source $Work_Path/install_lang.zh
    41 
    42 # Ask language
    43 echo -e "\n$choose_lang_1"
    44 read -p "$choose_lang_2 " langChoice
    45 
    46 if [ $langChoice == "2" ]; then
    47     source $Work_Path/install_lang.zh
    48 else
    49     source $Work_Path/install_lang.en
    50 fi
     40
     41echo $lang | grep 'zh' >> /dev/null && source $Work_Path/lang/lang_zh_TW
    5142}
    5243
     
    407398  debug_info "$MI_install_Nutch_echo_2 $(hostname)"
    408399# debug_info "Master_Hostname=$(hostname)"
    409   su nutchuser -c "ssh localhost echo $net_address $(hostname) $net_MacAddr \>\> ~/nutchez/system/nutch_nodes"
     400  su nutchuser -c "ssh -o StrictHostKeyChecking=no localhost echo $net_address $(hostname) $net_MacAddr \>\> ~/nutchez/system/nutch_nodes"
    410401  set_hosts
    411402  set_haoop-site
     
    458449function make_client_install () {
    459450  # 建立資料夾(用來存放client的安奘檔)
    460   su nutchuser -c "mkdir $User_HOME/source"
     451
     452   if [ ! -d "$User_HOME/source" ]; then
     453     su nutchuser -c "mkdir $User_HOME/source"
     454   fi
     455
    461456
    462457  # 將Master_IP_Address給client
     
    482477  # 複製 nutchez/source 到使用者的安裝資料夾
    483478   
    484    mkdir $Install_Dir/Client_DIR
    485    cp -rf /home/nutchuser/nutchez/source/* $Install_Dir/Client_DIR/
     479
     480
     481   if [ ! -d "$Install_Dir/Client_Install_DIR" ]; then
     482     mkdir $Install_Dir/Client_Install_DIR
     483   fi
     484   cp -rf /home/nutchuser/nutchez/source/* $Install_Dir/Client_Install_DIR/
    486485   
    487486#  cp $Work_Path/client_install $Work_Path/client_install /home/nutchuser/nutchez/source
     
    514513  show_info "$MI_client_install_commands_echo_4"
    515514  show_info "$MI_client_install_commands_echo_5"
    516   show_info "$MI_client_install_commands_echo_6"
    517   show_info "$MI_client_install_commands_echo_7"
    518 
    519 #  show_info "Client Install Command as Follows:"
    520 #  show_info "cd ~"
    521 #  show_info "mkdir nutchez_client_install"
    522 #  show_info "cd nutchez_client_install"
    523 #  show_info "scp nutchuser@$MasterIP_Address:/home/nutchuser/nutchez/source/* ."
    524 #  show_info "sudo su"
    525 #  show_info "./client_install"
    526 }
     515}
  • nutchez-0.2/src/shell/lang/lang_en_US

    r237 r244  
    133133#
    134134MI_client_install_commands_echo_1="For client install, please refer commands as follows:"
    135 MI_client_install_commands_echo_2="cd ~"
    136 MI_client_install_commands_echo_3="mkdir nutchez_client_install"
    137 MI_client_install_commands_echo_4="cd nutchez_client_install"
    138 MI_client_install_commands_echo_5="scp -r nutchuser@$MasterIP_Address:/home/nutchuser/nutchez/source/* ."
    139 MI_client_install_commands_echo_6="sudo su"
    140 MI_client_install_commands_echo_7="./client_install"
     135MI_client_install_commands_echo_2="scp nutchuser@$MasterIP_Address:/home/nutchuser/nutchez/source/client_deploy ."
     136MI_client_install_commands_echo_3="./client_deploy"
     137MI_client_install_commands_echo_4="sudo su"
     138MI_client_install_commands_echo_5="~/nutchez_client_install/client_install"
    141139
    142140########## Lang for Master Install - End##########
  • nutchez-0.2/src/shell/lang/lang_zh_TW

    r243 r244  
    1010
    1111############ Lang for master_install -Start ############
    12 MI_main_echo_1="歡迎使用NutchEZ, 此安裝程序會為您新建一個nutchuser帳號並協助您設定>密碼"
     12MI_main_echo_1="歡迎使用NutchEZ, 此安裝程序會為您新建一個nutchuser帳號並協助您設定密碼"
    1313MI_main_echo_2="請確認上述的安裝資訊:1.正確 2.不正確 "
    1414MI_main_echo_3="安裝成功!"
     
    134134MI_client_install_commands_echo_1="Client安裝可參考以下指令:"
    135135MI_client_install_commands_echo_2="scp nutchuser@$MasterIP_Address:/home/nutchuser/nutchez/source/client_deploy ."
    136 MI_client_install_commands_echo_3=""
    137 MI_client_install_commands_echo_4=""
    138 MI_client_install_commands_echo_5=""
    139 MI_client_install_commands_echo_6="sudo su"
    140 MI_client_install_commands_echo_7="~/nutchez_client_install/client_install"
     136MI_client_install_commands_echo_3="./client_deploy"
     137MI_client_install_commands_echo_4="sudo su"
     138MI_client_install_commands_echo_5="cd nutchez_client_install; ./client_install"
    141139
    142140########## Lang for Master Install - End##########
  • nutchez-0.2/src/shell/master_remove

    r233 r244  
    99#   
    1010
    11 source /home/nutchuser/nutchez/system/lang_link
     11#source /home/nutchuser/nutchez/system/lang_link
    1212
    1313##########  echo function  ##########
     
    2828nutch_PATH=/home/nutchuser/nutchez/system
    2929
     30function load_default_lang(){
     31
     32lang=$(locale | grep 'LANG=' | cut -d "=" -f2)
     33
     34# Default: source english
     35. $Work_Path/lang/lang_en_US
     36# if locale is zh then source chinese
     37
     38echo $lang | grep 'zh' >> /dev/null && source $Work_Path/lang/lang_zh_TW
     39}
    3040
    3141# check root
Note: See TracChangeset for help on using the changeset viewer.