用bsu命令行为weblogic安装或者卸载补丁

简介: 关于bsu使用的官方解释:并且可以参考这篇文档:Oracle WebLogicServer PSU(补丁集更新)公告 (文档 ID 1600822.1)Oracle® Smart Update Applying Patches to Oracle WebLogic ServerRelease 3.

关于bsu使用的官方解释:

并且可以参考这篇文档:

Oracle WebLogicServer PSU(补丁集更新)公告 (文档 ID 1600822.1)


Oracle® Smart Update Applying Patches to Oracle WebLogic Server
Release 3.3.0

Part Number E14143-12
Go to Documentation Home
Home
Go to Table of Contents
Contents
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

8 Using the Command-Line Interface

This section describes the Smart Update bsu command, which you can use to apply patches, interactively or through a script, that have been downloaded into a patch download directory. When you use bsu commands in a script, you can create a mechanism for replicating a specific maintenance level of a product that is installed on multiple systems. This capability is especially valuable in production environments, in which the distribution of software updates to systems must be implemented in a controlled, reliable, and reproducible manner.

The following topics are included:

  • About the bsu Command

  • bsu Command Reference

  • Command-Line Interface Examples

About the bsu Command

When using the bsu command, either interactively or through a script, note that this command:

  • Runs the bsu script (bsu.cmd on Windows systems, bsu.sh on UNIX systems) that is located in the MW_HOME\utils\bsu directory. When running the bsu command, first change to this directory on the system from which you are running it.

  • Can be executed from a command file (on Windows) or shell script (on UNIX).

  • Contains the subset of Smart Update functionality that enables you to:

    • Apply and remove patches that are located in an accessible patch download directory

    • View patches that are in the download directory, applied to a product installation on the current system, or applied to a specific patch profile for the current system

    • Generate reports listing the patches applied to a product installation

    The bsu command can also invoke the Smart Update graphical interface and send messages to a log file.

  • Can apply patches to, or view patches on, only those products installed from the system on which this command is run, as follows:

    • If the current system contains a product that was installed by a different system, you cannot apply patches to that installation or view them.

    • If the current system was used to install a product located on a remote-mounted disk drive, you can use the bsu command with that installation.

    Therefore, the restrictions regarding the specific product installations that can be maintained through the bsu command is the same as for Smart Update's graphical interface.

  • Cannot be used for the following:

    • Creating custom patch profiles

    • Locating start scripts to modify

    These capabilities are available only from Smart Update's graphical interface.

    Note:

    If you run the Smart Update command-line interface simultaneously with the graphical interface, changes you make to patch profiles through the command-line interface are not visible from the graphical interface when you refresh the view of those patch profiles.

bsu Command Reference

This section describes the bsu command syntax. Square brackets appearing with a parameter argument indicate that the argument is optional.

The bsu command has the parameters and arguments listed and described in Table 8-1.

Note:

In Table 8-1, the square brackets, [..], represent arguments that are optional. For example, [-profile=profile_name] is an optional argument for the -install parameter

Table 8-1 bsu Command Parameters and Arguments

Parameter Description Arguments

-help

Displays a summary of bsu parameters and arguments

None.

-install

Applies specified patches to the target installation. You must specify a valid profile name.

