Index: /nutchez-0.2/src/test/client_install.sh
===================================================================
--- /nutchez-0.2/src/test/client_install.sh	(revision 117)
+++ /nutchez-0.2/src/test/client_install.sh	(revision 117)
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+Master_IP_Address="a.a.a.a"
+Nutchuser_Passwd="xxxxxxxx"
+
+check_root
+
+check_systemInfo
+
+check_nez_installed
+
+check_sunJava
+
+check_ssh
+
+check_dialog
+
+check_php
+
+# scp nutchuser@master_ip:~ 把.ssh/目錄複製下來
+# 當使用者輸入nutchuser 密碼時，將此密碼紀錄到Nutchuser_Passwd
+# 此步驟若無法連到 master 則跳出
+scp_master_nutchuser_sshkey
+
+# 新增nutchuser 帳號時用 Nutchuser_Passwd 當密碼
+creat_nutchuser_account
+
+# 用scp 複製 master 的設定與安裝資料
+scp_packages
+
+# 安裝資訊
+install_packages
+
Index: /nutchez-0.2/src/test/install
===================================================================
--- /nutchez-0.2/src/test/install	(revision 116)
+++ /nutchez-0.2/src/test/install	(revision 117)
@@ -4,4 +4,42 @@
 # 匯入功能函數
 source ./install_func.sh
+### test for languege choise ###
 mainFunction
 braBraBra
+### test code end ###
+
+### real code #####
+main () {
+  # check_root
+  # check_systemInfo
+  # check_nez_installed
+  # check_sunJava
+  # check_ssh
+  # check_dialog
+  # check_php
+  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
+
+    Hadoop_install
+    Nutch_install
+
+    # tomcat_install
+    # make_client_install
+    
+    format_HDFS
+    start_up_NutchEZ
+    set_tomcat
+    start_up_tomcat
+  elif [ $confirm -eq 2 ]; then
+    main
+  fi
+  echo "Install Successfully!!"
+  echo "Visit http://$MasterIP_Address:portNO"
+}
+
+main
Index: /nutchez-0.2/src/test/install_func.sh
===================================================================
--- /nutchez-0.2/src/test/install_func.sh	(revision 116)
+++ /nutchez-0.2/src/test/install_func.sh	(revision 117)
@@ -1,4 +1,5 @@
 #!/bin/bash
 source install_lang
+####### garbage here #############
 function mainFunction ( )
 {
@@ -9,2 +10,160 @@
 echo "$Bra_Bra_Bra"
 }
