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

关于bsu使用的官方解释:

并且可以参考这篇文档:

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


Oracle Smart Update Applying Patches to Oracle WebLogic Server
Release 3.3.0

Part Number E14143-12

Home

Contents

Contact Us


Previous

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

时间: 2024-09-05 17:08:55

用bsu命令行为weblogic安装或者卸载补丁的相关文章

Linux 中 RPM包 安装 查询 卸载命令小结及yum命令详解_linux shell

之前一直在用ubuntu,安装卸载软件基本上是使用apt-get 这个非常的简单,而且过程中遇到的软件依赖会自动帮我们处理,类似于傻瓜式安装.另外在 Linux 操作系统下,几乎所有的软件都可以通过RPM 进行安装.卸载及管理等操作.RPM 的全称为Redhat Package Manager ,是由Redhat 公司提出的,用于管理Linux 下软件包的软件.Linux 安装时,除了几个核心模块以外,其余几乎所有的模块均通过RPM 完成安装.RPM 有五种操作模式,分别为:安装.卸载.升级.查

Linux平台下DB2 UDB V8.1的安装与卸载

在Linux平台下DB2 UDB V8.1提供了命令行和图形界面两种安装方式,图形界面虽然通过交互简化了安装的复杂性,但安装过程需要人工干预,耗时相对较长,并且在内核较新的Linux版本下还存在无法启动GUI安装界面的问题,虽然可以通过设置环境变量进行解决,还是显得有些麻烦. 当然如果你用命令行方式手动安装就不存在这个问题,不过需要手动完成很多步骤,如果安装或卸载比较频繁的情况下,就不如把整个安装过程写入shell脚本执行方便. 下面是我完成的一个用于安装和卸载的shell脚本,在数据库安装时,

软件包没有被完全安装或卸载问题

前言 对于开源的软件,既然免费使用它后,就要承担免费的午餐带来的后果. 问题 怎么出现的不知道,应该是系统升级后出现的吧. 初期问题 有 7 个软件包没有被完全安装或卸载. 解压缩后会消耗掉 0 B 的额外空间. 您希望继续执行吗?[Y/n] 真实问题 事实上,是由于有些依赖包没有配置吧. 大概有这些: 在处理时有错误发生: grub-pc linux-image-extra-3.5.0-42-generic linux-image-generic linux-generic linux-gen

windows下安装、卸载mysql服务

安装.卸载mysql服务 安装mysql服务 新建并编辑内容如下的一个bat文件,执行之(e:\mysql\bin\mysqld-nt.exe为安装目录,按实际情况填写) @ECHO OFF e:\mysql\bin\mysqld-nt.exe -install net start mysql 卸载mysql服务 新建并编辑内容如下的一个bat文件执行之(e:\mysql\bin\mysqld-nt.exe为安装目录,按实际情况填写) @ECHO OFF net stop mysql c:\my

linux下软件的基本安装和卸载

Linux软件的安装和卸载一直是困扰许多新用户的难题.在Windows中,我们可以使用软件自带的安装卸载程序或在控制面板中的"添加/删除程序"来实现.与其相类似,在Linux下有一个功能强大的软件安装卸载工具,名为RPM.它可以用来建立.安装.查询.更新.卸载软件.该工具是在命令行下使用的.在Shell的提示符后输入rpm,就可获得该命令的帮助信息. 软件的安装 Linux下软件的安装主要有两种不同的形式.第一种安装文件名为xxx.tar.gz:另一种安装文件名为xxx.i386.rp

WSS3SDK之Feature的安装与卸载

Feature安装在 12\Template\Features 目录中,每个Feature为一个子文件夹.在其文件夹的根,有一个 Feature.xml 文件定义了Feature的内容. 注意 当您在Feature目录中通过Windows资源管理器(右击一个文件夹,点新建,然后点文件夹)创建了一个文件夹时,新创建的文件夹并不会继承权限.如果您将一个Feature部署到该文件夹中,则在一些WSS页面中(比如网站设置或列表视图)将出现异常.您可以通过右击该新文件夹,点属性,点安全,然后点高级,在权限

Linux系统下RPM软件包的安装及卸载

  在 Linux 操作系统下,几乎所有的软件均通过RPM 进行安装.卸载及管理等操作.RPM 的全称为Redhat Package Manager ,是由Redhat 公司提出的,用于管理Linux 下软件包的软件.Linux 安装时,除了几个核心模块以外,其余几乎所有的模块均通过RPM 完成安装.RPM 有五种操作模式,分别为:安装.卸载.升级.查询和验证. RPM 安装操作 命令: rpm -i 需要安装的包文件名 举例如下: rpm -i example.rpm 安装 example.r

完全指南之在 Ubuntu 操作系统中安装及卸载软件

当你从 Windows 系统转向 Linux 系统的时候,刚开始的体验绝对是非比寻常的.在 Ubuntu 系统下就连最基本的事情,比如安装个应用程序都会让(刚从 Windows 世界来的)人感到无比困惑. 但是你也不用太担心.因为 Linux 系统提供了各种各样的方法来完成同样的任务,刚开始你感到困惑那也是正常的.你并不孤单,我们大家都是这么经历过来的. 在这篇初学者指南中,我将会教大家在 Ubuntu 系统里如何以最常用的方式来安装软件,以及如何卸载之前已安装的软件. 关于在 Ubuntu 上

【转】linux下软件的安装与卸载

一 软件安装包的类型 通常Linux应用软件的安装有五种:    1) tar+ gz包,如software-1.2.3-1.tar.gz.他是使用UNIX系统的打包工具tar打包的.    2) rpm包,如software-1.2.3-1.i386.rpm.他是Redhat Linux提供的一种包封装格式(www.rpmfind.net).    3) dpkg(deb)包,如software-1.2.3-1.deb.他是Debain(ubuntu) Linux提供的一种包封装格式.   4