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

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

單機安裝測試ok

  • Property svn:executable set to *
File size: 1.3 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# 執行環境檢查
10check_info () {
11  check_root
12  check_systemInfo
13  check_nez_installed
14  check_sunJava
15  check_ssh
16  check_dialog
17}
18
19main () {
20  echo "歡迎使用NutchEZ, 此安裝程序會為您新建一個nutchuser帳號"
21  set_install_information
22  show_info
23  read -p "Please confirm your install infomation: 1.Yes 2.No  " confirm
24  if [ $confirm -eq 1 ]; then
25    creat_nutchuser_account $nutchuser_passwd
26    make_ssh_key
27   
28    # 解壓縮
29    tar -zxvf nutchez-0.2-0531.tar.gz -C /opt/
30    Install_Nutch
31   
32    chown -R nutchuser:nutchuser /opt/nutchez
33    chown -R nutchuser:nutchuser /var/nutchez
34    su nutchuser -c "mkdir /home/nutchuser/nutchez"
35    su nutchuser -c "mkdir /home/nutchuser/nutchez/urls"
36    su nutchuser -c "touch /home/nutchuser/nutchez/urls/urls.txt"
37    su nutchuser -c "mkdir /home/nutchuser/nutchez/search"
38    # make_client_install
39
40    # 啟動系統
41    format_HDFS
42    start_up_NutchEZ
43    start_up_tomcat   
44    # 安裝流程結束,並進入網頁管理頁面設定爬網網址...等 
45    echo "Install Successfully!!"
46    echo "Visit http://$MasterIP_Address:8080"
47  elif [ $confirm -eq 2 ]; then
48    main
49  fi
50}
51
52check_info
53main
Note: See TracBrowser for help on using the repository browser.