Last change
on this file since 195 was
195,
checked in by shunfa, 14 years ago
|
修改語言中文檔案
|
-
Property svn:executable set to
*
|
File size:
1.8 KB
|
Rev | Line | |
---|
[116] | 1 | #!/bin/bash |
---|
| 2 | # 語言的選擇 |
---|
[119] | 3 | # source ./language_choise.sh |
---|
[116] | 4 | # 匯入功能函數 |
---|
| 5 | source ./install_func.sh |
---|
[195] | 6 | #source ./client_install_func.sh |
---|
| 7 | source ./install_lang.zh |
---|
| 8 | |
---|
| 9 | Work_Path=$(echo $0 | sed 's/install//') |
---|
| 10 | |
---|
| 11 | # Source functions |
---|
| 12 | source $Work_Path/client_install_func.sh |
---|
[117] | 13 | ### real code ##### |
---|
[137] | 14 | |
---|
[150] | 15 | # 前置作業 |
---|
| 16 | # *.sh及nutchez-0.2-0531.tar.gz均在同一目錄下 |
---|
| 17 | |
---|
[164] | 18 | function show_info () { |
---|
| 19 | if [ $? -eq 0 ]; then |
---|
| 20 | echo -e "\033[1;32;40m $1 \033[0m" |
---|
| 21 | fi |
---|
| 22 | } |
---|
[125] | 23 | |
---|
[137] | 24 | main () { |
---|
[160] | 25 | check_info |
---|
[195] | 26 | show_info $main_echo_1 |
---|
| 27 | # show_info "歡迎使用NutchEZ, 此安裝程序會為您新建一個nutchuser帳號並協助您設定密碼" |
---|
[117] | 28 | set_install_information |
---|
[195] | 29 | read -p "$main_echo_2" confirm |
---|
| 30 | # read -p "Please confirm your install infomation: 1.Yes 2.No " confirm |
---|
[117] | 31 | if [ $confirm -eq 1 ]; then |
---|
[161] | 32 | creat_nutchuser_account $Nutchuser_Passwd |
---|
[139] | 33 | make_ssh_key |
---|
[140] | 34 | |
---|
[136] | 35 | # 解壓縮 |
---|
[187] | 36 | tar -zxvf nutchezV2-current.tar.gz -C /opt/ |
---|
[136] | 37 | Install_Nutch |
---|
[144] | 38 | mkdir /var/nutchez |
---|
[137] | 39 | chown -R nutchuser:nutchuser /opt/nutchez |
---|
[139] | 40 | chown -R nutchuser:nutchuser /var/nutchez |
---|
[140] | 41 | su nutchuser -c "mkdir /home/nutchuser/nutchez" |
---|
| 42 | su nutchuser -c "mkdir /home/nutchuser/nutchez/urls" |
---|
| 43 | su nutchuser -c "touch /home/nutchuser/nutchez/urls/urls.txt" |
---|
| 44 | su nutchuser -c "mkdir /home/nutchuser/nutchez/search" |
---|
[158] | 45 | su nutchuser -c "mkdir /home/nutchuser/nutchez/source" |
---|
[171] | 46 | su nutchuser -c "mkdir /home/nutchuser/nutchez/system" |
---|
[144] | 47 | make_client_install |
---|
[117] | 48 | |
---|
[137] | 49 | # 啟動系統 |
---|
[117] | 50 | format_HDFS |
---|
| 51 | start_up_NutchEZ |
---|
[139] | 52 | start_up_tomcat |
---|
[125] | 53 | # 安裝流程結束,並進入網頁管理頁面設定爬網網址...等 |
---|
[195] | 54 | show_info $main_echo_3 |
---|
| 55 | # show_info "Install Successfully!!" |
---|
| 56 | show_info $main_echo_4 |
---|
| 57 | # show_info "Visit http://$MasterIP_Address:8080" |
---|
| 58 | client_install_commands |
---|
[117] | 59 | elif [ $confirm -eq 2 ]; then |
---|
| 60 | main |
---|
| 61 | fi |
---|
| 62 | } |
---|
| 63 | |
---|
| 64 | main |
---|
Note: See
TracBrowser
for help on using the repository browser.