Weblogic12.1.3.0補丁安裝(win server與linux安裝步驟介紹)
文章目錄
1 根據oracle官方發佈的漏洞報告下載補丁
2 補丁包上傳解壓到Linux Server
3 補丁包上傳解壓到Windows Server
4 關於OPatch
5 Linux與Windows安裝補丁區別
6 Linux安裝補丁
6.1 Linux單個補丁安裝
6.2 查看已安裝的補丁
6.3 多個補丁安裝
6.4 單個補丁回滾
6.5 多個補丁回滾
6.6 驗證補丁是否應用到Oracle Home
7 重啟weblogic應用服務
8 Windows安裝補丁
文章正文
由oracle官方發佈的漏洞公告,對weblogic進行補丁升級。本文介紹的是weblogic安裝的版本為12.1.3,如果你使用的是其他版本的請根據實際版本來選擇下載,需要使用Generic通用包安裝的weblogic才能進行補丁升級(補丁包下載需要擁有weblogic購買授權才有權限下載)。
1、根據oracle官方發佈的漏洞報告下載補丁
①打開連結地址:https://www.oracle.com/security-alerts/#CriticalPatchUpdates補丁的下載這裏我以2020年1月的補丁包為例,點擊【Critical Patch Update - January 2020】
②找到weblogic對應版本點擊Fusion Middleware按Ctrl+F搜索【oracle weblogic server, versions】,點擊【Fusion Middleware】
會自動跳轉到帳戶登錄界面,帳號登錄Oracle
③跳轉的頁面菜單,點擊【3.3 Oracle Fusion Middleware】
④再選擇【Section 3.3.50 "Oracle WebLogic Server"】
⑤找到WebLogic Server 12.1.3.0 home點擊WLS PATCH SET UPDATE 12.1.3.0.191015 【Patch 30463093】
⑥跳轉的頁面中點擊選擇下載
⑦彈出的窗口上點擊下載【p30463093_121300_Generic.zip】
2、補丁包上傳解壓到Linux Server
將下載的p30463093_121300_Generic.zip補丁包使用weblogic的安裝用戶如oracle上傳到Linux伺服器上的OPatch路徑下,如/home/oracle/Middleware/OPatch
將補丁包解壓到當前目錄下
[oracle@weblogic ~]$ cd /home/oracle/Middleware/OPatch[oracle@weblogic OPatch]$ unzip p30463093_121300_Generic.zip
3、補丁包上傳解壓到Windows Server
將下載的p30463093_121300_Generic.zip補丁包上傳到Windows伺服器上的OPatch路徑下,如D:weblogicmiddlewareOPatch並解壓
4、關於OPatch
OPatch是一個基於java的程序,可以運行在所有支持的作業系統,需要安裝Oracle通用安裝程序(即OUI)。它用於向Oracle軟件應用補丁程序。需要注意的是OUI和OPatch不是單獨安裝的,在安裝Oracle的產品時會安裝OUI和OPatch;如果在安裝的Oracle產品中沒有找到,說明Oracle產品可能是以開發包方式安裝的,即安裝的不是生產環境使用的產品。
查看OPatch幫助
[oracle@weblogic OPatch]$ /home/oracle/Middleware/OPatch/opatch -help
Oracle 中間補丁程序安裝程序版本 13.2.0.0.0
版權所有 (c) 2014, Oracle Corporation。保留所有權利。
Usage: opatch [ -help ] [ -report ] [ command ]
command := apply
checkapplicable
compare
lsinventory
lspatches
napply
nrollback
rollback
query
version
prereq
util
<global_arguments> := -help Displays the help message for the command.
-report Print the actions without executing.
example:
'opatch -help'
'opatch apply -help'
'opatch checkapplicable -help'
'opatch compare -help'
'opatch lsinventory -help'
'opatch lspatches -help'
'opatch napply -help'
'opatch nrollback -help'
'opatch rollback -help'
'opatch prereq -help'
'opatch util -help'
OPatch succeeded.
查看OPatch的版本
[oracle@weblogic ~]$ cd /home/oracle/Middleware/OPatch
[oracle@weblogic OPatch]$ ./opatch version
OPatch Version: 13.2.0.0.0
OPatch succeeded.
5、Linux與Windows安裝補丁區別
本人在這兩種伺服器中安裝補丁的區別就是在linux上安裝時可以不需要關閉伺服器運行的java進程,而在Windows上安裝時需要關閉,否則安裝會報錯。
6、Linux安裝補丁
6.1、單個補丁安裝
(註:安裝過程中,會有一次提示,需要鍵盤輸入y繼續安裝)
[oracle@weblogic OPatch]$ cd 30463093/
[oracle@weblogic 30463093]$ /home/oracle/Middleware/OPatch/opatch apply -jdk $JAVA_HOME
Oracle 中間補丁程序安裝程序版本 13.2.0.0.0
版權所有 (c) 2014, Oracle Corporation。保留所有權利。
Oracle Home : /home/oracle/Middleware
Central Inventory : /home/oracle/oraInventory1
from : /home/oracle/Middleware/oraInst.loc
OPatch version : 13.2.0.0.0
OUI version : 13.2.0.0.0
Log file location : /home/oracle/Middleware/cfgtoollogs/opatch/30463093_Mar_04_2020_16_34_45/apply2020-03-04_16-34-40下午_1.log
OPatch detects the Middleware Home as "/home/oracle/Middleware"
三月 04, 2020 4:34:47 下午 oracle.sysman.oii.oiii.OiiiInstallAreaControl initAreaControl
信息: Install area Control created with access level 0
Applying interim patch '30463093' to OH '/home/oracle/Middleware'
Verifying environment and performing prerequisite checks...
Interim patch 30463093 is a superset of the patch(es) [ 29633448 ] in the Oracle Home
OPatch 將回退補丁程序子集並應用指定的補丁程序。
All checks passed.
請關閉本地系統上在此 ORACLE_HOME 之外運行的 Oracle 實例。
(Oracle 主目錄 = '/home/oracle/Middleware')
本地系統是否已準備打補丁? [y|n]
y
User Responded with: Y
Backing up files...
Rolling back interim patch '29633448' from OH '/home/oracle/Middleware'
正在為組件 oracle.wls.workshop.code.completion.support, 12.1.3.0.0 打補丁...
正在為組件 oracle.wls.workshop.code.completion.support, 12.1.3.0.0 打補丁...
正在為組件 oracle.css.mod, 12.1.3.0.0 打補丁...
正在為組件 oracle.css.mod, 12.1.3.0.0 打補丁...
正在為組件 oracle.fmwconfig.common.shared, 12.1.3.0.0 打補丁...
正在為組件 oracle.fmwconfig.common.shared, 12.1.3.0.0 打補丁...
正在為組件 oracle.wls.common.nodemanager, 12.1.3.0.0 打補丁...
正在為組件 oracle.wls.common.nodemanager, 12.1.3.0.0 打補丁...
正在為組件 oracle.wls.server.shared.with.core.engine, 12.1.3.0.0 打補丁...
正在為組件 oracle.wls.server.shared.with.core.engine, 12.1.3.0.0 打補丁...
正在為組件 oracle.webservices.base, 12.1.3.0.0 打補丁...
正在為組件 oracle.webservices.base, 12.1.3.0.0 打補丁...
正在為組件 oracle.wls.shared.with.cam, 12.1.3.0.0 打補丁...
正在為組件 oracle.wls.shared.with.cam, 12.1.3.0.0 打補丁...
正在為組件 oracle.webservices.orawsdl, 12.1.3.0.0 打補丁...
正在為組件 oracle.webservices.orawsdl, 12.1.3.0.0 打補丁...
正在為組件 oracle.wls.libraries.mod, 12.1.3.0.0 打補丁...
正在為組件 oracle.wls.libraries.mod, 12.1.3.0.0 打補丁...
正在為組件 oracle.wls.admin.console.en, 12.1.3.0.0 打補丁...
正在為組件 oracle.wls.admin.console.en, 12.1.3.0.0 打補丁...
正在為組件 oracle.webservices.wls, 12.1.3.0.0 打補丁...
正在為組件 oracle.webservices.wls, 12.1.3.0.0 打補丁...
正在為組件 oracle.wls.core.app.server, 12.1.3.0.0 打補丁...
正在為組件 oracle.wls.core.app.server, 12.1.3.0.0 打補丁...
正在為組件 oracle.wls.clients, 12.1.3.0.0 打補丁...
正在為組件 oracle.wls.clients, 12.1.3.0.0 打補丁...
正在為組件 oracle.wls.wlsportable.mod, 12.1.3.0.0 打補丁...
正在為組件 oracle.wls.wlsportable.mod, 12.1.3.0.0 打補丁...
正在為組件 oracle.fmwconfig.common.wls.shared, 12.1.3.0.0 打補丁...
正在為組件 oracle.fmwconfig.common.wls.shared, 12.1.3.0.0 打補丁...
正在為組件 oracle.wls.libraries, 12.1.3.0.0 打補丁...
正在為組件 oracle.wls.libraries, 12.1.3.0.0 打補丁...
RollbackSession 從產品清單中刪除中間補丁程序 '29633448'
OPatch 在自動回退後返回到補丁程序 '30463093' 的應用程式。
正在為組件 oracle.wls.workshop.code.completion.support, 12.1.3.0.0 打補丁...
正在為組件 oracle.wls.workshop.code.completion.support, 12.1.3.0.0 打補丁...
正在為組件 oracle.css.mod, 12.1.3.0.0 打補丁...
正在為組件 oracle.css.mod, 12.1.3.0.0 打補丁...
正在為組件 oracle.fmwconfig.common.shared, 12.1.3.0.0 打補丁...
正在為組件 oracle.fmwconfig.common.shared, 12.1.3.0.0 打補丁...
正在為組件 oracle.wls.common.nodemanager, 12.1.3.0.0 打補丁...
正在為組件 oracle.wls.common.nodemanager, 12.1.3.0.0 打補丁...
正在為組件 oracle.wls.server.shared.with.core.engine, 12.1.3.0.0 打補丁...
正在為組件 oracle.wls.server.shared.with.core.engine, 12.1.3.0.0 打補丁...
正在為組件 oracle.webservices.base, 12.1.3.0.0 打補丁...
正在為組件 oracle.webservices.base, 12.1.3.0.0 打補丁...
正在為組件 oracle.webservices.orawsdl, 12.1.3.0.0 打補丁...
正在為組件 oracle.webservices.orawsdl, 12.1.3.0.0 打補丁...
正在為組件 oracle.wls.admin.console.nonen, 12.1.3.0.0 打補丁...
正在為組件 oracle.wls.admin.console.nonen, 12.1.3.0.0 打補丁...
正在為組件 oracle.wls.shared.with.cam, 12.1.3.0.0 打補丁...
正在為組件 oracle.wls.shared.with.cam, 12.1.3.0.0 打補丁...
正在為組件 oracle.wls.libraries.mod, 12.1.3.0.0 打補丁...
正在為組件 oracle.wls.libraries.mod, 12.1.3.0.0 打補丁...
正在為組件 oracle.wls.admin.console.en, 12.1.3.0.0 打補丁...
正在為組件 oracle.wls.admin.console.en, 12.1.3.0.0 打補丁...
正在為組件 oracle.webservices.wls, 12.1.3.0.0 打補丁...
正在為組件 oracle.webservices.wls, 12.1.3.0.0 打補丁...
正在為組件 oracle.wls.core.app.server, 12.1.3.0.0 打補丁...
正在為組件 oracle.wls.core.app.server, 12.1.3.0.0 打補丁...
正在為組件 oracle.wls.clients, 12.1.3.0.0 打補丁...
正在為組件 oracle.wls.clients, 12.1.3.0.0 打補丁...
正在為組件 oracle.wls.wlsportable.mod, 12.1.3.0.0 打補丁...
正在為組件 oracle.wls.wlsportable.mod, 12.1.3.0.0 打補丁...
正在為組件 oracle.fmwconfig.common.wls.shared, 12.1.3.0.0 打補丁...
正在為組件 oracle.fmwconfig.common.wls.shared, 12.1.3.0.0 打補丁...
正在為組件 oracle.wls.libraries, 12.1.3.0.0 打補丁...
正在為組件 oracle.wls.libraries, 12.1.3.0.0 打補丁...
Verifying the update...
Patch 30463093 successfully applied
Log file location: /home/oracle/Middleware/cfgtoollogs/opatch/30463093_Mar_04_2020_16_34_45/apply2020-03-04_16-34-40下午_1.log
OPatch succeeded.
6.2、查看已安裝的補丁
操作指令如下:
[oracle@weblogic 30463093]$ ./opatch lspatches
[oracle@weblogic OPatch]$ ./opatch lspatches
三月 04, 2020 6:05:10 下午 oracle.sysman.oii.oiii.OiiiInstallAreaControl initAreaControl
信息: Install area Control created with access level 0
30463093;WLS PATCH SET UPDATE 12.1.3.0.191015
OPatch succeeded.
6.3、多個補丁安裝
例:/home/oracle/Middleware/OPatch/目錄下有兩個補丁
[oracle@weblogic OPatch]$ pwd
/home/oracle/Middleware/OPatch/
[oracle@weblogic OPatch]$ ll
29633448/
28298916/
[oracle@weblogic OPatch]$ /home/oracle/Middleware/OPatch/opatch napply -id 29633448, 28298916
6.4、單個補丁回滾
操作指令如下:
[oracle@weblogic OPatch]$ pwd
/home/oracle/Middleware/OPatch/
[oracle@weblogic OPatch]$ /home/oracle/Middleware/OPatch/opatch nrollback -id 29633448
6.5、多個補丁回滾
操作指令如下:
[oracle@weblogic OPatch]$ pwd
/home/oracle/Middleware/OPatch/
[oracle@weblogic OPatch]$ /home/oracle/Middleware/OPatch/opatch nrollback -id 29633448, 28298916
6.6、驗證補丁是否應用到Oracle Home
To verify what patches have been applied to an Oracle home, or to find out additional information about the Oracle home, use the opatch lsinventory command.驗證什麼補丁已經應用到Oracle Home,或了解Oracle Home附加的信息,使用opatch lsinventory命令。
[oracle@weblogic OPatch]$ /home/oracle/Middleware/OPatch/opatch lsinventory -jdk $JAVA_HOME
Oracle 中間補丁程序安裝程序版本 13.2.0.0.0
版權所有 (c) 2014, Oracle Corporation。保留所有權利。
Oracle Home : /home/oracle/Middleware
Central Inventory : /home/oracle/oraInventory1
from : /home/oracle/Middleware/oraInst.loc
OPatch version : 13.2.0.0.0
OUI version : 13.2.0.0.0
Log file location : /home/oracle/Middleware/cfgtoollogs/opatch/opatch2020-03-04_16-39-03下午_1.log
OPatch detects the Middleware Home as "/home/oracle/Middleware"
三月 04, 2020 4:39:08 下午 oracle.sysman.oii.oiii.OiiiInstallAreaControl initAreaControl
信息: Install area Control created with access level 0
Lsinventory Output file location : /home/oracle/Middleware/cfgtoollogs/opatch/lsinv/lsinventory2020-03-04_16-39-03下午.txt
--------------------------------------------------------------------------------
中間補丁程序 (1) :
Patch 30463093 : applied on Wed Mar 04 16:38:16 CST 2020
Unique Patch ID: 23094631
Patch description: "WLS PATCH SET UPDATE 12.1.3.0.191015"
Created on 3 Oct 2019, 14:45:59 hrs PST8PDT
Bugs fixed:
24482639, 27829330, 29585355, 27228370, 29750025, 29752735, 25832897
29671344, 28973782, 29957539, 29158881, 18516704, 20446229, 28166339
24931180, 29921455, 24468857, 29356775, 23857587, 30153412, 24705722
29448643, 23071867, 29671623, 29870012, 29726561, 29701537, 29312272
26403575, 29667975, 28891448, 29140540, 29140516, 28998139, 28874066
29140551, 29140549, 26791760, 29140508, 29140555, 28626991, 26353793
28110087, 28313163, 28594324, 26624375, 28409586, 28375173, 28481582
28140800, 28375702, 27988175, 28043040, 17905354, 20020455, 27416586
27417245, 27445260, 27947832, 18412312, 27934864, 27819370, 27234961
25993295, 27948303, 26769768, 26439373, 20952741, 27565682, 26608537
25987400, 26806438, 26885274, 26835012, 26038824, 23304470, 27117282
23049601, 26589850, 26985581, 25750303, 26547016, 27111664, 25205507
26797049, 20952475, 19763916, 22690676, 24618043, 24376591, 25355394
24469063, 24818026, 18854885, 26144830, 19828316, 21270142, 26044754
21241854, 26596622, 22083678, 18746053, 21562338, 22746640, 20047315
19926398, 21549018, 20162146, 20774032, 25917709, 26632886, 26563889
25439226, 25174732, 21748022, 26861216, 18597348, 23342794, 25823774
25695948, 20969389, 25955347, 20432957, 21902034, 24341200, 18387934
21652727, 25720769, 21225816, 20256190, 24837293, 16956849, 21347054
25375968, 25522149, 24533963, 24802574, 19175526, 22586217, 25743025
21562704, 19721047, 24828619, 25743005, 22540656, 20207088, 18485034
26144926, 25118289, 20629733, 20197139, 25534314, 25577947, 24399682
24817968, 23099318, 22383225, 23326877, 22107941, 22759067, 25590885
19170125, 22901740, 19865550, 25192229, 19549507, 20311530, 22950801
19565095, 20430490, 25164167, 19234430, 20193085, 21081720, 25317743
21158132, 25059150, 20671165, 23555480, 20717353, 25497443, 22261241
18974055, 21189073, 20157787, 23733891, 21119215, 20205647, 25029531
22987229, 22749253, 19472793, 17889922, 24305841, 23640078, 20692185
22836462, 23063611, 22860104, 19150684, 24522430, 23732201, 19775778
23223461, 21834255, 23735210, 23103220, 22999996, 22850769, 18438079
22486599, 22900750, 20419243, 22541225, 20739167, 22829635, 23004029
22836557, 20736912, 22910817, 19150123, 21647599, 18144979, 24750930
18806464, 21545042, 20585084, 22249331, 22550116, 20062321, 21603584
21964759, 20226151, 20672949, 23107300, 22097019, 19463153, 19689036
20783846, 22378134, 22599178, 19947189, 23099223, 21836275, 20220959
16815912, 19467894, 20246732, 22574362, 20080046, 21522926, 19986568
20551651, 18123824, 21294990, 21947902, 20907322, 21561271, 22666897
21129379, 20128089, 20720853, 18559995, 19263075, 19425078, 20721340
20087183, 20044804, 14236278, 21083766, 20786128, 22498352, 20758488
22100830, 21039390, 22339918, 22049932, 19477196, 19212729, 21519519
19928803, 19790693, 21516492, 20229977, 22200449, 22200523, 22175246
19703527, 21495475, 22248079, 19879223, 21252292, 18836900, 19883023
20333386, 21615827, 18428696, 17702917, 19874466, 18945422, 19953516
20613957, 21756751, 22247869, 22200594, 17968606, 22200491, 19585666
19668883, 18082758, 19917893, 18722098, 18466848, 19705162, 19973098
20471785, 19500276, 20169972, 19917991, 19422493, 19299358, 18746515
20323632, 20080751, 19351700, 21746415, 19297004, 19001915, 18718889
20798352, 20758863, 17394051, 16562029, 21169554, 18432174, 20266379
20206879, 19080525, 21107126, 19268444, 18729264, 19852007, 20985893
20523619, 21069524, 20814890, 20906638, 18376812, 19936917, 18481239
18727635, 19556868, 18289179, 18964349, 18305935, 19459949, 19066738
19988824, 19265688, 19033547, 19533331, 19576633, 18753794, 19907066
18671042, 18912482, 18922324, 19339238, 17721032, 18538501, 19942900
19730967, 18276961, 19287842, 18589879, 17012341, 19287874, 18691894
18859387, 18968900
--------------------------------------------------------------------------------
OPatch succeeded.
7、重啟weblogic應用服務
8、Windows安裝補丁
步驟一、先關閉java進程服務步驟二、進入D:weblogicmiddlewareOPatch30463093目錄下,執行補丁更新操作,具體操作如下:Ø 在按住鍵盤上的Ctrl與Shift按鍵的同時鼠標右鍵點擊界面空白處,在彈出的窗口中選擇「在此處打開命令窗口」:
執行命令如下(註:安裝過程中,會有一次提示,需要鍵盤輸入y繼續安裝):
D:weblogicmiddlewareOPatchopatch.bat apply -jdk %JAVA_HOME%
步驟三:執行補丁查詢指令,確認已經安裝的補丁信息
指令如下:
D:weblogicmiddlewareOPatchopatch.bat lsinventory -jdk %JAVA_HOME%