Translate

[WebLogic] 웹로직 Patch 설치/제거/확인 방법 (BSU 이용)










BSU(BEA Smart Update)를 통해 웹로직 패치하는 방법은 아래와 같다.

 - 패치 파일은 p{patch_number}_{version}_Generic.zip 형식으로 되어있는데 개인 계정으로는 Oracle에서 다운받을 수 없으며, 라이센스 맺은 계정으로 로그인 해야만 다운로드가 가능하다.
 - 가능하다면 다른 서버에 있는 pacth (zip)파일을 가져오는게 시간적으로 간편하다.





실습환경
 - OS: OracleLinux 5
 - WebLogic ver: 10.3.6



선작업
 - patch 파일을 $BEA_HOME/utils/bsu/cache_dir 디렉토리에 압축을 푼다.


# 실습환경 웹로직 관련 홈디렉토리 경로
# $BEA_HOME(웹로직 설치디렉토리): /app/weblogic1036/
# $WL_HOME(웹로직 구성요소 디렉토리): /app/weblogic1036/wlserver_10.3/

[weblogic@ae2793daea03 ~]$
[weblogic@ae2793daea03 ~]$ ll
total 1203620
drwxrwxr-x 2 weblogic weblogic       4096 Aug  5 10:22 bea
-rwxr-xr-x 1 weblogic weblogic   72087592 Aug  5 10:08 jdk-6u45-linux-x64.bin
-rw-r--r-- 1 weblogic weblogic   91900574 Nov 24 06:35 p24667634_1036_Generic.zip
-rwxr-xr-x 1 weblogic weblogic 1068506707 Aug  5 09:40 wls1036_generic.jar
[weblogic@ae2793daea03 ~]$
[weblogic@ae2793daea03 ~]$
[weblogic@ae2793daea03 ~]$ unzip -d /app/weblogic1036/utils/bsu/cache_dir p24667634_1036_Generic.zip
Archive:  p24667634_1036_Generic.zip
  inflating: /app/weblogic1036/utils/bsu/cache_dir/patch-catalog_24721.xml
  inflating: /app/weblogic1036/utils/bsu/cache_dir/README.txt
  inflating: /app/weblogic1036/utils/bsu/cache_dir/XIDD.jar
[weblogic@ae2793daea03 ~]$






Patch Install
 - 기존 패치가 되어있는 상황이라면 패치를 제거 후 작업한다.


# bsu 디렉토리로 이동
[weblogic@ae2793daea03 ~]$ cd /app/weblogic1036/utils/bsu/
[weblogic@ae2793daea03 bsu]$
[weblogic@ae2793daea03 bsu]$
[weblogic@ae2793daea03 bsu]$
# Patch ID 확인 (현재 XIDD)
[weblogic@ae2793daea03 bsu]$ ll cache_dir/
total 138732
-rw-rw-r-- 1 weblogic weblogic     7035 Nov 29  2016 README.txt
-rw-rw-r-- 1 weblogic weblogic 88192621 Nov 25  2016 XIDD.jar
-rw-rw-r-- 1 weblogic weblogic 53854293 Nov 25  2016 patch-catalog_24721.xml
[weblogic@ae2793daea03 bsu]$
[weblogic@ae2793daea03 bsu]$
[weblogic@ae2793daea03 bsu]$
# 그냥 실행하면 아래와 같이 에러날 확률이 높음
[weblogic@ae2793daea03 bsu]$ ./bsu.sh -install -patchlist=XIDD -prod_dir=/app/weblogic1036/wlserver_10.3
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2436)
        at java.lang.Class.getMethod0(Class.java:2679)
        at java.lang.Class.getMethod0(Class.java:2688)
        at java.lang.Class.getMethod0(Class.java:2688)
        at java.lang.Class.getMethod(Class.java:1605)
        at com.bea.cie.common.dao.xbean.XBeanDataHandler.isValueSet(XBeanDataHandler.java:958)
        at com.bea.cie.common.dao.xbean.XBeanDataHandler.getValueFromObject(XBeanDataHandler.java:589)
        at com.bea.cie.common.dao.xbean.XBeanDataHandler.getSimpleValue(XBeanDataHandler.java:431)
        at com.bea.plateng.patch.dao.cat.PatchDependency.getRule(PatchDependency.java:48)
        at com.bea.plateng.patch.dao.cat.PatchCatalogHelper.getInvalidatedPatchMap(PatchCatalogHelper.java:1625)
        at com.bea.plateng.patch.PatchSystem.updatePatchCatalog(PatchSystem.java:436)
        at com.bea.plateng.patch.PatchSystem.refresh(PatchSystem.java:130)
        at com.bea.plateng.patch.PatchSystem.<init>(PatchSystem.java:114)
        at com.bea.plateng.patch.PatchSystem.<clinit>(PatchSystem.java:41)
        at com.bea.plateng.patch.Patch.main(Patch.java:279)
