Changeset 134
- Timestamp:
- May 28, 2010, 4:05:38 PM (15 years ago)
- Location:
- nutchez-0.2/src/test
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
nutchez-0.2/src/test/client_install
r132 r134 13 13 14 14 # 需要 master_install 設定的參數區 15 Master_IP_Address=" a.a.a.a";15 Master_IP_Address="140.110.138.193"; 16 16 17 17 # 此檔自己用的參數區 18 18 Linux_Distribution=""; 19 19 Linux_Version=""; 20 Nutchuser_Passwd=" xxxxxxxx";20 Nutchuser_Passwd="nutchez"; 21 21 22 22 # 參數詢問 … … 57 57 58 58 # 檢查是否有安裝sun java ,並檢查是否為jdk 1.6 以上版本 59 check_sunJava59 #check_sunJava 60 60 read 61 61 -
nutchez-0.2/src/test/client_install_func.sh
r133 r134 148 148 echo -e "mkdir -p /home/nutchuser/" 149 149 mkdir -p /home/nutchuser/ 150 rm -fr /home/nutchuser/.ssh 150 151 151 152 while [ ! -d "/home/nutchuser/.ssh" ] 153 do 154 while [ "$Nutchuser_Passwd" != "$Nutchuser_Passwd2" ] 152 155 do 153 echo -e "\n" 154 read -p "Plz input nutchuser passwd of master node: " Nutchuser_Passwd 156 echo -e "\n" 157 read -p "Plz input nutchuser password of master node: " Nutchuser_Passwd 158 read -p "plz input nutchuser password, again: " Nutchuser_Passwd2 159 if [ "$1" == "$Nutchuser_Passwd2" ]; then 160 echo "Two Passwords match." 161 else 162 echo "two passwords do not match, plz re-input nutchuser's password." 163 fi 164 done 165 166 unset Nutchuser_Passwd2 167 155 168 echo -e "scp nutchuser@$1:~/.ssh /home/nutchuser/" 156 169 expect -c "spawn scp -r -o StrictHostKeyChecking=no nutchuser@$1:~/.ssh /home/nutchuser/ 157 170 expect \"*: \" { send \"$Nutchuser_Passwd\r\" } 158 expect \"*: \" { send_user \"Passw d is error\" }171 expect \"*: \" { send_user \"Password is error\" } 159 172 expect eof" 160 173 if [ ! -d "/home/nutchuser/.ssh" ]; then 161 echo -e "\nPassw dis error, plz re-input nutchuser passwd of master node."174 echo -e "\nPassword is error, plz re-input nutchuser passwd of master node." 162 175 else 163 176 echo -e "\nscp correct." … … 172 185 function creat_nutchuser_account(){ 173 186 echo -e "\n= creat_nutchuser_account (debug) =" 174 175 # 若沒 nutchuser_Passwd 的參數傳遞才將註解打開讓使用者字型輸入176 #while [ "1" != "$Nutchuser_Passwd2" ]177 #do178 # read -p "Create nutchuser, plz input nutchuser's password: " Nutchuser_Passwd179 # read -p "plz input nutchuser's password, again: " Nutchuser_Passwd2180 181 # if [ "$1" == "$Nutchuser_Passwd2" ]; then182 # echo "Two Passwords match."183 # else184 # echo "two passwords do not match, plz re-input nutchuser's password."185 # fi186 #done187 188 #unset Nutchuser_Passwd2189 187 190 188 if [ $(cat /etc/passwd | grep nutchuser) ]; then … … 213 211 function scp_packages(){ 214 212 echo -e "\n= scp_packages (debug) =" 213 chmod 777 /opt 215 214 echo "scp -r -o StrictHostKeyChecking=no nutchuser@$1:/opt/nutchez/ /opt/" 216 s cp -r -o StrictHostKeyChecking=no nutchuser@$1:/opt/nutchez/ /opt/217 218 echo "chown -R nutchuser:nutchuser /opt/nutchez/"215 su nutchuser -c "scp -r -o StrictHostKeyChecking=no nutchuser@$1:/opt/nutchez/ /opt/" 216 217 echo -e "\nchown -R nutchuser:nutchuser /opt/nutchez/" 219 218 chown -R nutchuser:nutchuser /opt/nutchez/ 220 } 219 chmod 755 /opt 220 }
Note: See TracChangeset
for help on using the changeset viewer.