Skip to content

Instantly share code, notes, and snippets.

@CedricL46
Last active May 25, 2021 11:57
Show Gist options
  • Save CedricL46/875a7e98a2fe4c6d20569f2c9709783a to your computer and use it in GitHub Desktop.
Save CedricL46/875a7e98a2fe4c6d20569f2c9709783a to your computer and use it in GitHub Desktop.
# 1) First step is to sudo as the unix user with weblogic access (replace YOUR_SUDO_USER with yours)
ssh YOUR_USER@YOUR_LINUX_SERVER
sudo su - YOUR_SUDO_USER
# 2) Locate your installed weblogic domain start file
find / -name startManagedWebLogic.sh -type f -print 2>/dev/null
#or if you use mlocate
locate startManagedWebLogic.sh
## After a while this command should print something like :
##/YOUR_SUDO_USER/weblogic/user_projects/domains/YOUR_DOMAIN/bin/startManagedWebLogic.sh
# (Optionnal) set the stopWeblogic.sh to force = true so you don't have to wait endlessly for all activity to be over
vim /YOUR_SUDO_USER/weblogic/user_projects/domains/YOUR_DOMAIN/bin/stopWeblogic.sh
#update this field from echo "shutdown('${SERVER_NAME}', 'Server', ignoreSessions='true')" >> "shutdown-${SERVER_NAME}.py" to
echo "shutdown('${SERVER_NAME}', 'Server', force="true", ignoreSessions='true')" >> "shutdown-${SERVER_NAME}.py"
# 3) Run to stop a Managed Weblogic Server name YOUR_MANAGED_SERVER :
nohup ./YOUR_SUDO_USER/weblogic/user_projects/domains/YOUR_DOMAIN/bin/stopManagedWeblogic.sh YOUR_MANAGED_SERVER t3://YOUR_ADMIN_URL:YOUR_ADMIN_PORT >stop_log.out 2>&1 &
# 4) Run to start a Managed Weblogic Server name YOUR_MANAGED_SERVER :
nohup ./YOUR_SUDO_USER/weblogic/user_projects/domains/YOUR_DOMAIN/bin/startManagedWeblogic.sh YOUR_MANAGED_SERVER t3://YOUR_ADMIN_URL:YOUR_ADMIN_PORT >start_log.out 2>&1 &
# 5) Run to stop / start the whole domain :
## STOP
/YOUR_SUDO_USER/weblogic/user_projects/domains/YOUR_DOMAIN/bin/stopWeblogic.sh
## START
/YOUR_SUDO_USER/weblogic/user_projects/domains/YOUR_DOMAIN/bin/startWeblogic.sh >start.out 2>&1 &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment