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

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

加入多張網卡時ip設定

  • Property svn:executable set to *
File size: 1.4 KB
RevLine 
[116]1#!/bin/bash
2# 語言的選擇
[119]3# source ./language_choise.sh
[116]4# 匯入功能函數
5source ./install_func.sh
[136]6source ./client_install_func.sh
[117]7### real code #####
[137]8
[150]9# 前置作業
10# *.sh及nutchez-0.2-0531.tar.gz均在同一目錄下
11
[137]12# 執行環境檢查
13check_info () {
[136]14  check_root
15  check_systemInfo
16  check_nez_installed
[140]17  check_sunJava
18  check_ssh
19  check_dialog
[146]20  install_packages
[137]21}
[125]22
[137]23main () {
[139]24  echo "歡迎使用NutchEZ, 此安裝程序會為您新建一個nutchuser帳號"
[117]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
[139]29    creat_nutchuser_account $nutchuser_passwd
30    make_ssh_key
[140]31   
[136]32    # 解壓縮
[139]33    tar -zxvf nutchez-0.2-0531.tar.gz -C /opt/
[136]34    Install_Nutch
[144]35    mkdir /var/nutchez
[137]36    chown -R nutchuser:nutchuser /opt/nutchez
[139]37    chown -R nutchuser:nutchuser /var/nutchez
[140]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"
[144]42    make_client_install
[117]43
[137]44    # 啟動系統
[117]45    format_HDFS
46    start_up_NutchEZ
[139]47    start_up_tomcat   
[125]48    # 安裝流程結束,並進入網頁管理頁面設定爬網網址...等 
49    echo "Install Successfully!!"
[130]50    echo "Visit http://$MasterIP_Address:8080"
[144]51    client_install_command
[117]52  elif [ $confirm -eq 2 ]; then
53    main
54  fi
55}
56
[137]57check_info
[117]58main
Note: See TracBrowser for help on using the repository browser.