WebLogic Management Scripts

Source: Internet
Author: User

start.sh

Java code
  1. #!/usr/bin/bash
  2. #
  3. # start.sh
  4. # @auth: [Email protected]
  5. #
  6. Server_status () {
  7. Serv_status= ' Ps-ef | grep WebLogic | grep WebApp | Grep-v grep | grep $ | Wc-l '
  8. If ["$serv _status"-eq "1"]; Then
  9. echo "[Status:running]"
  10. Else
  11. echo "[status:stopped]"
  12. Fi
  13. }
  14. Adminserver= "http://10.168.31.108:7001"
  15. echo "================= ngboss WebLogic Server start Console =================="
  16. echo "A:start admin" ' Server_status adminserver '
  17. echo "P:start proxy" ' Server_status proxy '
  18. echo "1:start ngboss" ' Server_status ngboss '
  19. echo "2:start chnlmanm" ' Server_status copmanm '
  20. echo "3:start copmanm" ' Server_status copmanm '
  21. echo "4:start custmanm" ' Server_status custmanm '
  22. echo "5:start resmanm" ' Server_status resmanm '
  23. echo "6:start salemanm" ' Server_status salemanm '
  24. echo "7:start statmanm" ' Server_status statmanm '
  25. echo "8:start sysmanm" ' Server_status sysmanm '
  26. echo "9:start saleserv" ' Server_status saleserv '
  27. echo "Q:to quit"
  28. echo "========================================================================="
  29. Echo-n "Please select which server want to start:"
  30. Read V_server
  31. Cd
  32. CD Ngadmindomain
  33. Case $v _server in
  34. "A")
  35. echo "Starting Admin server ..."
  36. Nohup bin/startweblogic.sh &
  37. ;;
  38. "P")
  39. echo "Starting Proxy server ..."
  40. Nohup bin/startmanagedweblogic.sh proxy $adminserver &
  41. ;;
  42. "1")
  43. echo "Starting Ngboss server ..."
  44. Nohup bin/startmanagedweblogic.sh Ngboss $adminserver &
  45. ;;
  46. "2")
  47. echo "Starting CHNLMANM server ..."
  48. Nohup bin/startmanagedweblogic.sh chnlmanm $adminserver &
  49. ;;
  50. "3")
  51. echo "Starting COPMANM server ..."
  52. Nohup bin/startmanagedweblogic.sh copmanm $adminserver &
  53. ;;
  54. "4")
  55. echo "Starting CUSTMANM server ..."
  56. Nohup bin/startmanagedweblogic.sh custmanm $adminserver &
  57. ;;
  58. "5")
  59. echo "Starting RESMANM server ..."
  60. Nohup bin/startmanagedweblogic.sh resmanm $adminserver &
  61. ;;
  62. "6")
  63. echo "Starting SALEMANM server ..."
  64. Nohup bin/startmanagedweblogic.sh salemanm $adminserver &
  65. ;;
  66. "7")
  67. echo "Starting STATMANM server ..."
  68. Nohup bin/startmanagedweblogic.sh statmanm $adminserver &
  69. ;;
  70. "8")
  71. echo "Starting SYSMANM server ..."
  72. Nohup bin/startmanagedweblogic.sh sysmanm $adminserver &
  73. ;;
  74. "9")
  75. echo "Starting Saleserv server ..."
  76. Nohup bin/startmanagedweblogic.sh saleserv $adminserver &
  77. ;;
  78. *)
  79. echo "You had not select any server to start yet!"
  80. ;;
  81. Esac
  82. Exit 0



stop.sh

