Use bsu to install and upgrade weblogic patch

The new version of weblogic upgrade uses OPatch, and the old version of weblogic upgrade requires bsu.sh

1. Download the patch package

Find the patch package according to the link address in the solution to the vulnerability report scanned by green alliance. The following patches are scanned according to Weblogic 9.2 MP3 version

① Upload the downloaded p8178785, p8602044, and p923 generic.zip patches to the Linux system

② Unzip patch pack

[cyyun@cyyun ~]$ unzip -d p817 p8178785_922_Generic.zip
[cyyun@cyyun ~]$ unzip -d p860 p8602044_923_Generic.zip
[cyyun@cyyun ~]$ cd p817/
[cyyun@cyyun p817]$ ls
patch-catalog_15563.xml  README.txt  T522.jar
[cyyun@cyyun p817]$ ls ../p860/
patch-catalog_15563.xml  README.txt  TRS5.jar 

The extracted jar name is the Patch ID, which is the later installed parameter.

③ Move the extracted T522.jar and TRS5.jar packages to the weblogic installation directory / utils / BSU / cache? Dir /. If there is no cache? Dir folder, create a new directory

[cyyun@cyyun p817]$ cp T522.jar /usr/local/weblogic92/utils/bsu/cache_dir/              
[cyyun@cyyun p817]$ cp ../p860/TRS5.jar /usr/local/weblogic92/utils/bsu/cache_dir/

④ Move the patch catalog ﹣ 15563.xml file in one of the extracted folders to the weblogic installation directory / utils / BSU / cache ﹣ dir /, and rename it to patch catalog.xml

[cyyun@cyyun p817]$ cp patch-catalog_15563.xml /usr/local/weblogic92/utils/bsu/cache_dir/patch-catalog.xml

2. View weblogic's current patch list

[cyyun@cyyun bsu]$ cd /usr/local/weblogic92/utils/bsu
[cyyun@cyyun bsu]$ sh bsu.sh -prod_dir=/usr/local/weblogic92/weblogic92/ -status=applied -verbose -view  
ProductName:       WebLogic Platform
ProductVersion:    9.2 MP3
Components:        WebLogic Platform/WebLogic Server,WebLogic Platform/Workshop
                    for WebLogic Platform
BEAHome:           /usr/local/weblogic92
ProductHome:       /usr/local/weblogic92/weblogic92
PatchSystemDir:    /usr/local/weblogic92/utils/bsu
PatchDir:          /usr/local/weblogic92/patch_weblogic923
Profile:           Default
DownloadDir:       /usr/local/weblogic92/utils/bsu/cache_dir

3. Install the patch

You need to stop the weblogic service and confirm that there are no related processes before installation.

-patchlist=TRS5 in TRS5 is the name of the extracted jar package

[cyyun@cyyun bsu]$ sh bsu.sh -install -patch_download_dir=/usr/local/weblogic92/utils/bsu/cache_dir -patchlist=TRS5 -prod_dir=/usr/local/weblogic92/weblogic92 -verbose 
Checking for conflicts..
No conflict(s) detected

