Changeset 140


Ignore:
Timestamp:
Jun 1, 2010, 4:34:06 PM (15 years ago)
Author:
shunfa
Message:

單機安裝測試ok

Location:
nutchez-0.2/src/test
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • nutchez-0.2/src/test/client_install

    r135 r140  
    1313
    1414# 需要 master_install 設定的參數區
     15# Master IP here
    1516Master_IP_Address="a.a.a.a";
    1617
     
    6869read
    6970
    70 # 檢查是否安裝 php 5.5
    71 check_php
    72 read
    73 
    7471# scp nutchuser@master_ip:~ 把.ssh/目錄複製下來
    7572# 當使用者輸入nutchuser 密碼時,將此密碼紀錄到Nutchuser_Passwd
  • nutchez-0.2/src/test/client_install_func.sh

    r139 r140  
    127127fi
    128128}
    129 
    130 
    131 # 檢查是否安裝 php 5.5
    132 function check_php(){
    133 echo -e "\n= check_php (debug) ="
    134 if [ "$(php -v 2>/dev/null | grep "PHP 5" | awk '{print $2}' | cut -d "." -f1)" == 5 ]; then
    135     echo -e "\nPHP'version is 5"
    136 else
    137     echo -e "\nplz install PHP 5 version!"
    138     exit
    139 fi
    140 }
    141 
    142129
    143130# scp nutchuser@master_ip:~ 把.ssh/目錄複製下來
  • nutchez-0.2/src/test/install

    r139 r140  
    1212  check_systemInfo
    1313  check_nez_installed
    14   #check_sunJava
    15   #check_ssh
    16   #check_dialog
    17   #check_php
     14  check_sunJava
     15  check_ssh
     16  check_dialog
    1817}
    1918
     
    2625    creat_nutchuser_account $nutchuser_passwd
    2726    make_ssh_key
    28     sleep 10
     27   
    2928    # 解壓縮
    3029    tar -zxvf nutchez-0.2-0531.tar.gz -C /opt/
    3130    Install_Nutch
    32 #    Install_Tomcat
     31   
    3332    chown -R nutchuser:nutchuser /opt/nutchez
    3433    chown -R nutchuser:nutchuser /var/nutchez
     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"
    3538    # make_client_install
    3639
  • nutchez-0.2/src/test/install_func.sh

    r139 r140  
    108108
    109109
     110function client_PassMasterIPAddr () {
     111  Line_NO=`cat client_install | grep -n '# Master IP here' | sed 's/:.*//g'`
     112  echo "debug...Master IP here line number = $Line_NO..."
     113  sed -i ''$((Line_NO+1))'d' client_install
     114  echo "debug...edit Master IP at line $((Line_NO+1))..."
     115  sed -i ''$Line_NO'a Master_IP_Address='$MasterIP_Address'' client_install
     116  echo "edit client_install done..."
     117}
     118
    110119function make_client_install () {
    111120  # 將Master_IP_Address給client
    112121  # 打包安裝目錄(不含tomcat)
    113   # tar -czv /opt/nutchez/nutch NutchezFor_$Master_IP_Client.tar.gz
    114   echo "undo... function make_client_install"
     122  echo "function make_client_install..."
     123  client_PassMasterIPAddr
     124  su nutchuser -c "mkdir /opt/nutchez/nutch/clinet_install"
     125  cp client_install client_install_func.sh /opt/nutchez/nutch/clinet_install
     126  tar -cvzf /opt/nutchez/NutchezForClientOf_$Master_IP_Address.tar.gz  /opt/nutchez/nutch
    115127}
    116128
Note: See TracChangeset for help on using the changeset viewer.