+####### garbage end ###############
+
+
+
+####### fafa code here ###########
+
+set_install_information () {
+  read -p "Please select install mode, 1:Single mode 2:Cluster mode: " install_mode
+  read -p "Please enter administrator's e-mail address:  " admin_email
+  if [ $install_mode -eq 1 ]; then
+    select_mode="Single"
+    read -p "Please enter the ip address:  " MasterIP_Address
+
+  elif [ $install_mode -eq 2 ]; then
+    select_mode="Cluster"
+    read -p "Please enter the master ip address:  " MasterIP_Address
+    read -p "Please enter the slaves number:  " Slaves_NO
+    for (( i=1; i<=$Slaves_NO; i=i+1 ))
+    do
+      read -p "Please enter the slaves of $i's ip address:  " SlavesAddress$i
+    done
+  fi
+}
+
+show_info () {
+  echo "Your choose is $select_mode install mode."
+  echo "Administrator's e-mail address is $admin_email."
+  echo "The master IP address is: $MasterIP_Address"
+  if [ $install_mode -eq 2 ]; then
+    echo "You have $Slaves_NO slaves, the list of slave as following: "
+    for (( i=1; i<=$Slaves_NO; i=i+1))
+    do
+      echo "The slaves $i: $((SlavesAddress$i))"
+    done
+  fi
+}
+
+confirm_install_information () {
+  read -p "Please confirm your install infomation: 1.Yes 2.No  " confirm
+}
+
+# Hadoop install
+Hadoop_install () {
+  set_hadoop-env
+  set_hadoop-site
+  set_masters_slaves
+
+  if [ $install_mode -eq 2 ]; then
+    echo "Hadoop Cluster install version($Slaves_NO slaves...)"
+  fi
+
+}
+
+# set $Hadoop_HOME/conf/hadoop-env.sh
+set_hadoop-env () {
+  echo "set $Hadoop_HOME/conf/hadoop-env.sh"
+}
+
+# set $Hadoop_HOME/conf/hadoop-site.xml
+set_hadoop-site () {
+  echo "set $Hadoop_HOME/conf/hadoop-site.xml"
+}
+# set $Hadoop_HOME/conf/masters and slaves
+set_masters_slaves () {
+  echo "set $Hadoop_HOME/conf/masters and slaves"
+}
+
+# Nutch install
+Nutch_install () {
+  echo "install Nutch..."
+  echo "cp -rf $Hadoop_HOME/* $Nutch_HOME/*"
+  echo "cp -rf $Nutch_HOME/*.jar lib/"
+  set_nutch-site
+  set_crawl-urlfilter
+  if [ $install_mode -eq 2 ]; then
+    echo "Nutch Cluster install version($Slaves_NO slaves...)"
+    nutch_cluster_install
+  fi
+
+}
+# cp -rf $Hadoop_HOME/* $Nutch_HOME/*
+# cp -rf $Nutch_HOME/*.jar lib/
+
+#********these steps will merge with hadoop********
+# set $Nutch_HOME/conf/hadoop-env.sh              *
+# source ./$Nutch_HOME/conf/hadoop-env.sh         *
+#**************************************************
+
+# set $Nutch_HOME/conf/nutch-site.xml
+set_nutch-site () {
+  echo "set $Nutch_HOME/conf/nutch-site.xml"
+}
+# set $Nutch_HOME/conf/crawl-urlfilter.txt       
+set_crawl-urlfilter () {
+  echo "set $Nutch_HOME/conf/crawl-urlfilter.txt"
+}
+
+
+#******Cluster version to do*********
+# scp nutch_dir to the other slaves * 
+#************************************
+nutch_cluster_install () {
+  for (( i=1; i<=$Slaves_NO; i=i+1))
+  do
+    echo "ssh $((SlavesAddress$i)) chown"
+    echo "scp nutch_dir to slave $((SlavesAddress$i))."
+  done
+}
+
+
+# format HDFS
+format_HDFS () {
+  echo "format HDFS"
+}
+
+# start up NutchEZ
+# bin/start-all.sh
+start_up_NutchEZ (){
+  echo "start up NutchEZ"
+}
+
+# Crawl(Maybe in administrator page to do this)
+# edit url list(mkdir urls and urls.txt)
+# upload to HDFS
+# bin/hadoop dfs -put urls urls
+# bin/nutch crawl urls -dir search -threads 2 -depth 3 -topN 100000
+# or save as a log file
+# bin/nutch crawl urls -dir search -threads 2 -depth 3 -topN 100000 >& nutch.log
+
+
+#****only master do this****
+# Tomcat install function  *
+#***************************
+
+# install tomcat
+set_tomcat () {
+  echo "install tomcat.."
+  echo "wget Tomcat"
+  edit_server
+  download_crawl_result
+}
+
+# edit $Tomcat_HOME/conf/server.xml
+edit_server () {
+  echo "edit $Tomcat_HOME/conf/server.xml"
+}
+
+# download crawl result
+download_crawl_result () {
+  echo "download crawl result"
+  echo "bin/hadoop dfs -get search /opt/search"
+  echo "set search engine page to tomcat"
+  echo "set search engine page source page"
+}
+
+start_up_tomcat () {
+  echo "start up tomcat"
+}
Index: /nutchez-0.2/src/test/install_lang
===================================================================
--- /nutchez-0.2/src/test/install_lang	(revision 116)
+++ /nutchez-0.2/src/test/install_lang	(revision 117)
@@ -1,1 +1,1 @@
-link ./install_lang.en
+link ./install_lang.zh
