source: nutchez-0.2/src/test/install @ 195

Last change on this file since 195 was 195, checked in by shunfa, 14 years ago

修改語言中文檔案

  • Property svn:executable set to *
File size: 1.8 KB
Line 
1#!/bin/bash
2# 語言的選擇
3# source ./language_choise.sh
4# 匯入功能函數
5source ./install_func.sh
6#source ./client_install_func.sh
7source ./install_lang.zh
8
9Work_Path=$(echo $0 | sed 's/install//')
10
11# Source functions
12source $Work_Path/client_install_func.sh
13### real code #####
14
15# 前置作業
16# *.sh及nutchez-0.2-0531.tar.gz均在同一目錄下
17
18function show_info () {
19  if [ $? -eq 0 ]; then
20    echo -e "\033[1;32;40m $1 \033[0m"
21  fi
22}
23
24main () {
25  check_info
26  show_info $main_echo_1
27# show_info "歡迎使用NutchEZ, 此安裝程序會為您新建一個nutchuser帳號並協助您設定密碼"
28  set_install_information
29  read -p "$main_echo_2" confirm
30# read -p "Please confirm your install infomation: 1.Yes 2.No  " confirm
31  if [ $confirm -eq 1 ]; then
32    creat_nutchuser_account $Nutchuser_Passwd
33    make_ssh_key
34   
35    # 解壓縮
36    tar -zxvf nutchezV2-current.tar.gz -C /opt/
37    Install_Nutch
38    mkdir /var/nutchez
39    chown -R nutchuser:nutchuser /opt/nutchez
40    chown -R nutchuser:nutchuser /var/nutchez
41    su nutchuser -c "mkdir /home/nutchuser/nutchez"
42    su nutchuser -c "mkdir /home/nutchuser/nutchez/urls"
43    su nutchuser -c "touch /home/nutchuser/nutchez/urls/urls.txt"
44    su nutchuser -c "mkdir /home/nutchuser/nutchez/search"
45    su nutchuser -c "mkdir /home/nutchuser/nutchez/source"
46    su nutchuser -c "mkdir /home/nutchuser/nutchez/system"
47    make_client_install
48
49    # 啟動系統
50    format_HDFS
51    start_up_NutchEZ
52    start_up_tomcat   
53    # 安裝流程結束,並進入網頁管理頁面設定爬網網址...等 
54    show_info $main_echo_3
55#   show_info "Install Successfully!!"
56    show_info $main_echo_4
57#   show_info "Visit http://$MasterIP_Address:8080"
58    client_install_commands
59  elif [ $confirm -eq 2 ]; then
60    main
61  fi
62}
63
64main
Note: See TracBrowser for help on using the repository browser.