19 C
Texas
Melhttp://www.osradar.com
Guru Unix /Linux and GNU supporter

How to patch Weblogic server

To patch Weblogic you need support account on Oracle site, and patching is very important to ensure the stability and Security of your Weblogic server . me explain to you how to install Patch on weblogic using opatch tool .

!- Download Patch from Oracle Server

access support site and find latest securoyt and bug fixed and download it to some location on your Linux Server. In my case i will show you to install this path P30970477 on Weblogic server 12.2.1.4

Stop

2-Shut down WebLogic, Nodemanager and Managed Server.

- Advertisement -

In my case i have all processes on systemd.

systemctl stop wls-managed.service nodemanager.service admin.service

Check everyting is down using:


ps -ef|grep -i NODE
ps -ef|grep -i ADMIN
ps -ef|grep -i JAVA

Kill any porcess related to weblogic.

3-Backup existing Weblogic Installation

Its high recommended to back up your installation Directory to roll back later if the installation patch failed or corrupted.

4-Unzip the Patch file

Please go to the downloaded file and unzip it

 soft_install]$ unzip p30970477_122140_Generic.zip
Archive:  p30970477_122140_Generic.zip
   creating: 30970477/
   creating: 30970477/etc/
   creating: 30970477/etc/config/
  inflating: 30970477/etc/config/inventory.xml
  inflating: 30970477/etc/config/patchdeploy.xml
  inflating: 30970477/etc/config/actions.xml
  inflating: 30970477/README.html
   creating: 30970477/files/
   creating: 30970477/files/oracle.wls.libraries/
   creating: 30970477/files/oracle.wls.libraries/12.2.1.4.0/
   creating: 30970477/files/oracle.wls.libraries/12.2.1.4.0/wls.server.symbol/
   creating: 30970477/files/oracle.wls.libraries/12.2.1.4.0/wls.server.symbol/server/
   creating: 30970477/files/oracle.wls.libraries/12.2.1.4.0/wls.server.symbol/server/lib/
   creating: 30970477/files/oracle.wls.libraries/12.2.1.4.0/wls.server.symbol/server/lib/wls-api-part.jar/
   creating: 30970477/files/oracle.wls.libraries/12.2.1.4.0/wls.server.symbol/server/lib/wls-api-part.jar/weblogic/
   creating: 30970477/files/oracle.wls.libraries/12.2.1.4.0/wls.server.symbol/server/lib/wls-api-part.jar/weblogic/management/
   creating: 30970477/files/oracle.wls.libraries/12.2.1.4.0/wls.server.symbol/server/lib/wls-api-part.jar/weblogic/management/configuration/
  inflating: 30970477/files/oracle.wls.libraries/12.2.1.4.0/wls.server.symbol/server/lib/wls-api-part.jar/weblogic/management/configuration/RestfulManagementServicesMBean.class
   creating: 30970477/files/oracle.wls.libraries/12.2.1.4.0/wls.server.symbol/server/lib/wls-api-part.jar/weblogic/security/
   creating: 30970477/files/oracle.wls.libraries/12.2.1.4.0/wls.server.symbol/server/lib/wls-api-part.jar/weblogic/security/net/
  inflating: 30970477/files/oracle.wls.libraries/12.2.1.4.0/wls.server.symbol/server/lib/wls-api-part.jar/weblogic/security/net/ConnectionFilterImpl.class
   creating: 30970477/files/oracle.wls.libraries/12.2.1.4.0/wls.server.symbol/modules/

5-Check opatch version.

First thing define the Oralce_home where ur weblogic installed and add opatch to your path


[weblogic@server]$ export ORACLE_HOME=/app/weblogic/Oracle/Middleware
[weblogic@server]$ export PATH=$ORACLE_HOME/OPatch:$PATH

$ORACLE_HOME/OPatch/opatch version

6- Run the patch

Change directory the extracted file patch and run the patch

[weblogic@server1 30970477]$ $ORACLE_HOME/OPatch/opatch  apply
Oracle Interim Patch Installer version 13.9.4.2.1
Copyright (c) 2020, Oracle Corporation.  All rights reserved.


