Changeset 151 for nutchez-0.2/src


Ignore:
Timestamp:
Jun 4, 2010, 10:10:49 AM (14 years ago)
Author:
rock
Message:

字型顏色美化

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

Legend:

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

    r147 r151  
    2323# 參數詢問
    2424yesno="no"
    25 echo -e "\nYour master IP: $Master_IP_Address"
     25echo -e "\n\033[31mYour master IP: $Master_IP_Address\033[0m"
    2626read -p "Is this data cooect? (yes/no): " yesno
    2727             
  • nutchez-0.2/src/test/client_install_func.sh

    r149 r151  
    1313function check_root(){
    1414# 正式版後可拿掉此 echo
    15 echo -e "\n= check_root (debug) ="
     15echo -e "\n\033[31m= check_root (debug) =\033[0m"
    1616if [ $USER != "root" ]; then
    1717    echo -e "\nPlz Change root to execute it!!!"
     
    2525# 查出此主機的作業系統,以及版本
    2626function check_systemInfo(){
    27 echo -e "\n= check_systemInfo (debug) ="
     27echo -e "\n\033[31m= check_systemInfo (debug) =\033[0m"
    2828echo -e "\nYour system information are:"
    2929Linux_Distribution=$(lsb_release -a 2> /dev/null | grep "Distributor ID:" | awk '{print $3}')
     
    3636function install_packages(){
    3737# deb 系列系統
    38 echo -e "\n= install_packages (debug) ="
     38echo -e "\n\033[31m= install_packages (debug) =\033[0m"
    3939echo -e "\nCheck dependent packages"
    4040if [ "$Linux_Distribution" == "Ubuntu" ] || [ "$Linux_Distribution" == "Debian" ] ;then
     
    5555# 目前先檢查是否有/opt/nutchez 這個資料夾即可
    5656function check_nez_installed(){
    57 echo -e "\n= chcheck_nez_installed (debug) ="
     57echo -e "\n\033[31m= chcheck_nez_installed (debug) =\033[0m"
    5858if [ -d /opt/nutchez ]; then
    5959    echo -e "\nSystem already had NutchEz."
     
    6969# (3)系統有安裝但Sun Java 在非預設路徑下 (4)以正確安裝 Sun JAVA 預設路徑下
    7070function check_sunJava(){
    71 echo -e "\n= check_sunJava (debug) ="
     71echo -e "\n\033[31m= check_sunJava (debug) =\033[0m"
    7272echo -e "\nNutchEz need Sun Java JDK 1.6.x or above version"
    7373
     
    130130# 檢查是否有安裝openssh, openssh-server
    131131function check_ssh(){
    132 echo -e "\n= check_ssh (debug) ="
     132echo -e "\n\033[31m= check_ssh (debug) =\033[0m"
    133133if [ -e /usr/bin/ssh ]; then
    134134    echo -e "\nSystem has ssh."
     
    149149# 檢查是否有安裝dialog
    150150function check_dialog(){
    151 echo -e "\n= check_dialog (debug) ="
     151echo -e "\n\033[31m= check_dialog (debug) =\033[0m"
    152152if [ -e /usr/bin/dialog ]; then
    153153    echo -e "\nSystem has dialog."
     
    163163# 此步驟若無法連到 master 則跳出
    164164function scp_master_nutchuser_sshkey(){
    165 echo -e "\n= scp_master_nutchuser_sshkey (debug) ="
     165echo -e "\n\033[31m= scp_master_nutchuser_sshkey (debug) =\033[0m"
    166166echo -e "mkdir -p /home/nutchuser/"
    167167mkdir -p /home/nutchuser/.ssh/
     
    191191# 新增nutchuser 帳號時用 Nutchuser_Passwd 當密碼
    192192function creat_nutchuser_account(){
    193 echo -e "\n= creat_nutchuser_account (debug) ="
     193echo -e "\n\033[31m= creat_nutchuser_account (debug) =\033[0m"
    194194
    195195while [ "$Nutchuser_Passwd" != "$Nutchuser_Passwd2" ]
     
    232232# 目前僅需做到能無礙的複製遠端的/opt/nutchez/到local的/opt/
    233233function scp_packages(){
    234 echo -e "\n= scp_packages (debug) ="
     234echo -e "\n\033[31m= scp_packages (debug) =\033[0m"
    235235chmod 777 /opt
    236236mkdir /opt/nutchez
     
    248248
    249249function install_nutch_package(){
     250  echo -e "\n\033[31m= install_nutch_package (debug) =\033[0m"
    250251  tar -zxvf /opt/nutchez/NutchezForClientOf_$Master_IP_Address.tar.gz -C /
    251252  /opt/nutchez/nutch/bin/hadoop-daemon.sh start datanode
     
    254255
    255256function recall_hostname_ip(){
    256 echo -e "\n= recall_hostname_ip (debug) ="
     257echo -e "\n\033[31m= recall_hostname_ip (debug) =\033[0m"
    257258
    258259net_interfaces=$(ifconfig | grep ^eth | cut -d " " -f1)
Note: See TracChangeset for help on using the changeset viewer.