Changeset 219 for nutchez-0.2/src/shell


Ignore:
Timestamp:
Jun 24, 2010, 3:23:10 PM (15 years ago)
Author:
waue
Message:

修改 work path 以及 設定系統路徑

Location:
nutchez-0.2/src/shell
Files:
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • nutchez-0.2/src/shell/client_remove.sh

    r214 r219  
    1010
    1111
    12 source ./lang_link
     12source /home/nutchuser/nutchez/system/lang_link
    1313# 需要 master_install 設定的參數區
    1414# Master IP here
  • nutchez-0.2/src/shell/install

    r218 r219  
    5151
    5252    mkdir /var/nutchez
     53    # 建立 nutch 與 tomcat 的 logs 資料夾
     54    mkdir /var/nutchez/tomcat-logs
     55    ln -sf /var/nutchez/tomcat-logs /opt/nutchez/tomcat/logs
     56    mkdir /var/nutchez/logs
     57    ln -sf /var/nutchez/logs /opt/nutchez/nutch/logs
     58
    5359    chown -R nutchuser:nutchuser /opt/nutchez
    5460    chown -R nutchuser:nutchuser /var/nutchez
     61   
     62    # 系統路徑鍊結
     63    ln -sf /home/nutchuser/nutchez/system/nutchez /usr/local/sbin/nutchez
    5564
    5665    make_client_install
  • nutchez-0.2/src/shell/install_func.sh

    r218 r219  
    11#!/bin/bash
    2 source $Work_Path/lang_link
     2#source $Work_Path/lang_link
    33
    44# shell檔及壓縮檔在同一目錄中
     
    8585function unzip_nV2_pack(){
    8686  local pac_name=nutchez-0.2pack-current.tar.gz
     87  local svn_ver=218
    8788  if [ ! -d "./package" ];then
    8889    mkdir ./package
    8990  fi
    9091  if [ ! -e "./package/$pac_name" ];then
    91   wget "http://trac.nchc.org.tw/cloud/export/217/nutchez-0.2/src/package/$pac_name"
    92   echo wget "http://trac.nchc.org.tw/cloud/export/217/nutchez-0.2/src/package/$pac_name"
    93     if [ -z $? ];then
    94   mv $pac_name ./package
    95   echo "movied"
     92    wget "http://trac.nchc.org.tw/cloud/export/$svn_ver/nutchez-0.2/src/package/$pac_name";
     93    if [ $? -eq 0 ];then
     94  mv $pac_name ./package;
     95  echo "movied";
    9696    else
    97   show_info "$pac_name not found, installation was not finished!"
    98   exit 8
     97  show_info "$pac_name not found, installation was not finished!";
     98  exit 8;
    9999    fi
    100100  fi
    101   #tar -zxvf ./package/$pac_name -C /opt/
     101  tar -zxvf ./package/$pac_name -C /opt/
    102102}
    103103
  • nutchez-0.2/src/shell/master_remove.sh

    r214 r219  
    99#   
    1010
    11 source ./lang_link
     11source /home/nutchuser/nutchez/system/lang_link
    1212
    1313##########  echo function  ##########
     
    5656# 移除檔案及資料夾
    5757function remove_folders () {
     58  rm /usr/local/sbin/nutchez
    5859  show_info "$MR_remove_folders_echo_1" # "正在刪除安裝時所建立的檔案及資料夾..."
    5960  rm -rf /opt/nutchez
  • nutchez-0.2/src/shell/nutchez

    r210 r219  
    1818Tomcat_HOME="/opt/nutchez/tomcat"
    1919NutchEZ_HOME="/home/nutchuser/nutchez"
    20 Work_Path="./"
    21 Work_Path_J=0
    22 
    23 # Work Path setup
    24 echo $0 | grep '/' || Work_Path_J=1
    25 if [ "$Work_Path_J" == "0"  ]; then
    26   Work_Path=$(echo $0 | sed 's/nutchez//')
    27 fi
     20Work_Path=
     21
     22#Work_Path="./"
     23#Work_Path_J=0
     24##  Work Path setup ##
     25#echo $0 | grep '/' || Work_Path_J=1
     26#if [ "$Work_Path_J" == "0"  ]; then
     27# Work_Path=$(echo $0 | sed 's/nutchez//')
     28#fi
    2829
    2930# [Env Declaration] #
     
    5657
    5758    echo -e "$pre_check_echo_1"
    58     ./duplicate_del "${NutchEZ_HOME}/system/nutch_nodes"
    59     su root -c "./duplicate_del /etc/hosts && ./add_hosts ${NutchEZ_HOME}/system/nutch_nodes /etc/hosts"
     59    $Work_Path/duplicate_del "${NutchEZ_HOME}/system/nutch_nodes"
     60    su root -c "$Work_Path/duplicate_del /etc/hosts && $Work_Path/add_hosts ${NutchEZ_HOME}/system/nutch_nodes /etc/hosts"
    6061    # 若密碼輸入失敗則跳出
    6162    if [ $? == "1" ]; then
     
    6970
    7071    echo -e "$pre_check_echo_1"
    71     ./duplicate_del "${NutchEZ_HOME}/system/nutch_nodes"
    72     su root -c "./duplicate_del /etc/hosts && ./add_hosts ${NutchEZ_HOME}/system/nutch_nodes /etc/hosts"
     72    $Work_Path/duplicate_del "${NutchEZ_HOME}/system/nutch_nodes"
     73    su root -c "$Work_Path/duplicate_del /etc/hosts && $Work_Path/add_hosts ${NutchEZ_HOME}/system/nutch_nodes /etc/hosts"
    7374    # 若密碼輸入失敗則跳出                   
    7475    if [ $? == "1" ]; then                   
Note: See TracChangeset for help on using the changeset viewer.