Home

NUNU

18 Apr 2020

weblogic 打补丁

1. 根据漏洞报告下载补丁

  1. 去oracle 官网,找到对应版本的补丁。 https://www.oracle.com/security-alerts/cpuapr2020.html
  2. 找到 Oracle Unified Directory, versions 12.2.1.3.0, 12.2.1.4.0 (然后下载 Fusion Middleware
  3. 找到对应的opatch版本。

2. 升级 opatch

optch中 readme 文件清楚的描述的opatch的升级安装方式。

Installation

  1. Install the software with the following command:

    UNIX Only: java -jar /6880880/opatch_generic.jar -silent oracle_home=

    Note: If you have /tmp is set with a noexec flag, you can override the tmp with the -D argument: java opatch_generic.jar -Djava.io.tmpdir=/opt/oracle -jar -silent oracle_home=

    Windows Only: java -jar opatch_generic.jar -J-Doracle.installer.oh_admin_acl=true -silent oracle_home=

where ORACLE_HOME_LOCATION is the absolute path where you have installed FMW/WLS products.

If using a custom Inventory location, install the software with the following command:

java -jar <PATCH_HOME>/6880880/opatch_generic.jar -silent oracle_home=<ORACLE_HOME_LOCATION> -invPtrLoc <INVENTORY_LOCATION>

where INVENTORY_LOCATION is the absolute path to the oraInst.loc file.

  1. To validate the installation:

    cd /OPatch opatch version opatch lspatches

具体操作
java -jar 6880880/opatch_generic.jar -silent oracle_home=/home/test/Oracle/

## 执行完成后会出现
The install operation completed successfully.

Logs successfully copied to /home/test/oraInventory/logs.


3. 安装补丁

cd /home/test/Oracle/OPatch
./opatch apply /home/test/20200418/p30675853_122130_Generic.zip
## 中间会出现几次是否的输入提醒(一路y下去)

补丁安装过程中输出内容。最后出现 OPatch successed. 即为成功。

Oracle Interim Patch Installer version 13.9.4.2.2
Copyright (c) 2020, Oracle Corporation.  All rights reserved.


Oracle Home       : /home/test/Oracle
Central Inventory : /home/test/oraInventory
   from           : /home/test/Oracle/oraInst.loc
OPatch version    : 13.9.4.2.2
OUI version       : 13.9.4.0.0
Log file location : /home/test/Oracle/cfgtoollogs/opatch/opatch2020-04-18_11-29-30AM_1.log


OPatch detects the Middleware Home as "/home/test/Oracle"

Verifying environment and performing prerequisite checks...
OPatch continues with these patches:   30675853  

Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/home/test/Oracle')


Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '30675853' to OH '/home/test/Oracle'
ApplySession: Optional component(s) [ oracle.wls.cam.wlst, 12.2.1.3.0 ] , [ oracle.wls.cam.wlst, 12.2.1.3.0 ] , [ oracle.webservices.wls.jaxrpc, 12.2.1.3.0 ] , [ oracle.webservices.wls.jaxrpc, 12.2.1.3.0 ] , [ oracle.webservices.jrf, 12.2.1.3.0 ] , [ oracle.webservices.jrf, 12.2.1.3.0 ] , [ oracle.fmwconfig.common.wls.shared, 12.2.1.3.0 ] , [ oracle.wls.core.app.server.nativelib, 12.2.1.3.0 ] , [ oracle.jrf.tenancy.se, 12.2.1.3.0 ] , [ oracle.wls.server.examples, 12.2.1.3.0 ] , [ oracle.wls.rdmu, 12.2.1.3.0 ] , [ oracle.legacy_oc4j_xml_schemas, 12.2.1.3.0 ] , [ oracle.wls.server.mt.examples, 12.2.1.3.0 ] , [ oracle.jrf.tenancy.ee, 12.2.1.3.0 ] , [ oracle.jrf.tenancy, 12.2.1.3.0 ]  not present in the Oracle Home or a higher version is found.

Patching component oracle.webservices.orawsdl, 12.2.1.3.0...

Patching component oracle.webservices.orawsdl, 12.2.1.3.0...

Patching component oracle.com.fasterxml.jackson.dataformat.jackson.dataformat.xml, 2.7.9.0.0...

Patching component oracle.com.fasterxml.jackson.dataformat.jackson.dataformat.xml, 2.7.9.0.0...

Patching component oracle.org.bouncycastle, 12.2.1.3.0...

Patching component oracle.org.bouncycastle, 12.2.1.3.0...

Patching component oracle.wls.jrf.tenancy.common.sharedlib, 12.2.1.3.0...

Patching component oracle.wls.jrf.tenancy.common.sharedlib, 12.2.1.3.0...

Patching component oracle.fmwconfig.common.wls.shared.internal, 12.2.1.3.0...

Patching component oracle.com.fasterxml.jackson.jaxrs.jackson.jaxrs.base, 2.7.9.0.0...

Patching component oracle.com.fasterxml.jackson.jaxrs.jackson.jaxrs.base, 2.7.9.0.0...

Patching component oracle.fmwconfig.common.config.shared, 12.2.1.3.0...

Patching component oracle.wls.shared.with.cam, 12.2.1.3.0...

Patching component oracle.wls.shared.with.cam, 12.2.1.3.0...

Patching component oracle.wls.jrf.tenancy.common, 12.2.1.3.0...

Patching component oracle.wls.jrf.tenancy.common, 12.2.1.3.0...

Patching component oracle.wls.evaluation.database, 12.2.1.3.0...

Patching component oracle.wls.evaluation.database, 12.2.1.3.0...

Patching component oracle.wls.core.app.server, 12.2.1.3.0...

Patching component oracle.wls.core.app.server, 12.2.1.3.0...

Patching component oracle.wls.core.app.server, 12.2.1.3.0...

Patching component oracle.webservices.base, 12.2.1.3.0...

Patching component oracle.webservices.base, 12.2.1.3.0...

Patching component oracle.fmw.upgrade.fmwconfig, 12.2.1.3.0...

Patching component oracle.wls.jrf.tenancy.ee.only.sharedlib, 12.2.1.3.0...

Patching component oracle.wls.jrf.tenancy.ee.only.sharedlib, 12.2.1.3.0...

Patching component oracle.wls.rcu, 12.2.1.3.0...

Patching component oracle.wls.rcu, 12.2.1.3.0...

Patching component oracle.wls.security.core.sharedlib, 12.2.1.3.0...

Patching component oracle.wls.security.core.sharedlib, 12.2.1.3.0...

Patching component oracle.wls.security.core.sharedlib, 12.2.1.3.0...

Patching component oracle.webservices.wls, 12.2.1.3.0...

Patching component oracle.webservices.wls, 12.2.1.3.0...

Patching component oracle.webservices.wls, 12.2.1.3.0...

Patching component oracle.commons.fileupload.commons.fileupload, 1.3.2.0.0...

Patching component oracle.commons.fileupload.commons.fileupload, 1.3.2.0.0...

Patching component oracle.com.fasterxml.jackson.jaxrs.jackson.jaxrs.json.provider, 2.7.9.0.0...

Patching component oracle.com.fasterxml.jackson.jaxrs.jackson.jaxrs.json.provider, 2.7.9.0.0...

Patching component oracle.wls.admin.console.en, 12.2.1.3.0...

Patching component oracle.wls.admin.console.en, 12.2.1.3.0...

Patching component oracle.wls.libraries, 12.2.1.3.0...

Patching component oracle.wls.libraries, 12.2.1.3.0...

Patching component oracle.wls.libraries, 12.2.1.3.0...

Patching component oracle.com.fasterxml.jackson.core.jackson.annotations, 2.7.9.0.0...

Patching component oracle.com.fasterxml.jackson.core.jackson.annotations, 2.7.9.0.0...

Patching component oracle.wls.common.cam.wlst, 12.2.1.3.0...

Patching component oracle.wls.common.cam.wlst, 12.2.1.3.0...

Patching component oracle.com.fasterxml.jackson.module.jackson.module.jsonschema, 2.7.9.0.0...

Patching component oracle.com.fasterxml.jackson.module.jackson.module.jsonschema, 2.7.9.0.0...

Patching component oracle.com.fasterxml.jackson.module.jackson.module.jaxb.annotations, 2.7.9.0.0...

Patching component oracle.com.fasterxml.jackson.module.jackson.module.jaxb.annotations, 2.7.9.0.0...

Patching component oracle.com.fasterxml.jackson.core.jackson.databind, 2.7.9.1.0...

Patching component oracle.com.fasterxml.jackson.core.jackson.databind, 2.7.9.1.0...

Patching component oracle.com.fasterxml.jackson.core.jackson.core, 2.7.9.0.0...

Patching component oracle.com.fasterxml.jackson.core.jackson.core, 2.7.9.0.0...

Patching component oracle.wls.security.core, 12.2.1.3.0...

Patching component oracle.wls.wlsportable.mod, 12.2.1.3.0...

Patching component oracle.wls.http.pubsub.server, 12.2.1.3.0...

Patching component oracle.apache.commons.collections.mod, 3.2.0.0.2...

Patching component oracle.wls.common.cam, 12.2.1.3.0...

Patching component oracle.wls.workshop.code.completion.support, 12.2.1.3.0...

Patching component oracle.java.activation, 12.2.1.3.0...

Patching component oracle.apache.commons.lang.mod, 2.6.0.0.2...

Patching component oracle.java.xml.bind, 2.3.0.0.0...

Patching component oracle.java.servlet, 12.2.1.3.0...

Patching component oracle.wls.common.nodemanager, 12.2.1.3.0...

Patching component oracle.wls.shared.with.inst, 12.2.1.3.0...

Patching component oracle.wls.shared.with.coh.standalone, 12.2.1.3.0...

Patching component oracle.jaxb.impl, 2.3.0.0.0...

Patching component oracle.wls.admin.console.nonen, 12.2.1.3.0...

Patching component oracle.wls.clients, 12.2.1.3.0...

Patching component oracle.wls.shared.with.inst.sharedlib, 12.2.1.3.0...

Patching component oracle.wls.thirdparty.javax.json, 12.2.1.3.0...

Patching component oracle.wls.inst.only, 12.2.1.3.0...

Patching component oracle.jaxb.tools, 2.3.0.0.0...

Patching component oracle.jaxb.core, 2.3.0.0.0...

Patching component oracle.diagnostics.common, 12.2.1.3.0...

Patching component oracle.wls.weblogic.sca, 12.2.1.3.0...

Patching component org.codehaus.woodstox, 4.2.0.0.0...

Patching component oracle.wls.core.app.server.tier1nativelib, 12.2.1.3.0...

Patching component oracle.java.jaxws, 12.2.1.3.0...
Patch 30675853 successfully applied.
Log file location: /home/test/Oracle/cfgtoollogs/opatch/opatch2020-04-18_11-29-30AM_1.log

OPatch succeeded.

4. OPatch 其他操作

1. 单个补丁回滚

opatch rollback -id 30675853

2. 验证补丁是否应用到Oracle Home

[test@pnunu OPatch]$ ./opatch lsinventory
Oracle Interim Patch Installer version 13.9.4.2.2
Copyright (c) 2020, Oracle Corporation.  All rights reserved.


Oracle Home       : /home/test/Oracle
Central Inventory : /home/test/oraInventory
   from           : /home/test/Oracle/oraInst.loc
OPatch version    : 13.9.4.2.2
OUI version       : 13.9.4.0.0
Log file location : /home/test/Oracle/cfgtoollogs/opatch/opatch2020-04-18_11-36-45AM_1.log


OPatch detects the Middleware Home as "/home/test/Oracle"

Lsinventory Output file location : /home/test/Oracle/cfgtoollogs/opatch/lsinv/lsinventory2020-04-18_11-36-45AM.txt

--------------------------------------------------------------------------------
Local Machine Information::
Hostname: pnunu
ARU platform id: 226
ARU platform description:: Linux x86-64


Interim patches (5) :

Patch  30675853     : applied on Sat Apr 18 11:32:34 CST 2020
Unique Patch ID:  23274070
Patch description:  "WLS PATCH SET UPDATE 12.2.1.3.0(ID:191217.1425)"
   Created on 18 Dec 2019, 08:58:03 hrs PST8PDT
   Bugs fixed:
     27456095, 29752735, 30088758, 28794044, 29957539, 29585355, 27817138
     26199271, 25830131, 28879029, 26593955, 29913898, 29750025, 28973782
     29356775, 30180712, 24931180, 29643116, 27228370, 29158881, 26877609
     27179313, 29181056, 30153412, 29921455, 28867938, 25369207, 29338121
     29448643, 29312272, 26987594, 27010571, 26075541, 27823500, 27248932
     25294832, 26131085, 27659077, 26403575, 29667975, 28278427, 29726561
     29701537, 29411629, 29789769, 30362086, 30362026, 30067299, 29769772
     29671344, 30342923, 30341541, 26444945, 30576401, 27158972, 30230430
     30568713, 29425867, 28748179, 28984617, 28774974, 28891448, 28874066
     26943614, 28651365, 29140555, 27086845, 29140516, 28895280, 26791760
     29140540, 29140549, 29140508, 29140551, 28550962, 27397287, 28958819
     27033250, 28149607, 28110087, 26267487, 28632521, 26624375, 27213775
     28503638, 28138954, 28103938, 28559579, 28594324, 26353793, 28626991
     28166483, 28313163, 28142116, 28319690, 27912485, 27561226, 27927071
     27469756, 27486993, 28140800, 27928833, 25580220, 28311332, 27988175
     28172380, 28360225, 28171852, 28375173, 28071913, 28409586, 28375702
     27411153, 26502060, 27603087, 27234961, 27187631, 27516977, 27819370
     27617877, 26145911, 26268190, 27693510, 27417245, 27284496, 27947832
     26026959, 26499391, 23076695, 25488428, 26626528, 27445260, 26098043
     27948303, 27934864, 27803728, 26473149, 27272911, 26731253, 27118731
     27131483, 25993295, 25800186, 25987400, 26439373, 26080417, 26929163
     26806438, 25665727, 26608537, 26936500, 27055227, 26144830, 25750303
     26248394, 26589850, 27111664, 26547016, 26828499, 26835012, 27117282
     26985581, 23103220, 25387569

Patch  26355633     : applied on Sat Apr 18 10:56:18 CST 2020
Unique Patch ID:  21447583
Patch description:  "One-off"
   Created on 1 Aug 2017, 21:40:20 hrs UTC
   Bugs fixed:
     26355633

Patch  26287183     : applied on Sat Apr 18 10:56:06 CST 2020
Unique Patch ID:  21447582
Patch description:  "One-off"
   Created on 1 Aug 2017, 21:41:27 hrs UTC
   Bugs fixed:
     26287183

Patch  26261906     : applied on Sat Apr 18 10:55:46 CST 2020
Unique Patch ID:  21344506
Patch description:  "One-off"
   Created on 12 Jun 2017, 23:36:08 hrs UTC
   Bugs fixed:
     25559137, 25232931, 24811916

Patch  26051289     : applied on Sat Apr 18 10:55:41 CST 2020
Unique Patch ID:  21455037
Patch description:  "One-off"
   Created on 31 Jul 2017, 22:11:57 hrs UTC
   Bugs fixed:
     26051289



--------------------------------------------------------------------------------

OPatch succeeded.
[test@pnunu OPatch]$ 

5. 写在最后

weblogic自带的jar与系统本身的jar冲突解决方法

文件名 (weblogic.xml)

<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app
        xmlns="http://xmlns.oracle.com/weblogic/weblogic-web-app"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
        http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd
        http://xmlns.oracle.com/weblogic/weblogic-web-app
        http://xmlns.oracle.com/weblogic/weblogic-web-app/1.2/weblogic-web-app.xsd">
    <container-descriptor>
        <!--<prefer-web-inf-classes>true</prefer-web-inf-classes>-->
        <prefer-application-packages>
            <package-name>com.fasterxml.jackson.*</package-name>
        </prefer-application-packages>
    </container-descriptor>
</weblogic-web-app>

业精于勤,荒于嬉; 行成于思,毁于随。
pnunu at 19:01

Flag Counter