Exception in thread "Thread-0" java.lang.NoClassDefFoundError: Could not initialize class com.bea.plateng.patch.PatchSystem
        at com.bea.plateng.patch.PatchClientHelper.getAllPatchDetails(PatchClientHelper.java:74)
        at com.bea.plateng.patch.PatchInstallationHelper.cleanupPatchSets(PatchInstallationHelper.java:130)
        at com.bea.plateng.patch.PatchTarget.<init>(PatchTarget.java:272)
        at com.bea.plateng.patch.PatchTargetFactory.create(PatchTargetFactory.java:30)
        at com.bea.plateng.patch.ProductAliasTarget.constructPatchTargetList(ProductAliasTarget.java:88)
        at com.bea.plateng.patch.ProductAliasTarget.<init>(ProductAliasTarget.java:46)
        at com.bea.plateng.patch.ProductAliasTargetHelper.getProdAliasTargetList(ProductAliasTargetHelper.java:55)
        at com.bea.plateng.patch.ProductAliasTargetHelper.getAllHomeToProdAliasesTargetMap(ProductAliasTargetHelper.java:32)
        at com.bea.plateng.patch.ProductAliasTargetHelper.checkProfilesInProductAliases(ProductAliasTargetHelper.java:133)
        at com.bea.plateng.patch.Patch$1.run(Patch.java:376)
        at java.lang.Thread.run(Thread.java:662)
[weblogic@ae2793daea03 bsu]$
[weblogic@ae2793daea03 bsu]$
[weblogic@ae2793daea03 bsu]$
# bsu.sh 파일에서 힙메모리를 높게 설정해준다.
[weblogic@ae2793daea03 bsu]$ vi bsu.sh
#!/bin/sh

JAVA_HOME="/app/jdk1.6.0_45"

MEM_ARGS="-Xms2560m -Xmx5120m"

"$JAVA_HOME/bin/java" ${MEM_ARGS} -jar patch-client.jar $*
[weblogic@ae2793daea03 bsu]$
[weblogic@ae2793daea03 bsu]$
[weblogic@ae2793daea03 bsu]$
# 다시 패치 인스톨 명령어 수행 시 정상적으로 수행됨.
# 시간이 오래 걸리나 top 명령어로 확인 시 프로세스가 수행되는것을 알 수 있다.
[weblogic@ae2793daea03 bsu]$ ./bsu.sh -install -patchlist=XIDD -prod_dir=/app/weblogic1036/wlserver_10.3
Checking for conflicts..........
No conflict(s) detected
1004lucifer
Installing Patch ID: XIDD..
Result: Success

./bsu.sh: line 7:   127 Killed                  "$JAVA_HOME/bin/java" ${MEM_ARGS} -jar patch-client.jar $*
[weblogic@ae2793daea03 bsu]$






Patch Check
1004lucifer

# patch 적용 전
[weblogic@ae2793daea03 bsu]$ ./bsu.sh -view -status=applied -prod_dir=/app/weblogic1036/wlserver_10.3
ProductName:       WebLogic Server
ProductVersion:    10.3 MP6
Components:        WebLogic Server/Core Application Server,WebLogic Server/Admi
                   nistration Console,WebLogic Server/Configuration Wizard and
                   Upgrade Framework,WebLogic Server/Web 2.0 HTTP Pub-Sub Serve
                   r,WebLogic Server/WebLogic SCA,WebLogic Server/WebLogic JDBC
                    Drivers,WebLogic Server/Third Party JDBC Drivers,WebLogic S
                   erver/WebLogic Server Clients,WebLogic Server/WebLogic Web S
                   erver Plugins,WebLogic Server/UDDI and Xquery Support,WebLog
                   ic Server/Evaluation Database,WebLogic Server/Workshop Code
                   Completion Support
BEAHome:           /app/weblogic1036
ProductHome:       /app/weblogic1036/wlserver_10.3
PatchSystemDir:    /app/weblogic1036/utils/bsu
PatchDir:          /app/weblogic1036/patch_wls1036
Profile:           Default
DownloadDir:       /app/weblogic1036/utils/bsu/cache_dir
JavaVersion:       1.6.0_29
JavaVendor:        Sun


[weblogic@ae2793daea03 bsu]$
# patch 적용 후
[weblogic@ae2793daea03 bsu]$ ./bsu.sh -view -status=applied -prod_dir=/app/weblogic1036/wlserver_10.3
ProductName:       WebLogic Server
ProductVersion:    10.3 MP6
Components:        WebLogic Server/Core Application Server,WebLogic Server/Admi
                   nistration Console,WebLogic Server/Configuration Wizard and
                   Upgrade Framework,WebLogic Server/Web 2.0 HTTP Pub-Sub Serve
                   r,WebLogic Server/WebLogic SCA,WebLogic Server/WebLogic JDBC
                    Drivers,WebLogic Server/Third Party JDBC Drivers,WebLogic S
                   erver/WebLogic Server Clients,WebLogic Server/WebLogic Web S
                   erver Plugins,WebLogic Server/UDDI and Xquery Support,WebLog
                   ic Server/Evaluation Database,WebLogic Server/Workshop Code
                   Completion Support
BEAHome:           /app/weblogic1036
ProductHome:       /app/weblogic1036/wlserver_10.3
PatchSystemDir:    /app/weblogic1036/utils/bsu
PatchDir:          /app/weblogic1036/patch_wls1036
Profile:           Default
DownloadDir:       /app/weblogic1036/utils/bsu/cache_dir
JavaVersion:       1.6.0_29
JavaVendor:        Sun


Patch ID:          XIDD (24667634)

[weblogic@ae2793daea03 bsu]$






Patch Remove


[weblogic@ae2793daea03 bsu]$ ./bsu.sh -remove -patchlist=XIDD -prod_dir=/app/weblogic1036/wlserver_10.3
Checking for conflicts.........
No conflict(s) detected

Removing Patch ID: XIDD..
Result: Success

[weblogic@ae2793daea03 bsu]$



댓글