Oracle Home       : /app/weblogic/Oracle/Middleware
Central Inventory : /app/Oracle/oraInventory
   from           : /app/weblogic/Oracle/Middleware/oraInst.loc
OPatch version    : 13.9.4.2.1
OUI version       : 13.9.4.0.0
Log file location : /app/weblogic/Oracle/Middleware/cfgtoollogs/opatch/opatch2020-06-08_15-54-36PM_1.log


OPatch detects the Middleware Home as "/app/weblogic/Oracle/Middleware"

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

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 = '/app/weblogic/Oracle/Middleware')


Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '30970477' to OH '/app/weblogic/Oracle/Middleware'
ApplySession: Optional component(s) [ oracle.fmwconfig.common.wls.shared, 12.2.1.4.0 ] , [ oracle.webservices.wls.jaxrpc, 12.2.1.4.0 ]  not present in

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

Patching component oracle.webservices.wls, 12.2.1.4.0...

Patching component oracle.wls.libraries, 12.2.1.4.0...

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

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

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

Patching component oracle.webservices.base, 12.2.1.4.0...

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

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

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

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

Patching component oracle.wls.core.app.server, 12.2.1.4.0...
Patch 30970477 successfully applied.
Log file location: /app/weblogic/Oracle/Middleware/cfgtoollogs/opatch/opatch2020-06-08_15-54-36PM_1.log

OPatch succeeded.

7-Check your Installed Patch / or Patches

opatch Command options

/app/weblogic/Oracle/Middleware/OPatch/opatch   -help
Oracle Interim Patch Installer version 13.9.4.2.1
Copyright (c) 2020, Oracle Corporation.  All rights reserved.


 Usage: opatch [ -help ] [ -report ] [ command ]

            command := apply
                       checkapplicable
                       compare
                       lsinventory
                       lspatches
                       napply
                       nrollback
                       rollback
                       query
                       version
                       prereq
                       util

List Installed Pathes

Do it like This:

$ORACLE_HOME/OPatch/opatch lsinv

The results

weblogic@server1~]$ /app/weblogic/Oracle/Middleware/OPatch/opatch    lsinv
Oracle Interim Patch Installer version 13.9.4.2.1
Copyright (c) 2020, Oracle Corporation.  All rights reserved.


Oracle Home       : /app/weblogic/Oracle/Middleware
Central Inventory : /app/Oracle/oraInventory
   from           : /app/weblogic/Oracle/Middleware/oraInst.loc
OPatch version    : 13.9.4.2.1
OUI version       : 13.9.4.0.0
Log file location : /app/weblogic/Oracle/Middleware/cfgtoollogs/opatch/opatch2020-06-10_14-18-13PM_1.log


OPatch detects the Middleware Home as "/app/weblogic/Oracle/Middleware"

Lsinventory Output file location : /app/weblogic/Oracle/Middleware/cfgtoollogs/opatch/lsinv/lsinventory2020-06-10_14-18-13PM.txt

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


Interim patches (2) :

Patch  30761841     : applied on Tue Jun 09 16:19:50 CEST 2020
Unique Patch ID:  23320452
Patch description:  "One-off"
   Created on 11 Jan 2020, 04:49:19 hrs PST8PDT
   Bugs fixed:
     30468443

Patch  30970477     : applied on Mon Jun 08 15:57:33 CEST 2020
Unique Patch ID:  23416256
Patch description:  "WLS PATCH SET UPDATE 12.2.1.4.200228"
   Created on 28 Feb 2020, 17:33:54 hrs PST8PDT
   Bugs fixed:
     26444945, 29247835, 29671344, 29769772, 30067299, 30068341, 30153412
     30230430, 30341541, 30342923, 30362026, 30362086, 30459026, 30558254
     30563848, 30589563, 30624882, 30633620, 30734182, 30740009, 30801769
     30814590, 30837932, 30885217, 30885237, 30729141



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

OPatch succeeded.

Restart your Server and enjoy

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

LEAVE A REPLY

Please enter your comment!
Please enter your name here



Latest article