Changeset 202 for drbl-virt/sbin
- Timestamp:
- Aug 30, 2010, 2:18:14 PM (14 years ago)
- Location:
- drbl-virt/sbin
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
drbl-virt/sbin/check_drbl_client.sh
r200 r202 20 20 21 21 # [Main] 22 drbl_sshkey 22 23 for client_IP in $client_IPs 23 24 do 24 25 # local variables 25 client_hostname="$(cat $Work_Home/etc/IP_HOST_TABLE | grep -v "#" | awk '{print $2}')"26 client_hostname="$(cat $Work_Home/etc/IP_HOST_TABLE | grep -v "#" | grep $client_IP | awk '{print $2}')" 26 27 IP_status="online" 27 28 client_CPU_core="" -
drbl-virt/sbin/check_drbl_vm.sh
r200 r202 24 24 # local variables 25 25 IP_status="online" 26 client_hostname="$(cat $Work_Home/etc/IP_HOST_TABLE | grep -v "#" | awk '{print $2}')"26 client_hostname="$(cat $Work_Home/etc/IP_HOST_TABLE | grep -v "#" | grep $client_IP | awk '{print $2}')" 27 27 vm_numbers="" 28 28 vm_hostnames="" … … 58 58 i=i+1 59 59 done 60 60 echo "" 61 61 else 62 echo "[Error] $client_hostname $client_IP is offline !" && exit 262 echo "[Error] $client_hostname $client_IP is offline !" 63 63 64 64 fi -
drbl-virt/sbin/drbl_virt.sh
r187 r202 31 31 $Work_Path/drbl_xen_repush.sh 32 32 33 # = 4. Create User(drbl-virter) and mv drbl-virt.wat to tomcat = 34 creat_drbl-virter 35 install_tomcat_and_mv_drbl-virt -
drbl-virt/sbin/functions_drbl_virt
r195 r202 83 83 # [Check Debian Xen package] 84 84 function check_debian_xen(){ 85 echo "[Check Xen package in apt server]" 86 echo "" 85 87 aptitude update 86 88 check_debian_xen_pkg=$(aptitude search xen-linux-system) … … 300 302 Xen_MAC_5="" 301 303 Xen_MAC_6="" 304 VM_Host_totoal_nu=$(cat $Work_Home/etc/IP_VM_$eth | wc -l) 302 305 303 306 # backup … … 307 310 308 311 # generate MAC 309 for (( i=1 ; i< "$VM_Host_totoal_nu" ; i++ ))312 for (( i=1 ; i<="$VM_Host_totoal_nu" ; i++ )) 310 313 do 311 314 if [ $i -lt 10 ]; then … … 325 328 fi 326 329 done 330 331 # delete tmp file 332 rm /tmp/drbl-virt_MAC 327 333 } 328 334 … … 403 409 404 410 } 411 412 413 # [Creat drbl-virter user] 414 function creat_drbl-virter(){ 415 useradd -m -s /bin/bash drbl-virter 416 } 417 418 419 # [Download tomcat and mv drbl-virt.wat to wepapps] 420 function install_tomcat_and_mv_drbl-virt(){ 421 if [ ! -e $Work_Home/tomcat-7.0.2.tar.gz ]; then 422 wget http://drbl-virt.googlecode.com/files/tomcat-7.0.2.tar.gz -P $Work_Home 423 fi 424 tar zxvf $Work_Home/tomcat-7.0.2.tar.gz -C $Work_Home/ 425 mv $Work_Home/drbl-virt.war $Work_Home/tomcat-7.0.2/webapps/ 426 chown -R drbl-virter.drbl-virter $Work_Home/tomcat-7.0.2 427 su drbl-virter -c "$Work_Home/tomcat-7.0.2/bin/startup.sh" 428 } -
drbl-virt/sbin/xen_install.sh
r191 r202 53 53 echo "[Install Xen Hypervisior]" 54 54 echo "" 55 aptitude install xen-linux-system-2.6.26-2-xen-${Linux_bit} xen-tools bridge-utils python-xml ipcalc xtightvncviewer 55 aptitude install xen-linux-system-2.6.26-2-xen-${Linux_bit} xen-tools bridge-utils python-xml ipcalc xtightvncviewer sun-java6-jre 56 57 # setup java 58 update-java-alternatives -s java-6-sun 59 56 60 cp $Work_Home/conf/debian-lenny_xend-config.sxp /etc/xen/xend-config.sxp 61 # change java 57 62 if [ $1 == "stop" ]; then 58 63 echo ""
Note: See TracChangeset
for help on using the changeset viewer.