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

Last change on this file since 144 was 144, 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# 執行環境檢查
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    mkdir /var/nutchez
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    client_install_command
48  elif [ $confirm -eq 2 ]; then
49    main
50  fi
51}
52
53check_info
54main
Note: See TracBrowser for help on using the repository browser.