Last change
on this file since 141 was
140,
checked in by shunfa, 14 years ago
|
單機安裝測試ok
|
-
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 | |
---|
| 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 |
---|
[137] | 17 | } |
---|
[125] | 18 | |
---|
[137] | 19 | main () { |
---|
[139] | 20 | echo "歡迎使用NutchEZ, 此安裝程序會為您新建一個nutchuser帳號" |
---|
[117] | 21 | set_install_information |
---|
| 22 | show_info |
---|
| 23 | read -p "Please confirm your install infomation: 1.Yes 2.No " confirm |
---|
| 24 | if [ $confirm -eq 1 ]; then |
---|
[139] | 25 | creat_nutchuser_account $nutchuser_passwd |
---|
| 26 | make_ssh_key |
---|
[140] | 27 | |
---|
[136] | 28 | # 解壓縮 |
---|
[139] | 29 | tar -zxvf nutchez-0.2-0531.tar.gz -C /opt/ |
---|
[136] | 30 | Install_Nutch |
---|
[140] | 31 | |
---|
[137] | 32 | chown -R nutchuser:nutchuser /opt/nutchez |
---|
[139] | 33 | chown -R nutchuser:nutchuser /var/nutchez |
---|
[140] | 34 | su nutchuser -c "mkdir /home/nutchuser/nutchez" |
---|
| 35 | su nutchuser -c "mkdir /home/nutchuser/nutchez/urls" |
---|
| 36 | su nutchuser -c "touch /home/nutchuser/nutchez/urls/urls.txt" |
---|
| 37 | su nutchuser -c "mkdir /home/nutchuser/nutchez/search" |
---|
[136] | 38 | # make_client_install |
---|
[117] | 39 | |
---|
[137] | 40 | # 啟動系統 |
---|
[117] | 41 | format_HDFS |
---|
| 42 | start_up_NutchEZ |
---|
[139] | 43 | start_up_tomcat |
---|
[125] | 44 | # 安裝流程結束,並進入網頁管理頁面設定爬網網址...等 |
---|
| 45 | echo "Install Successfully!!" |
---|
[130] | 46 | echo "Visit http://$MasterIP_Address:8080" |
---|
[117] | 47 | elif [ $confirm -eq 2 ]; then |
---|
| 48 | main |
---|
| 49 | fi |
---|
| 50 | } |
---|
| 51 | |
---|
[137] | 52 | check_info |
---|
[117] | 53 | main |
---|
Note: See
TracBrowser
for help on using the repository browser.