Starting installation of Patch ID: TRS5
Installing /usr/local/weblogic92/utils/bsu/cache_dir/TRS5.jar
Extracting /usr/local/weblogic92/patch_weblogic923/patch_jars/CR375790_920mp3.jar
Updating /usr/local/weblogic92/patch_weblogic923/profiles/default/sys_manifest_classpath/weblogic_patch.jar
Old manifest value: Class-Path=
New manifest value: Class-Path=../../../patch_jars/CR375790_920mp3.jar
Backing up /usr/local/weblogic92/weblogic92/server/lib/consoleapp/webapp/WEB-INF/struts-config.xml into /usr/local/weblogic92/patch_weblogic923/backup/backup.jar
Backing up /usr/local/weblogic92/weblogic92/server/lib/consoleapp/webapp/PortalConfig/changemgmt/ChangeManagement.book into /usr/local/weblogic92/patch_weblogic923/backup/backup.jar
Backing up /usr/local/weblogic92/weblogic92/server/lib/consoleapp/webapp/WEB-INF/lib/console.jar into /usr/local/weblogic92/patch_weblogic923/backup/backup.jar
Backing up /usr/local/weblogic92/weblogic92/server/lib/consoleapp/webapp/PortalConfig/connector/Connector.book into /usr/local/weblogic92/patch_weblogic923/backup/backup.jar
Backing up /usr/local/weblogic92/weblogic92/server/lib/consoleapp/webapp/WEB-INF/struts-auto-config-j2ee.xml into /usr/local/weblogic92/patch_weblogic923/backup/backup.jar
Backing up /usr/local/weblogic92/weblogic92/server/lib/consoleapp/webapp/WEB-INF/templates/tablePreferences.xml into /usr/local/weblogic92/patch_weblogic923/backup/backup.jar
Backing up /usr/local/weblogic92/weblogic92/server/lib/consoleapp/webapp/WEB-INF/struts-auto-config-connector.xml into /usr/local/weblogic92/patch_weblogic923/backup/backup.jar
Backing up /usr/local/weblogic92/weblogic92/server/lib/consoleapp/webapp/WEB-INF/weblogic.xml into /usr/local/weblogic92/patch_weblogic923/backup/backup.jar
Backing up /usr/local/weblogic92/weblogic92/server/lib/consoleapp/webapp/WEB-INF/templates/resourcetargeting.xml into /usr/local/weblogic92/patch_weblogic923/backup/backup.jar
Extracting /usr/local/weblogic92/weblogic92/server/lib/consoleapp/webapp/WEB-INF/struts-config.xml
Extracting /usr/local/weblogic92/weblogic92/server/lib/consoleapp/webapp/PortalConfig/changemgmt/StopEdit.portlet
Extracting /usr/local/weblogic92/weblogic92/server/lib/consoleapp/webapp/PortalConfig/changemgmt/ChangeManagement.book
Extracting /usr/local/weblogic92/weblogic92/server/lib/consoleapp/webapp/WEB-INF/lib/console.jar
Extracting /usr/local/weblogic92/weblogic92/server/lib/consoleapp/webapp/PortalConfig/changemgmt/ActivateChanges.portlet
Extracting /usr/local/weblogic92/weblogic92/server/lib/consoleapp/webapp/PortalConfig/connector/Connector.book
Extracting /usr/local/weblogic92/weblogic92/server/lib/consoleapp/webapp/WEB-INF/struts-auto-config-j2ee.xml
Extracting /usr/local/weblogic92/weblogic92/server/lib/consoleapp/webapp/WEB-INF/templates/tablePreferences.xml
Extracting /usr/local/weblogic92/weblogic92/server/lib/consoleapp/webapp/WEB-INF/struts-auto-config-connector.xml
Extracting /usr/local/weblogic92/weblogic92/server/lib/consoleapp/webapp/WEB-INF/weblogic.xml
Extracting /usr/local/weblogic92/weblogic92/server/lib/consoleapp/webapp/WEB-INF/templates/resourcetargeting.xml
Result: Success

Install another patch

[cyyun@cyyun bsu]$ sh bsu.sh -install -patch_download_dir=/usr/local/weblogic92/utils/bsu/cache_dir -patchlist=T522 -prod_dir=/usr/local/weblogic92/weblogic92 

Patch id T522 is not associated with the given product dir.

It is found that the weblogic version of T522 is 9.2.2.0, and that of TRS5 is 9.2.3.0

Check the installed weblogic version and find that < component name = "weblogic Server" version = "9.2.3.0" >, so the T522 patch package cannot be installed on the currently installed weblogic product.

[cyyun@cyyun ~]$ cd /usr/local/weblogic92/
[cyyun@cyyun weblogic92]$ cat registry.xml 
<?xml version="1.0" encoding="UTF-8"?>
<bea-product-information>
  <host home="/usr/local/weblogic92" name="cyyun">
    <product format="1.0" name="WebLogic Platform">
      <release level="9.2"
        ServicePackLevel="3" PatchLevel="0"
        Status="installed"
        InstallTime="Jan 11, 2018 7:01:13 PM"
        InstallDir="/usr/local/weblogic92/weblogic92"
        JavaHome="/usr/local/jdk1.7.0_80" JavaVersion="1.7.0_80" JavaVendor="Oracle">
        <component name="WebLogic Server" version="9.2.3.0">
          <component name="Server"/>
          <component name="Server Examples"/>
        </component>
        <component name="Workshop for WebLogic Platform" version="9.2.3.0"
          InstallDir="/usr/local/weblogic92/workshop92">
          <component name="Workshop"/>
          <component name="Workshop Examples"/>
        </component>
     </release>
    </product>
  </host>
</bea-product-information>

View the list of patches after successful installation

[cyyun@cyyun bsu]$ sh bsu.sh -prod_dir=/usr/local/weblogic92/weblogic92/ -status=applied -verbose -view  
ProductName:       WebLogic Platform
ProductVersion:    9.2 MP3
Components:        WebLogic Platform/WebLogic Server,WebLogic Platform/Workshop
                    for WebLogic Platform
BEAHome:           /usr/local/weblogic92
ProductHome:       /usr/local/weblogic92/weblogic92
PatchSystemDir:    /usr/local/weblogic92/utils/bsu
PatchDir:          /usr/local/weblogic92/patch_weblogic923
Profile:           Default
DownloadDir:       /usr/local/weblogic92/utils/bsu/cache_dir


Patch ID:          TRS5
PatchContainer:    TRS5.jar
Checksum:          -57595321
Severity:          optional
Category:          Console
CR:                
Restart:           true
Description:       CPUJuly2009 Advisory Fix

4. Uninstall the patch

[cyyun@cyyun bsu]$ sh bsu.sh -prod_dir=/usr/local/weblogic92/weblogic92 -patchlist=TRS5 -verbose -remove

For reference:
Weblogic 10.3.6 patch installation and uninstallation

Tags: Weblogic xml Struts Linux

Posted on Sat, 02 May 2020 11:47:36 -0700 by giannis_athens