Changeset 147 for nutchez-0.2
- Timestamp:
- Jun 3, 2010, 11:38:08 AM (14 years ago)
- Location:
- nutchez-0.2/src/test
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
nutchez-0.2/src/test/client_install
r146 r147 88 88 # 安裝及啟動 89 89 install_nutch_package 90 read 90 91 92 # 回覆 Hostname 和 IP 給 Master Server 93 recall_hostname_ip $Master_IP_Address -
nutchez-0.2/src/test/client_install_func.sh
r145 r147 247 247 248 248 249 function install_nutch_package (){249 function install_nutch_package(){ 250 250 tar -zxvf /opt/nutchez/NutchezForClientOf_$Master_IP_Address.tar.gz -C / 251 251 /opt/nutchez/nutch/bin/hadoop-daemon.sh start datanode 252 252 /opt/nutchez/nutch/bin/hadoop-daemon.sh start tasktracker 253 253 } 254 255 function recall_hostname_ip(){ 256 echo -e "\n= recall_hostname_ip (debug) =" 257 258 net_interfaces=$(ifconfig | grep eth | cut -d " " -f1) 259 declare -i i=1 260 echo -e "\nWhich network use for this machine: " 261 262 for net in $net_interfaces 263 do 264 echo "($i) $net" 265 i=i+1 266 done 267 268 read net_choice 269 echo "choice is $net_choice" 270 271 net_interface=$(echo $net_interfaces | cut -d " " -f $net_choice) 272 273 ifconfig $net_interface | grep "inet addr:" | sed 's/^.*inet addr://g' | cut -d " " -f1 274 net_address=$(ifconfig $net_interface | grep "inet addr:" | sed 's/^.*inet addr://g' | cut -d " " -f1) 275 #net_address=$(ifconfig eth"${net_choice}" | grep "inet addr:" | sed 's/^.*inet addr://g' | sed 's/Bcast.*$//g') 276 echo "net_address is $net_address" 277 278 su nutchuser -c "ssh nutchuser@$1 echo $net_address $(hostname) \>\> ~/nutch_nodes" 279 #su nutchuser -c expect -c "spawn ssh nutchuser@$1 280 #set timeout 1 281 #expect \"*\" 282 #send \"echo $net_address $(hostname) >> /home/nutchuser/nutch_nodes\r\" 283 #expect \"*\" 284 #send \"exit\"" 285 }
Note: See TracChangeset
for help on using the changeset viewer.