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

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

加入多張網卡時ip設定

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