Last change
on this file since 146 was
146,
checked in by shunfa, 15 years ago
|
修改安裝檔
|
-
Property svn:executable set to
*
|
File size:
1.4 KB
|
Rev | Line | |
---|
[116] | 1 | #!/bin/bash |
---|
| 2 | # 語言的選擇 |
---|
[119] | 3 | # source ./language_choise.sh |
---|
[116] | 4 | # 匯入功能函數 |
---|
| 5 | source ./install_func.sh |
---|
[136] | 6 | source ./client_install_func.sh |
---|
[117] | 7 | ### real code ##### |
---|
[137] | 8 | |
---|
| 9 | # 執行環境檢查 |
---|
| 10 | check_info () { |
---|
[136] | 11 | check_root |
---|
| 12 | check_systemInfo |
---|
| 13 | check_nez_installed |
---|
[140] | 14 | check_sunJava |
---|
| 15 | check_ssh |
---|
| 16 | check_dialog |
---|
[146] | 17 | install_packages |
---|
[137] | 18 | } |
---|
[125] | 19 | |
---|
[137] | 20 | main () { |
---|
[139] | 21 | echo "歡迎使用NutchEZ, 此安裝程序會為您新建一個nutchuser帳號" |
---|
[117] | 22 | set_install_information |
---|
| 23 | show_info |
---|
| 24 | read -p "Please confirm your install infomation: 1.Yes 2.No " confirm |
---|
| 25 | if [ $confirm -eq 1 ]; then |
---|
[139] | 26 | creat_nutchuser_account $nutchuser_passwd |
---|
| 27 | make_ssh_key |
---|
[140] | 28 | |
---|
[136] | 29 | # 解壓縮 |
---|
[139] | 30 | tar -zxvf nutchez-0.2-0531.tar.gz -C /opt/ |
---|
[136] | 31 | Install_Nutch |
---|
[144] | 32 | mkdir /var/nutchez |
---|
[137] | 33 | chown -R nutchuser:nutchuser /opt/nutchez |
---|
[139] | 34 | chown -R nutchuser:nutchuser /var/nutchez |
---|
[140] | 35 | su nutchuser -c "mkdir /home/nutchuser/nutchez" |
---|
| 36 | su nutchuser -c "mkdir /home/nutchuser/nutchez/urls" |
---|
| 37 | su nutchuser -c "touch /home/nutchuser/nutchez/urls/urls.txt" |
---|
| 38 | su nutchuser -c "mkdir /home/nutchuser/nutchez/search" |
---|
[144] | 39 | make_client_install |
---|
[117] | 40 | |
---|
[137] | 41 | # 啟動系統 |
---|
[117] | 42 | format_HDFS |
---|
| 43 | start_up_NutchEZ |
---|
[139] | 44 | start_up_tomcat |
---|
[125] | 45 | # 安裝流程結束,並進入網頁管理頁面設定爬網網址...等 |
---|
| 46 | echo "Install Successfully!!" |
---|
[130] | 47 | echo "Visit http://$MasterIP_Address:8080" |
---|
[144] | 48 | client_install_command |
---|
[117] | 49 | elif [ $confirm -eq 2 ]; then |
---|
| 50 | main |
---|
| 51 | fi |
---|
| 52 | } |
---|
| 53 | |
---|
[137] | 54 | check_info |
---|
[117] | 55 | main |
---|
Note: See
TracBrowser
for help on using the repository browser.