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

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

修改安裝檔

  • Property svn:executable set to *
File size: 1.4 KB
Line 
1#!/bin/bash
2# 語言的選擇
3# source ./language_choise.sh
4# 匯入功能函數
5source ./install_func.sh
6source ./client_install_func.sh
7### real code #####
8
9# 前置作業
10# *.sh及nutchez-0.2-0531.tar.gz均在同一目錄下
11
12
13main () {
14  check_info
15  echo "歡迎使用NutchEZ, 此安裝程序會為您新建一個nutchuser帳號"
16  set_install_information
17  show_info
18  read -p "Please confirm your install infomation: 1.Yes 2.No  " confirm
19  if [ $confirm -eq 1 ]; then
20    creat_nutchuser_account $Nutchuser_Passwd
21    make_ssh_key
22   
23    # 解壓縮
24    tar -zxvf nutchez-0.2-0531.tar.gz -C /opt/
25    Install_Nutch
26    mkdir /var/nutchez
27    chown -R nutchuser:nutchuser /opt/nutchez
28    chown -R nutchuser:nutchuser /var/nutchez
29    su nutchuser -c "mkdir /home/nutchuser/nutchez"
30    su nutchuser -c "mkdir /home/nutchuser/nutchez/urls"
31    su nutchuser -c "touch /home/nutchuser/nutchez/urls/urls.txt"
32    su nutchuser -c "mkdir /home/nutchuser/nutchez/search"
33    su nutchuser -c "mkdir /home/nutchuser/nutchez/source"
34    make_client_install
35
36    # 啟動系統
37    format_HDFS
38    start_up_NutchEZ
39    start_up_tomcat   
40    # 安裝流程結束,並進入網頁管理頁面設定爬網網址...等 
41    echo "Install Successfully!!"
42    echo "Visit http://$MasterIP_Address:8080"
43    client_install_command
44  elif [ $confirm -eq 2 ]; then
45    main
46  fi
47}
48
49# todo: 處理/etc/hosts
50# 多張網卡時的bug
51main
Note: See TracBrowser for help on using the repository browser.