[-patchlist=patch1[,patch2,patch3]

Specifies the identifier of each patch to be applied, represented as patch1patch2, and patch3.

[-profile=profile_name]Specifies the patch profile to which the patches are to be applied, represented asprofile_name.See the note at the end of the table.[-patch_download_dir=path]Specifies the patch download directory from which the patches are to be applied, represented as path. If you do not specify a patch download directory, the patch download directory designated in the Preference dialog box in the Smart Update graphical interface is used by default. (If none is designated in the Preference dialog box, MW_HOME\utils\bsu\cache_dir is used.)[-verbose]Displays the full set of details associated with each patch applied.[-prod_dir=path]Specifies the target installation to which the patches are to be applied, represented as path. For example, MW_HOME\wlserver_10.3 for WebLogic Server and Portal.

-gui

Starts the Smart Update graphical interface.

None.

-log

Creates a file, in the specified location, in which the correspondingbsu command logging information is to be sent.

Note: The -log parameter logs only bsu command activity, and not activity related to patches or profiles.

=path

Specifies the file name and location of the log file to be created, represented as path.

[-log_priority= {trace|debug|info|warn|error|fatal}]

Specifies the priority of log information to be captured. The default priority is debug.

-remove

Removes specified patches from the profile.

[-patchlist=patch1[,patch2,patch3]

Specifies the identifier of each patch to be applied, represented as patch1[,patch2, and patch3.[-profile=profile_name]Specifies the patch profile from which the patches are to be removed, represented asprofile_name. See the note at the end of the table.[-prod_dir=path]Specifies the target installation from which the patches are to be removed, represented as path.[-verbose]Displays the full set of details associated with each patch applied.

-report

Generates a report showing the applied patches and associated file changes in a Middleware home directory.

-BEA_HOME=path

Specifies the target installation where the patches are applied, represented as path. If no path is specified, this option generates report for all product installations. Specify the appropriate Middleware home directory.[-product_mask=regexp]Limits the report to the matching product(s), represented by the regular expression regexp.

Note: The regular expression is used to delimit multiple arguments. For example, -product_mask=WebLogic.* filters all products starting with WebLogic.[-release_mask=regexp]Limits the report to the matching product release(s), represented by the regular expression regexp.[-profile_mask=regexp]Limits the report to the matching patch profile(s), represented by the regular expression regexp.[-patch_id_mask=regexp]Limits the report to the matching patch(es), represented by the regular expression regexp.[-output_format=text|xml]Specifies the format of the report. Options available are text and xml. Default: text.[-output_file=path]Specifies the directory where the report is saved, represented as path. If no path is specified for the report output, stdout is used.

-version

Displays version information.

For example:

Oracle Smart Update. Version: 3.3.3.0

None.

-view

Displays the identifiers of patches that are either applied or in the patch download directory

[-profile=profile_name]

Displays identifiers of patches applied to the profile represented as profile_name. If you do not specify this argument, the default patch profile is used by default.

See the note at the end of the table.[-patch_download_dir=path]Displays the identifiers of patches that have been downloaded into the patch download directory represented as path. If you do not specify a patch download directory, the patch download directory designated in the Preference dialog box is used by default. (If none is designated in the Preference dialog box, MW_HOME\utils\bsu\cache_dir is used.)[-status={applied|downloaded}Displays the current status of the patches viewed. If you specify applied for this argument, bsu displays identifiers of patches that have been applied to the target installation. Use this argument, with -profile, to create a maintenance snapshot for the specific profile. If you specify downloadedbsu displays identifiers of patches in the download directory but not yet applied

.[-verbose]Displays the full set of details associated with each patch displayed.-prod_dir=path

Displays the identifiers of patches applied to the target installation in the location represented as path.


Note:

If profile is not specified, the Default profile is used.

If the profile argument is used and an invalid profile is specified, it is not set to default; it displays the error:

$ bsu -view -status=applied -prod_dir=C:/10_WLP/wlserver_version-profile=profile3
The specified profile could not be found.[profile_name] 

Command-Line Interface Examples

This section includes the following bsu command examples:

  • Installation Example

  • View Patches Example

  • Another View Patches Example

  • Display Maintenance Snapshot

  • Report of Applied Patches

Installation Example

The following command installs the patch IRZ2 from the patch download directory that has been established for the current system:

bsu -prod_dir=c:\Oracle\Middleware\wlserver_10.3 -patchlist=IRZ2 -verbose -install

When executed, the preceding command displays the following output showing that the patch was successfully applied:

Checking for conflicts.
No conflict(s) detected

Starting installation of Patch ID: IRZ2
Installing C:\Oracle\Middleware\download-dir\IRZ2.jar
Result: Success

View Patches Example

The following command displays a list of patches that exist in the patch download directory, c:\patchdir:

bsu -view -status=downloaded -prod_dir=C:\Oracle\Middleware\wlserver_10.3
 -patch_download_dir=C:\patchdir

When executed, the preceding command generates a display similar to the following:

C:\Oracle\Middleware\utils\bsu>bsu -view -status=downloaded
 -prod_dir=C:\Oracle\Middleware\wlserver_10.3 –patch_download_dir=C:\patchdir
ProductName:     WebLogic Platform
ProductVersion:  10.3
Components:      WebLogic Platform/WebLogic Server,WebLogic Platform/Workshop
for WebLogic Platform,WebLogic Platform/WebLogic Portal
BEA_HOME:         C:\Oracle\Middleware
ProductHome:     C:\Oracle\Middleware\wlserver_10.3
PatchSystemDir:  C:\Oracle\Middleware\utils\bsu
PatchDir:    C:\Oracle\Middleware\patch_wls_1032
Profile:         Default
DownloadDir:     C:\patchdir
JavaHome:        C:\Oracle\Middleware\jrockit160_14_R27.6.5-32
JavaVersion:     160_14_R27.6.5-32
JavaVendor:      ORACLE
Patch ID:        9A5T (10131320)
Patch ID:        585H (10201173)
Patch ID:        8LU6 (10106400)
Patch ID:        AFJ5 (10111681)
Patch ID:        Q8K5 (10085296)

Another View Patches Example

The following command displays the set of patches for a target installation that have been downloaded to the system's designated patch download directory:

bsu -view -prod_dir=C:\Oracle\Middleware\wlserver_10.3 -status=downloaded -verbose 

When executed, the preceding command generates a display similar to the following:

ProductName:       WebLogic Platform
ProductVersion:    10.3
Components:        WebLogic Server/Server,WebLogic Server/Server Examples,
AquaLogic Service Bus/Service Bus
BEA_HOME:           C:\Oracle\Middleware
ProductHome:       C:\Oracle\Middleware\wlserver_10.3
DownloadDir:       C:\Oracle\Middleware\download-dir
JavaHome:        C:\Oracle\Middleware\jrockit160_14_R27.6.5-32
JavaVersion:     160_14_R27.6.5-32
JavaVendor:        ORACLE
Patch ID:          FZN2
PatchContainer:    FZN2.jar
Checksum:          -174938558
Component:         WebLogic Server
Severity:          critical
Category:          Security
CR:                CRxxyyzz
Restart:           false
Description:       ATN fix for xxxx
Patch ID:          GWQR
PatchContainer:    GWQR.jar
Checksum:          1170817068
Component:         AquaLogic Service Bus
Severity:          optional
Category:          Multiple
CR:                CRxxyyzz
Restart:           true
Description:       One more ALSB patch

Display Maintenance Snapshot

The following command displays a maintenance snapshot of the default patch profile:

bsu -view -status=applied -prod_dir=c:\BEA\wlserver_10.0

When executed, the preceding command generates a display similar to the following:

C:\Oracle\Middleware\utils\bsu>bsu -view -status=applied
 -prod_dir=C:\Oracle\Middleware\wlserver_10.0
ProductName:       WebLogic Server
ProductVersion:    10.0
Components:        WebLogic Server/Server,WebLogic Server/Server Examples,
WebLogic Server/Server
BEA_HOME:   C:\Oracle\Middleware
ProductHome:       C:\Oracle\Middleware\wlserver_10.0
PatchSystemDir:    C:\Oracle\Middleware\utils\bsu
PatchDir:          C:\Oracle\Middleware\patch_wls1000
Profile:           Default
DownloadDir:       C:\Oracle\Middleware\utils\bsu\cache_dir
JavaHome:          c:\Oracle\Middleware\jdk150_06
JavaVersion:       1.5.0_06
JavaVendor:        Sun
Patch ID:          PBLW (CR838734)

ProductName:       WebLogic Portal
ProductVersion:    10.0
Components:        WebLogic Portal/Portal Server,WebLogic Portal/WebLogic Works
                  WebLogic Portal/Portal Examples
BEA_HOME:   C:\Oracle\Middleware
ProductHome:       C:\Oracle\Middleware\wlserver_10.0
PatchSystemDir:    C:\Oracle\Middleware\utils\bsu
PatchDir:          C:\Oracle\Middleware\patch_wlp1000
Profile:           Default
DownloadDir:       C:\Oracle\Middleware\utils\bsu\cache_dir
Patch ID:          FJTH (CR861234)

C:\Oracle\Middleware\utils\bsu>
C:\Oracle\Middleware\utils\bsu>bsu -view -status=applied -prod_dir=C:\10_WLP_0
320\workshop_10.0
ProductName:       Workshop for WebLogic
ProductVersion:    10.0
Components:        Workshop for WebLogic Platform/Workshop,Workshop for WebLogic Platform/Workshop Examples
BEA_HOME:          C:\Oracle\Middleware
ProductHome:       C:\Oracle\Middleware\workshop_10.0
PatchSystemDir:    C:\Oracle\Middleware\utils\bsu
PatchDir:          C:\Oracle\Middleware\patch_wlw1000
Profile:           Default
DownloadDir:       C:\Oracle\Middleware\utils\bsu\cache_dir
Patch ID:          8K9T (CR873456)

Report of Applied Patches

The following command generates a report of patches applied to an MW_HOME, where the first character of the patch IDs is "6":

bsu -report -patch_id_mask=6.*

When executed, the preceding command generates a display similar to the following:

Patch Report
============
Report Info
Report Option
BEA_HOME ### OPTION NOT SET
product_mask.. ### OPTION NOT SET
release_mask.. ### OPTION NOT SET
profile_mask.. ### OPTION NOT SET
patch_id_mask. 6.*
Report Messages
BEA_HOME D:\Platform92\BEA_HOME
Product Description
Product Name.. WebLogic Platform
Product Version.. 9.2.0.0
Installed Components WebLogic Server, Workshop for WebLogic Platform,
 WebLogic Integration, WebLogic Portal
Product Install Directory. D:\Platform92\BEA_HOME\weblogic92
Java Home.. D:\Platform92\BEA_HOME\jrockit90_150_04
Jave Vendor BEA
Java Version.. 1.5.0_04
Patch Directory.. D:\Platform92\BEA_HOME\patch_weblogic920

Profile. Default

Patch ID 6L1H
CR(s) CR285988
Description Fix P13N processing of Platform Domain Upgrade.
  Intended for use with WLI 9.2
Classpath
Classpath type SYSTEM
Classpath control jar.. weblogic_patch.jar
Jar.. CR285988_920.jar
File.com/BEA/p13n/upgrade/LibraryModuleConfigProcessor.class
File. com/BEA/p13n/upgrade/P13nDatabasePlugIn.class
File. resources/p13n-upgrade.xml
File. resources/P13nCommonPlugIn-definition.xml
File. resources/portal-upgrade.xml
File. META-INF/MANIFEST.MF

Patch ID 6MK8
CR(s) CR262488
Description Allow WLI Domains to be upgraded by Domain Upgrade Wizard
Classpath
Classpath type SYSTEM
Classpath control jar.. weblogic_patch.jar
Jar.. CR262488_920.jar
File.weblogic/upgrade/domain/directoryselection/DomainDirectorySelectionPlugIn.class
File.weblogic/upgrade/domain/directoryselection/i18n_DomainDirectorySelectionPlugIn.properties
File. META-INF/MANIFEST.MF



2、删除补丁实例:

背景:需要安装weblogic 10.3.6.0.7PSU,但是检查到补丁冲突


[appl02@vs150 bsu]$ bsu.sh \ -prod_dir=/u01/test2/app/fs1/FMW_Home/wlserver_10.3 \ -patchlist=FCX7 -verbose -install
Checking for conflicts...
Conflict(s) detected - resolve conflict condition and execute patch installation again
Conflict condition details follow:
Patch FCX7 is mutually exclusive and cannot coexist with patch(es): LL4G,YIJF,D33T,VFS8

需要先卸载以上4个补丁:

[appl02@vs150 bsu]$ bsu.sh \ -prod_dir=/u01/test2/app/fs1/FMW_Home/wlserver_10.3 \ -patchlist=LL4G -verbose -remove
Checking for conflicts...
No conflict(s) detected

Starting removal of Patch ID: LL4G
Removing /u01/test2/app/fs1/FMW_Home/patch_wls1036/patch_jars/BUG13572948_1036.jar
Updating /u01/test2/app/fs1/FMW_Home/patch_wls1036/profiles/default/sys_manifest_classpath/weblogic_patch.jar
Old manifest value: Class-Path= ../../../patch_jars/AppsAdapter.jar ../../../patch_jars/bpm-infra.jar ../../../patch_jars/DBAdapter.jar ../../../patch_jars/dbws.jar ../../../patch_jars/jca-binding-api.jar ../../../patch_jars/BUG13729611_103604.jar ../../../patch_jars/BUG16083651_1036.jar ../../../patch_jars/com.bea.core.stax2_2.0.0.0_3-0-3.jar ../../../patch_jars/BUG14597598_1036.jar ../../../patch_jars/BUG13572948_1036.jar ../../../patch_jars/com.bea.core.management.core_2.9.0.1.jar ../../../patch_jars/BUG14272383_1036.jar ../../../patch_jars/BUG13845626_1036.jar
New manifest value: Class-Path= ../../../patch_jars/AppsAdapter.jar ../../../patch_jars/bpm-infra.jar ../../../patch_jars/DBAdapter.jar ../../../patch_jars/dbws.jar ../../../patch_jars/jca-binding-api.jar ../../../patch_jars/BUG13729611_103604.jar ../../../patch_jars/BUG16083651_1036.jar ../../../patch_jars/com.bea.core.stax2_2.0.0.0_3-0-3.jar ../../../patch_jars/BUG14597598_1036.jar ../../../patch_jars/BUG13572948_1036.jar ../../../patch_jars/com.bea.core.management.core_2.9.0.1.jar ../../../patch_jars/BUG14272383_1036.jar ../../../patch_jars/BUG13845626_1036.jar
Result: Success













相关文章
|
3月前
|
Java 应用服务中间件 Linux
centos7安装weblogic
centos7安装weblogic
|
负载均衡 Java 应用服务中间件
Weblogic的了解、安装及其使用(三)
Weblogic的了解、安装及其使用
1334 0
|
Oracle Java 关系型数据库
Weblogic的了解、安装及其使用(二)
Weblogic的了解、安装及其使用
983 0
|
开发框架 Kubernetes 监控
Weblogic的了解、安装及其使用(一)
Weblogic的了解、安装及其使用
2356 0
|
安全 Oracle Java
Oracle Weblogic--CentOS Linux 8.5.2安装weblogic11G
Weblogic在centos上详细安装步骤及安装过程中可能遇到的问题
335 0
Oracle Weblogic--CentOS Linux 8.5.2安装weblogic11G
|
Oracle 关系型数据库 Java
EOS Platform 7.2下安装weblogic插件
在实际工作中,需要用到EOS Platform,这是一个基于Eclipse的开发工具,自带了Tomcat,可以满足大部分需要,但是有时候需要使用Weblogic,这就得手动安装Weblogic插件了。这个过程与Eclipse相同(Eclipse下安装weblogic插件),本文中在EOS Platform 7.2中安装Weblogic插件。
191 0
EOS Platform 7.2下安装weblogic插件
|
Oracle 关系型数据库 Java
Eclipse下安装weblogic插件
安装好weblogic dev版本(Windows下安装weblogic dev版本),可以在Eclipse中安装weblogic server tools插件,直接连接到weblogic server,发布、部署、调试都变得简单些。
685 0
Eclipse下安装weblogic插件
|
Oracle 关系型数据库 Java
Windows下安装weblogic dev版本
在开发过程中,有一种情况是比较尴尬的:需要用到某个软件,但是只需要用到这个软件中的一小部分功能,这样既浪费的磁盘空间,又浪费了CPU空间。比如Weblogic,完整版包括很多功能,但是开发过程中,只是需要创建数据源、部署项目,然后进行测试即可。所以开发过程中,需要一款简化的Weblogic(Weblogic开发版)是挺有必要的(如果电脑配置比较壕,也可以任性的使用完整版)。
330 0
Windows下安装weblogic dev版本
|
XML SQL 开发框架
Weblogic安装与配置详解
Weblogic安装与配置用Eclipse MyEclipse WebLogic8.1开发第一个Web程序1.安装jreEclipse虽然由java开发,但本身并不自带jre。所以你必须先自己安装,去http://java.sun.com/downloads下载最新J2SE1.4.2_03的jre安装文件j2re-1_4_2_03-windows-i586-p.exe。安装成功后,重启机器,并将jre的bin文件夹路径添加到系统环境变量PATH中,如:C:\Program Files\Java\j2re1.4.2_03\bin。
446 0
|
Java Linux 应用服务中间件
Linux安装weblogic服务
Linux安装weblogic服务 一、环境准备: Linux系统 jdk-7u75-linux-x64.tar.gz(http://pan.baidu.com/s/1kTh5Vx1) wls1212_dev.zip(http://pan.baidu.com/s/1nttDkq1) 二、安装步骤: 1、首先创建weblogic用户、用户组并设置主目录 [root@localhost ~]# useradd -d /weblogic weblogic [root@localhost ~]# passwd weblogic 更改用户 weblogic 的密码。
2829 0