使用bsu安装升级weblogic补丁

  • 1.下载补丁包
  • 2.查看weblogic当前补丁列表
  • 3.安装补丁
  • 4.卸载补丁

新版本的weblogic升级补丁使用的是OPatch,旧版本weblogic升级补丁需要使用bsu.sh

1.下载补丁包

根据绿盟扫描的漏洞报告解决方法中的链接地址找到补丁包,以下补丁是根据weblogic9.2 MP3版本扫描出来的

①将下载的p8178785_922_Generic.zip、p8602044_923_Generic.zip补丁包上传到Linux系统

②解压补丁包

[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 

解压出来的jar名就是Patch ID,是后面安装的参数。

③将解压后的T522.jar和TRS5.jar包移动到weblogic安装目录/utils/bsu/cache_dir/下,如没有cache_dir文件夹则新建目录

[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/

④将其中一个解压后文件夹内的patch-catalog_15563.xml文件移动到weblogic安装目录/utils/bsu/cache_dir/下,并重命名为patch-catalog.xml

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

2.查看weblogic当前补丁列表

[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.安装补丁

安装前需要停止weblogic服务,并确认无相关进程。

-patchlist=TRS5中TRS5即是解压后的jar包名

[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

安装另一个补丁

[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.

经查看T522对应的weblogic版本是9.2.2.0,TRS5对应的weblogic版本是9.2.3.0

查看安装的weblogic版本发现是,因此T522补丁包在当前安装的weblogic产品上安装不了。

[cyyun@cyyun ~]$ cd /usr/local/weblogic92/
[cyyun@cyyun weblogic92]$ cat registry.xml 

<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>

查看安装成功后的补丁列表

[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.卸载补丁

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

本文参考:
weblogic10.3.6补丁安装及卸载

你可能感兴趣的:(Linux)