Changeset 244
- Timestamp:
- Jul 1, 2010, 4:33:15 PM (14 years ago)
- Location:
- nutchez-0.2/src/shell
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
nutchez-0.2/src/shell/client_install
r241 r244 11 11 # 需要 master_install 設定的參數區 12 12 # Master IP here 13 Master_IP_Address= 140.110.138.19213 Master_IP_Address=your.master.ip.here 14 14 # Master Hostname here 15 Master_Hostname= u100415 Master_Hostname=your.msater.hostname.here 16 16 # 此檔自己用的參數區 17 17 Linux_Distribution=""; -
nutchez-0.2/src/shell/client_install_func.sh
r242 r244 25 25 26 26 # Default: source english 27 . $Work_Path/lang/lang_en_US _client_install27 . $Work_Path/lang/lang_en_US 28 28 # if locale is zh then source chinese 29 29 30 echo $lang | grep 'zh' >> /dev/null && source $Work_Path/lang/lang_zh_TW _client_install30 echo $lang | grep 'zh' >> /dev/null && source $Work_Path/lang/lang_zh_TW 31 31 } 32 32 … … 291 291 su nutchuser -c "scp -r -o StrictHostKeyChecking=no nutchuser@$1:/home/nutchuser/nutchez/source/NutchezForClientOf_$Master_IP_Address.tar.gz /home/nutchuser/nutchez/source" 292 292 fi 293 cp -r lang /home/nutchuser/nutchez/system 294 cp client_remove lang_link /home/nutchuser/nutchez/system 293 295 } 294 296 -
nutchez-0.2/src/shell/client_remove
r242 r244 10 10 11 11 12 source lang_link13 12 # 需要 master_install 設定的參數區 14 13 # Master IP here … … 31 30 } 32 31 ##########end echo function ########## 32 33 function load_default_lang(){ 34 35 lang=$(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 41 echo $lang | grep 'zh' >> /dev/null && source lang/lang_zh_TW 42 } 43 44 33 45 34 46 # check root … … 80 92 # Main function 81 93 function main () { 94 load_default_lang 82 95 check_root 83 96 show_info "$CR_main_echo_1" #"警告 - 此一程式為移除此用戶端的nutch node, 若您為誤執行此一程式, 請按Ctrl+c離開此程序!" -
nutchez-0.2/src/shell/install
r224 r244 25 25 # Source functions 26 26 source $Work_Path/install_func.sh; 27 source $Work_Path/lang_link;27 # source $Work_Path/lang_link; 28 28 ### real code ##### 29 29 … … 38 38 39 39 main () { 40 load_default_lang 40 41 check_info 41 42 show_info "$MI_main_echo_1" … … 52 53 unzip_nV2_pack 53 54 55 54 56 su nutchuser -c "mkdir /home/nutchuser/nutchez" 55 57 su nutchuser -c "mkdir /home/nutchuser/nutchez/urls" … … 61 63 Install_Nutch 62 64 63 mkdir /var/nutchez 65 if [ ! -d "/var/nutchez" ]; then 66 mkdir /var/nutchez 67 fi 68 64 69 # 建立 nutch 與 tomcat 的 logs 資料夾 65 70 mkdir /var/nutchez/tomcat-logs -
nutchez-0.2/src/shell/install_func.sh
r241 r244 31 31 ##########end echo function ########## 32 32 33 function choose_lang(){33 function load_default_lang(){ 34 34 35 35 lang=$(locale | grep 'LANG=' | cut -d "=" -f2) 36 36 37 37 # Default: source english 38 . $Work_Path/ install_lang.en38 . $Work_Path/lang/lang_en_US 39 39 # 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 41 echo $lang | grep 'zh' >> /dev/null && source $Work_Path/lang/lang_zh_TW 51 42 } 52 43 … … 407 398 debug_info "$MI_install_Nutch_echo_2 $(hostname)" 408 399 # 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" 410 401 set_hosts 411 402 set_haoop-site … … 458 449 function make_client_install () { 459 450 # 建立資料夾(用來存放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 461 456 462 457 # 將Master_IP_Address給client … … 482 477 # 複製 nutchez/source 到使用者的安裝資料夾 483 478 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/ 486 485 487 486 # cp $Work_Path/client_install $Work_Path/client_install /home/nutchuser/nutchez/source … … 514 513 show_info "$MI_client_install_commands_echo_4" 515 514 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 133 133 # 134 134 MI_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" 135 MI_client_install_commands_echo_2="scp nutchuser@$MasterIP_Address:/home/nutchuser/nutchez/source/client_deploy ." 136 MI_client_install_commands_echo_3="./client_deploy" 137 MI_client_install_commands_echo_4="sudo su" 138 MI_client_install_commands_echo_5="~/nutchez_client_install/client_install" 141 139 142 140 ########## Lang for Master Install - End########## -
nutchez-0.2/src/shell/lang/lang_zh_TW
r243 r244 10 10 11 11 ############ Lang for master_install -Start ############ 12 MI_main_echo_1="歡迎使用NutchEZ, 此安裝程序會為您新建一個nutchuser帳號並協助您設定 >密碼"12 MI_main_echo_1="歡迎使用NutchEZ, 此安裝程序會為您新建一個nutchuser帳號並協助您設定密碼" 13 13 MI_main_echo_2="請確認上述的安裝資訊:1.正確 2.不正確 " 14 14 MI_main_echo_3="安裝成功!" … … 134 134 MI_client_install_commands_echo_1="Client安裝可參考以下指令:" 135 135 MI_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" 136 MI_client_install_commands_echo_3="./client_deploy" 137 MI_client_install_commands_echo_4="sudo su" 138 MI_client_install_commands_echo_5="cd nutchez_client_install; ./client_install" 141 139 142 140 ########## Lang for Master Install - End########## -
nutchez-0.2/src/shell/master_remove
r233 r244 9 9 # 10 10 11 source /home/nutchuser/nutchez/system/lang_link11 #source /home/nutchuser/nutchez/system/lang_link 12 12 13 13 ########## echo function ########## … … 28 28 nutch_PATH=/home/nutchuser/nutchez/system 29 29 30 function load_default_lang(){ 31 32 lang=$(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 38 echo $lang | grep 'zh' >> /dev/null && source $Work_Path/lang/lang_zh_TW 39 } 30 40 31 41 # check root
Note: See TracChangeset
for help on using the changeset viewer.