Index: /nutchez-0.2/src/test/client_install_func.sh
===================================================================
--- /nutchez-0.2/src/test/client_install_func.sh	(revision 138)
+++ /nutchez-0.2/src/test/client_install_func.sh	(revision 139)
@@ -184,26 +184,27 @@
 # 新增nutchuser 帳號時用 Nutchuser_Passwd 當密碼
 function creat_nutchuser_account(){
-echo -e "\n= creat_nutchuser_account (debug) ="                             
+echo -e "\n= creat_nutchuser_account (debug) ="
 
 if [ $(cat /etc/passwd | grep nutchuser) ]; then
     echo "System already has nutchuser, change nutchuser password."
-    expect -c "spawn passwd nutchuser                 
-    expect \"*: \"                         
-    send \"$1\r\"                          
-    expect \"*: \"                         
-    send \"$1\r\"                          
+    expect -c "spawn passwd nutchuser
+    set timeout 1
+    expect \"*: \"
+    send \"$1\r\"
+    expect \"*: \"
+    send \"$1\r\"
     expect eof"
 else
     echo "Create nutchuser and change password."
     useradd -m nutchuser -s /bin/bash
-    expect -c "spawn passwd nutchuser                 
-    expect \"*: \" 
-    send \"$1\r\"
-    expect \"*: \" 
-    send \"$1\r\" 
+    expect -c "spawn passwd nutchuser
+    set timeout 1
+    expect \"*: \"
+    send \"$1\r\"
+    expect \"*: \"
+    send \"$1\r\"
     expect eof"
 fi
 }
-
 
 # 用scp 複製 master 的設定與安裝資料
Index: /nutchez-0.2/src/test/install
===================================================================
--- /nutchez-0.2/src/test/install	(revision 138)
+++ /nutchez-0.2/src/test/install	(revision 139)
@@ -19,18 +19,18 @@
 
 main () {
-  echo "歡迎使用NutchEZ\ 此安裝程序會為您新建一個nutchuser帳號"
+  echo "歡迎使用NutchEZ, 此安裝程序會為您新建一個nutchuser帳號"
   set_install_information
   show_info
   read -p "Please confirm your install infomation: 1.Yes 2.No  " confirm
   if [ $confirm -eq 1 ]; then
-    # create_nutchuser_account
-    # make_ssh_key
-  
+    creat_nutchuser_account $nutchuser_passwd
+    make_ssh_key
+    sleep 10
     # 解壓縮
-    # tar -zxvf nutchez-0.2-20100524.tar.gz 
-    # mv nutchez /opt/
+    tar -zxvf nutchez-0.2-0531.tar.gz -C /opt/ 
     Install_Nutch
-    Install_Tomcat
+#    Install_Tomcat
     chown -R nutchuser:nutchuser /opt/nutchez
+    chown -R nutchuser:nutchuser /var/nutchez
     # make_client_install
 
@@ -38,6 +38,5 @@
     format_HDFS
     start_up_NutchEZ
-    start_up_tomcat
-
+    start_up_tomcat    
     # 安裝流程結束，並進入網頁管理頁面設定爬網網址...等  
     echo "Install Successfully!!"
Index: /nutchez-0.2/src/test/install_func.sh
===================================================================
--- /nutchez-0.2/src/test/install_func.sh	(revision 138)
+++ /nutchez-0.2/src/test/install_func.sh	(revision 139)
@@ -24,11 +24,15 @@
 
 function set_install_information () { 
+  set_nutchuser_passwd
+  read -p "Please enter Administrator's e-mail address: " Admin_email
+  read -p "Please enter the Master DNS:  " MasterDNS
+}
+
+function set_nutchuser_passwd () {
   read -p "Please enter nutchuser's password :  " nutchuser_passwd
   read -p "Please enter nutchuser's password again:  " nutchuser_passwd_confirm
-  if [$nutchuser_passwd != $nutchuser_passwd_confirm]
-    set_install_information 
+  if [ $nutchuser_passwd != $nutchuser_passwd_confirm ]; then
+    set_nutchuser_passwd
   fi
-  read -p "Please enter Administrator's e-mail address: " Admin_email
-  read -p "Please enter the Master DNS:  " MasterDNS
 }
 
@@ -41,4 +45,10 @@
   read -p "Please confirm your install infomation: 1.Yes 2.No  " confirm
 }
+
+function make_ssh_key () {
+  su nutchuser -c 'ssh-keygen -t rsa -f ~/.ssh/id_rsa -P ""'
+  su nutchuser -c "cp ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys"
+}
+
 
 function set_haoop-site () {
@@ -84,32 +94,29 @@
 function format_HDFS () {
   echo "format HDFS..."
-  $Nutch_HOME/bin/hadoop namenode -format
+  su nutchuser -c "$Nutch_HOME/bin/hadoop namenode -format"
 }
 
 function start_up_NutchEZ (){
   echo "start up NutchEZ..."
-  $NutchE_HOME/bin/start-all.sh
+  su nutchuser -c "$Nutch_HOME/bin/start-all.sh"
 }
 
 function Install_Nutch () {
-  set_hadoop-env
   set_haoop-site
   set_nutch-site
 }
 
-function Install_Tomcat () {
-# 設定nutch的搜尋引擎頁面到tomcat  
-  cd $Nutch_HOME
-  mkdir web
-  cd web
-  jar -xvf ../nutch-1.0.war
-  mv $Tomcat_HOME/webapps/ROOT $Tomcat_HOME/webapps/ROOT-ori
-  cd $Nutch_HOME
-  mv $Nutch_HOME/web $Tomcat_HOME/webapps/ROOT
-  mkdir $Index_DB
+
+function make_client_install () {
+  # 將Master_IP_Address給client
+  # 打包安裝目錄(不含tomcat)
+  # tar -czv /opt/nutchez/nutch NutchezFor_$Master_IP_Client.tar.gz
+  echo "undo... function make_client_install"
 }
 
 function start_up_tomcat () {
   echo "start up tomcat..."
-  $Tomcat_HOME/bin/startup.sh
+  sleep 10s
+  echo "su nutchuser -c "$Tomcat_HOME/bin/startup.sh""
+  su nutchuser -c "$Tomcat_HOME/bin/startup.sh"
 }
