- Timestamp:
- Aug 30, 2010, 2:18:14 PM (14 years ago)
- Location:
- drbl-virt
- Files:
-
- 1 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
drbl-virt/install.sh
r188 r202 9 9 # 2010/08/03 Rock First release (1.0) 10 10 11 # [PATH] 11 12 # [Path] 12 13 Work_Home="/opt/drbl-virt" 13 14 Work_Path="/opt/drbl-virt/sbin" 14 15 Now_Path="$(dirname $0)" 15 PATH=${PATH}:$Work_Path 16 PATH=${PATH}:$Work_Path:${Now_Path}/sbin 16 17 17 # [Source]18 # Source] 18 19 source $Now_Path/sbin/functions_drbl_virt 19 20 20 21 # [Main] 21 #22 22 check_root 23 23 … … 35 35 fi 36 36 37 38 # = 1. Create /opt/drbl-virt and copy file = 37 39 mkdir -p $Work_Home 38 40 mkdir $Work_Home/etc … … 42 44 cp -fr $Now_Path/uninstall.sh $Work_Home/ 43 45 44 echo "drbl-virt install completion" 45 echo "Please go to /opt/drbl-virt/ to check" 46 # = 2. Move war = 47 mv drbl-virt.war $Work_Home/ 48 49 # = 4. Install completion = 50 echo "" 51 echo "[drbl-virt install completion]" 52 echo "Please go to /opt/drbl-virt/ to check !!!" -
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 "" -
drbl-virt/web/WebContent/drbl_client.jsp
r194 r202 8 8 </head> 9 9 <body> 10 developing...... 10 developing......[威宇威過威士忌] 11 11 </body> 12 12 </html> -
drbl-virt/web/WebContent/drbl_vm.jsp
r194 r202 8 8 </head> 9 9 <body> 10 developing...... 10 developing......[steven 好帥] 11 11 </body> 12 12 </html> -
drbl-virt/web/WebContent/home.html
r194 r202 7 7 <body> 8 8 developing...... 9 [阿嘶大大是小澤圓] 9 10 </body> 10 11 </html> -
drbl-virt/web/WebContent/link.html
r194 r202 6 6 </head> 7 7 <body> 8 developing...... 8 developing......[咪咪好可愛] 9 9 </body> 10 10 </html>
Note: See TracChangeset
for help on using the changeset viewer.