Last change
on this file since 161 was
161,
checked in by shunfa, 14 years ago
|
修改安裝檔變數
|
-
Property svn:executable set to
*
|
File size:
1.3 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 | |
---|
[150] | 9 | # 前置作業 |
---|
| 10 | # *.sh及nutchez-0.2-0531.tar.gz均在同一目錄下 |
---|
| 11 | |
---|
[125] | 12 | |
---|
[137] | 13 | main () { |
---|
[160] | 14 | check_info |
---|
[139] | 15 | echo "歡迎使用NutchEZ, 此安裝程序會為您新建一個nutchuser帳號" |
---|
[117] | 16 | set_install_information |
---|
| 17 | show_info |
---|
| 18 | read -p "Please confirm your install infomation: 1.Yes 2.No " confirm |
---|
| 19 | if [ $confirm -eq 1 ]; then |
---|
[161] | 20 | creat_nutchuser_account $Nutchuser_Passwd |
---|
[139] | 21 | make_ssh_key |
---|
[140] | 22 | |
---|
[136] | 23 | # 解壓縮 |
---|
[139] | 24 | tar -zxvf nutchez-0.2-0531.tar.gz -C /opt/ |
---|
[136] | 25 | Install_Nutch |
---|
[144] | 26 | mkdir /var/nutchez |
---|
[137] | 27 | chown -R nutchuser:nutchuser /opt/nutchez |
---|
[139] | 28 | chown -R nutchuser:nutchuser /var/nutchez |
---|
[140] | 29 | su nutchuser -c "mkdir /home/nutchuser/nutchez" |
---|
| 30 | su nutchuser -c "mkdir /home/nutchuser/nutchez/urls" |
---|
| 31 | su nutchuser -c "touch /home/nutchuser/nutchez/urls/urls.txt" |
---|
| 32 | su nutchuser -c "mkdir /home/nutchuser/nutchez/search" |
---|
[158] | 33 | su nutchuser -c "mkdir /home/nutchuser/nutchez/source" |
---|
[144] | 34 | make_client_install |
---|
[117] | 35 | |
---|
[137] | 36 | # 啟動系統 |
---|
[117] | 37 | format_HDFS |
---|
| 38 | start_up_NutchEZ |
---|
[139] | 39 | start_up_tomcat |
---|
[125] | 40 | # 安裝流程結束,並進入網頁管理頁面設定爬網網址...等 |
---|
| 41 | echo "Install Successfully!!" |
---|
[130] | 42 | echo "Visit http://$MasterIP_Address:8080" |
---|
[144] | 43 | client_install_command |
---|
[117] | 44 | elif [ $confirm -eq 2 ]; then |
---|
| 45 | main |
---|
| 46 | fi |
---|
| 47 | } |
---|
| 48 | |
---|
| 49 | main |
---|
Note: See
TracBrowser
for help on using the repository browser.