Changeset 140
- Timestamp:
- Jun 1, 2010, 4:34:06 PM (15 years ago)
- Location:
- nutchez-0.2/src/test
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
nutchez-0.2/src/test/client_install
r135 r140 13 13 14 14 # 需要 master_install 設定的參數區 15 # Master IP here 15 16 Master_IP_Address="a.a.a.a"; 16 17 … … 68 69 read 69 70 70 # 檢查是否安裝 php 5.571 check_php72 read73 74 71 # scp nutchuser@master_ip:~ 把.ssh/目錄複製下來 75 72 # 當使用者輸入nutchuser 密碼時,將此密碼紀錄到Nutchuser_Passwd -
nutchez-0.2/src/test/client_install_func.sh
r139 r140 127 127 fi 128 128 } 129 130 131 # 檢查是否安裝 php 5.5132 function check_php(){133 echo -e "\n= check_php (debug) ="134 if [ "$(php -v 2>/dev/null | grep "PHP 5" | awk '{print $2}' | cut -d "." -f1)" == 5 ]; then135 echo -e "\nPHP'version is 5"136 else137 echo -e "\nplz install PHP 5 version!"138 exit139 fi140 }141 142 129 143 130 # scp nutchuser@master_ip:~ 把.ssh/目錄複製下來 -
nutchez-0.2/src/test/install
r139 r140 12 12 check_systemInfo 13 13 check_nez_installed 14 #check_sunJava 15 #check_ssh 16 #check_dialog 17 #check_php 14 check_sunJava 15 check_ssh 16 check_dialog 18 17 } 19 18 … … 26 25 creat_nutchuser_account $nutchuser_passwd 27 26 make_ssh_key 28 sleep 1027 29 28 # 解壓縮 30 29 tar -zxvf nutchez-0.2-0531.tar.gz -C /opt/ 31 30 Install_Nutch 32 # Install_Tomcat 31 33 32 chown -R nutchuser:nutchuser /opt/nutchez 34 33 chown -R nutchuser:nutchuser /var/nutchez 34 su nutchuser -c "mkdir /home/nutchuser/nutchez" 35 su nutchuser -c "mkdir /home/nutchuser/nutchez/urls" 36 su nutchuser -c "touch /home/nutchuser/nutchez/urls/urls.txt" 37 su nutchuser -c "mkdir /home/nutchuser/nutchez/search" 35 38 # make_client_install 36 39 -
nutchez-0.2/src/test/install_func.sh
r139 r140 108 108 109 109 110 function client_PassMasterIPAddr () { 111 Line_NO=`cat client_install | grep -n '# Master IP here' | sed 's/:.*//g'` 112 echo "debug...Master IP here line number = $Line_NO..." 113 sed -i ''$((Line_NO+1))'d' client_install 114 echo "debug...edit Master IP at line $((Line_NO+1))..." 115 sed -i ''$Line_NO'a Master_IP_Address='$MasterIP_Address'' client_install 116 echo "edit client_install done..." 117 } 118 110 119 function make_client_install () { 111 120 # 將Master_IP_Address給client 112 121 # 打包安裝目錄(不含tomcat) 113 # tar -czv /opt/nutchez/nutch NutchezFor_$Master_IP_Client.tar.gz 114 echo "undo... function make_client_install" 122 echo "function make_client_install..." 123 client_PassMasterIPAddr 124 su nutchuser -c "mkdir /opt/nutchez/nutch/clinet_install" 125 cp client_install client_install_func.sh /opt/nutchez/nutch/clinet_install 126 tar -cvzf /opt/nutchez/NutchezForClientOf_$Master_IP_Address.tar.gz /opt/nutchez/nutch 115 127 } 116 128
Note: See TracChangeset
for help on using the changeset viewer.