Changeset 123
- Timestamp:
- May 21, 2010, 5:35:16 PM (15 years ago)
- Location:
- nutchez-0.2/src/test
- Files:
-
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
nutchez-0.2/src/test/client_install.sh
r122 r123 7 7 # 2010/05/20 Rock First release 8 8 9 # 正式版之後,記的將不必要 read 拿掉 (trace 用的 read) 9 10 10 11 # 設定 functions … … 28 29 read 29 30 30 # 查出此主機的作業系統,以及版本 ,後面 read 在正式版後會拿掉 (用來trace 用)31 # 查出此主機的作業系統,以及版本 31 32 check_systemInfo 32 33 read … … 39 40 # 檢查是否有安裝sun java ,並檢查是否為jdk 1.6 以上版本 40 41 check_sunJava 42 #read 43 44 # 檢查是否有安裝openssh, openssh-server 45 check_ssh 41 46 read 42 47 43 # 檢查是否有安裝openssh, openssh-server 44 #check_ssh 45 46 # 檢查是否有安裝cdialog 47 #check_dialog 48 # 檢查是否有安裝dialog 49 check_dialog 50 read 48 51 49 52 # 檢查是否安裝 php 5.5 50 #check_php 53 check_php 54 read 51 55 52 56 # scp nutchuser@master_ip:~ 把.ssh/目錄複製下來 -
nutchez-0.2/src/test/client_install_func.sh
r122 r123 7 7 # 2010/05/20 Rock First release(0.1) 8 8 9 # 正式版之後,記的將不必要的 echo 拿掉 10 11 12 # 檢查執行這個程式的是否為root權限 9 13 function check_root(){ 14 # 正式版後可拿掉此 echo 10 15 echo -e "\n= check_root =" 11 16 if [ $USER != "root" ]; then … … 13 18 exit 14 19 fi 20 # 正式版後可拿掉此 echo 21 echo -e "Identify is root." 15 22 } 16 17 23 18 24 … … 42 48 javaPath="/usr/" 43 49 44 test -e $javaPath/bin/java || read -p "Plz input yourspecific Java path\50 test -e $javaPath/bin/java || read -p "Plz input specific Java path\ 45 51 (ex./opt/jvm/java-6-sun-1.6.0.20/): " javaPath 46 52 … … 51 57 52 58 if [ "$JAVA_org" == "" ]; then 53 echo " YourJava is not Sun version, plz install sun Java 1.6.X"59 echo "Java is not Sun version, plz install sun Java 1.6.X" 54 60 exit 55 61 fi 56 62 57 63 if [ $JAVA_version -lt "1.6" ]; then 58 echo " YourJava version is too old (it need 1.6.X above)"64 echo "Java version is too old (it need 1.6.X above)" 59 65 exit 60 66 fi … … 67 73 unset JAVA_org 68 74 unset JAVA_version 75 } 69 76 77 78 # 檢查是否有安裝openssh, openssh-server 79 function check_ssh(){ 80 echo -e "\n= check_ssh =" 81 if [ -e /usr/bin/ssh ]; then 82 echo -e "\nSystem has ssh." 83 else 84 echo "Plz install ssh." 85 exit 86 fi 87 88 if [ -e /usr/sbin/sshd ]; then 89 echo "System has ssh Server (sshd)." 90 else 91 echo "Plz install ssh Server (sshd)." 92 exit 93 fi 70 94 } 95 96 97 # 檢查是否有安裝dialog 98 function check_dialog(){ 99 echo -e "\n= check_dialog =" 100 if [ -e /usr/bin/dialog ]; then 101 echo -e "\nSystem has dialog." 102 else 103 echo "Plz install dialog." 104 exit 105 fi 106 } 107 108 109 # 檢查是否安裝 php 5.5 110 function check_php(){ 111 echo -e "\n= check_php =" 112 if [ "$(php -v 2>/dev/null | grep "PHP 5" | awk '{print $2}' | cut -d "." -f1)" == 5 ]; then 113 echo -e "\nPHP'version is 5" 114 else 115 echo -e "\nplz install PHP 5 version" 116 # exit 117 fi 118 }
Note: See TracChangeset
for help on using the changeset viewer.