Friday, September 11, 2015

Apply WebLogic Server (WLS) Patches Using BSU Command-line

In this post we shall see steps to apply weblogic patch using command line arguments.
Note: Please shutdown Admin+Manage server before applying the patch.

Step 1) Download the patch using MyOracleSupport link "Patches & Update"

Step 2) Unzip the patch.
Output:

 

 
Step 3) Copy the files ( A7CZ.jar and patch-catalog_21774.xml) to $MW_HOME/utils/bsu/cache_dir

Step 4) Execute setWLSEnv.sh from $WL_HOME/server/bin as below to set all environment variables:
. ./setWLSEnv.sh

Step 5) Navigate to below location and rename patch-catalog_21774.xml  as patch-catalog.xml.
cd $MW_HOME/utils/bsu/cache_dir
mv patch-catalog_21774.xml patch-catalog.xml

Step 6) Navigate to below location to apply the patch.
cd $MW_HOME/utils/bsu

Step 7) Command to view the downloaded patches is as below:

SYNTAX: ./bsu.sh -prod_dir=<weblogic_home> -patch_download_dir=<download dir of patch> -status=downloaded -view -verbose

EXAMPLE: ./bsu.sh -prod_dir=$WL_HOME -patch_download_dir=$MW_HOME/utils/bsu/cache_dir -status=downloaded -view -verbose

Step 8) Command to install the patch:

SYNTAX: ./bsu.sh -prod_dir=<weblogic_home> -patchlist=<patchID> -verbose -install

EXAMPLE: ./bsu.sh -install -patch_download_dir=$MW_HOME/utils/bsu/cache_dir -patchlist=A7CZ -prod_dir=$WL_HOME -verbose -log=$MW_HOME/utils/bsu/cache_dir/bsu_install.log -log_priority=trace

Step 9) Command to check if the patch is installed:

SYNTAX: ./bsu.sh -prod_dir=<weblogic_home> -patch_download_dir=<download dir of patch> -status=applied -verbose -view

EXAMPLE: ./bsu.sh -prod_dir=$WL_HOME -patch_download_dir=$MW_HOME/utils/bsu/cache_dir -status=applied -verbose -view

Step 10) Start Admin +Manage server from another command prompt.

Step 11) Command to rollback Weblogic Patch:
 
SYNTAX: ./bsu.sh -remove -patchlist=<patchID> -prod_dir=<weblogic_home>

EXAMPLE: ./bsu.sh -remove -patchlist=A7CZ -prod_dir=$WL_HOME


No comments:

Post a Comment

Other Posts