Last change
on this file since 188 was
187,
checked in by waue, 14 years ago
|
src/test/install:
修改解壓縮 nutchez-0.2-xxxx.tar.gz => nutchezV2-current.tar.gz
package/nutchez-0.2-0531.tar.gz: 舊版
package/nutchez-0.2-0614.tar.gz: 更新
package/nutchezV2-current.tar.gz: 鍊結
|
-
Property svn:executable set to
*
|
File size:
1.5 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 | |
---|
[164] | 12 | function show_info () { |
---|
| 13 | if [ $? -eq 0 ]; then |
---|
| 14 | echo -e "\033[1;32;40m $1 \033[0m" |
---|
| 15 | fi |
---|
| 16 | } |
---|
[125] | 17 | |
---|
[137] | 18 | main () { |
---|
[160] | 19 | check_info |
---|
[164] | 20 | show_info "歡迎使用NutchEZ, 此安裝程序會為您新建一個nutchuser帳號並協助您設定密碼" |
---|
[117] | 21 | set_install_information |
---|
| 22 | read -p "Please confirm your install infomation: 1.Yes 2.No " confirm |
---|
| 23 | if [ $confirm -eq 1 ]; then |
---|
[161] | 24 | creat_nutchuser_account $Nutchuser_Passwd |
---|
[139] | 25 | make_ssh_key |
---|
[140] | 26 | |
---|
[136] | 27 | # 解壓縮 |
---|
[187] | 28 | tar -zxvf nutchezV2-current.tar.gz -C /opt/ |
---|
[136] | 29 | Install_Nutch |
---|
[144] | 30 | mkdir /var/nutchez |
---|
[137] | 31 | chown -R nutchuser:nutchuser /opt/nutchez |
---|
[139] | 32 | chown -R nutchuser:nutchuser /var/nutchez |
---|
[140] | 33 | su nutchuser -c "mkdir /home/nutchuser/nutchez" |
---|
| 34 | su nutchuser -c "mkdir /home/nutchuser/nutchez/urls" |
---|
| 35 | su nutchuser -c "touch /home/nutchuser/nutchez/urls/urls.txt" |
---|
| 36 | su nutchuser -c "mkdir /home/nutchuser/nutchez/search" |
---|
[158] | 37 | su nutchuser -c "mkdir /home/nutchuser/nutchez/source" |
---|
[171] | 38 | su nutchuser -c "mkdir /home/nutchuser/nutchez/system" |
---|
[144] | 39 | make_client_install |
---|
[117] | 40 | |
---|
[137] | 41 | # 啟動系統 |
---|
[117] | 42 | format_HDFS |
---|
| 43 | start_up_NutchEZ |
---|
[139] | 44 | start_up_tomcat |
---|
[125] | 45 | # 安裝流程結束,並進入網頁管理頁面設定爬網網址...等 |
---|
[164] | 46 | show_info "Install Successfully!!" |
---|
| 47 | show_info "Visit http://$MasterIP_Address:8080" |
---|
[144] | 48 | client_install_command |
---|
[117] | 49 | elif [ $confirm -eq 2 ]; then |
---|
| 50 | main |
---|
| 51 | fi |
---|
| 52 | } |
---|
| 53 | |
---|
| 54 | main |
---|
Note: See
TracBrowser
for help on using the repository browser.