Java code
  1. #!/usr/bin/bash
  2. #
  3. # stop.sh
  4. # @auth: [Email protected]
  5. #
  6. Server_status () {
  7. Serv_status= ' Ps-ef | grep WebLogic | grep WebApp | Grep-v grep | grep $ | Wc-l '
  8. If ["$serv _status"-eq "1"]; Then
  9. echo "[Status:running]"
  10. Else
  11. echo "[status:stopped]"
  12. Fi
  13. }
  14. echo "=============== ngboss WebLogic Server stop Console =============="
  15. echo "a:stop admin" ' Server_status adminserver '
  16. echo "P:stop proxy" ' Server_status proxy '
  17. echo "1:stop ngboss" ' Server_status ngboss '
  18. echo "2:stop chnlmanm" ' Server_status chnlmanm '
  19. echo "3:stop copmanm" ' Server_status copmanm '
  20. echo "4:stop custmanm" ' Server_status custmanm '
  21. echo "5:stop resmanm" ' Server_status resmanm '
  22. echo "6:stop salemanm" ' Server_status salemanm '
  23. echo "7:stop statmanm" ' Server_status statmanm '
  24. echo "8:stop sysmanm" ' Server_status sysmanm '
  25. echo "9:stop saleserv" ' Server_status saleserv '
  26. echo "99:stop all server except Admin and proxy"
  27. echo "100:stop All"
  28. echo "Q:to quit"
  29. echo "================================================================="
  30. Echo-n "Please select which server want to stop:"
  31. Read V_server
  32. Case $v _server in
  33. "A")
  34. echo "Stopping admin server ..."
  35. Kill-9 ' Ps-ef | grep WebLogic | Grep-v grep | grep "AdminServer" | awk ' {print $} '
  36. ;;
  37. "P")
  38. echo "Stopping Proxy server ..."
  39. Kill-9 ' Ps-ef | grep WebLogic | Grep-v grep | grep "Proxy" | awk ' {print $} '
  40. ;;
  41. "1")
  42. echo "Stopping Ngboss server ..."
  43. Kill-9 ' Ps-ef | grep WebLogic | Grep-v grep | grep "Ngboss" | awk ' {print $} '
  44. ;;
  45. "2")
  46. echo "Stopping Chnlmanm server ..."
  47. Kill-9 ' Ps-ef | grep WebLogic | Grep-v grep | grep "Chnlmanm" | awk ' {print $} '
  48. ;;
  49. "3")
  50. echo "Stopping Copmanm server ..."
  51. Kill-9 ' Ps-ef | grep WebLogic | Grep-v grep | grep "Copmanm" | awk ' {print $} '
  52. ;;
  53. "4")
  54. echo "Stopping Custmanm server ..."
  55. Kill-9 ' Ps-ef | grep WebLogic | Grep-v grep | grep "Custmanm" | awk ' {print $} '
  56. ;;
  57. "5")
  58. echo "Stopping Resmanm server ..."
  59. Kill-9 ' Ps-ef | grep WebLogic | Grep-v grep | grep "Resmanm" | awk ' {print $} '
  60. ;;
  61. "6")
  62. echo "Stopping Salemanm server ..."
  63. Kill-9 ' Ps-ef | grep WebLogic | Grep-v grep | grep "Salemanm" | awk ' {print $} '
  64. ;;
  65. "7")
  66. echo "Stopping Statmanm server ..."
  67. Kill-9 ' Ps-ef | grep WebLogic | Grep-v grep | grep "Statmanm" | awk ' {print $} '
  68. ;;
  69. "8")
  70. echo "Stopping Sysmanm server ..."
  71. Kill-9 ' Ps-ef | grep WebLogic | Grep-v grep | grep "Sysmanm" | awk ' {print $} '
  72. ;;
  73. "9")
  74. echo "Stopping Saleserv server ..."
  75. Kill-9 ' Ps-ef | grep WebLogic | Grep-v grep | grep "Saleserv" | awk ' {print $} '
  76. ;;
  77. "99")
  78. echo "Stopping all server except AdminServer ..."
  79. Kill-9 ' Ps-ef | grep WebLogic | Grep-v grep | Grep-v "AdminServer" | Grep-v "Proxy" | awk ' {print $} '
  80. ;;
  81. "100")
  82. echo "Stopping all servers ..."
  83. Kill-9 ' Ps-ef | grep WebLogic | Grep-v grep | awk ' {print $} '
  84. ;;
  85. *)
  86. echo "You had not select any server to stop yet!"
  87. ;;
  88. Esac
  89. Exit 0

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.