WAS/WebLogic

[Tips] WebLogic 11g 패치(Patch) 방법

투칼론 2015. 3. 10. 21:02
반응형

Patch 방법은 웹로직 버전에 따라 상이하므로 매뉴얼을 참조하여 해당 버전에 맞는 패치 방법을 적용해야 한다. 여기에서는 웹로직 11g 버전의 패치 방법에 대해 설명하고자 한다.

주요 패치 방법은 아래와 같다. 패치 시에 패치파일(압축파일)에 포함되어 있는 README.txt를 반드시 읽어보아야 한다. 예를들어 권장하는 JDK 버전(Minor 번호 포함)이 있을 수 있으므로 사전에 체크해야 한다.


  • smart update를 서버에서 수행하여 패치방법
  • smart update를 PC에서 수행해서 패치한 후에 그 파일을 서버에 올리는 방법
  • 커맨드라인 명령어 기반 패치방법
  • $WL_HOME/common/bin/commEnv.sh에 PATCH_CLASSPATH 설정


1. smart update를 서버에서 수행하여 패치방법

$BEA_HOME/utils/bsu 디렉토리에 있는 bsu.sh 또는 bsu.cmd를 실행한다. 아래와 같은 화면을 통해 Patch 다운로드 및 적용을 할 수 있다. 


[상세 절차]

1. Run the <BEA_HOME>/utils/bsu/bsu.sh or .cmd file as per the OS.

2. It will open a GUI and prompt for username/password. Provide your My Oracle Support user id and password.
3. If there are any proxy settings in your environment and you have not configured them, the login will fail, so please follow these steps:
1. Click on "Work Offline" instead of "Login."
2. When GUI is opened, select File -> Preferences -> Proxy.
3. Specify the proxy details and then re-login from File --> Login.
4. This will connect to our websites to download the patch.
5. In the right pane, select the "Get Patches" tab.
6. Select Patches -> Retrieve Private from the menu bar.
7. This will prompt for the patch id and passcode. Provide the details and click on download.
8. This will download the patch to your system and it should now appear in the "Downloaded Patches" area of your SmartUpdate GUI.
9. To apply the patch to your system, make sure all the servers and node managers running in this installation are shut down.
10. In the right pane, select the "Manage Patches" tab.
11. You can see the patch in the "Downloaded Patches" section at the bottom.
12. Now, select the "Apply" button. This will validate the patch and apply it to the whole installation.


2. smart update를 PC에서 수행해서 패치한 후에 그 파일을 서버에 올리는 방법

위의 smart update를 GUI가 지원되는 PC에서 Patch 파일을 다운로드 받아  수동으로 적용하는 방법이다.

smart update를 통해 Patch를 다운로드 하면, <patch-id>.jar 파일과 patch-catalog.xml 파일이 다운로드 된다.


[상세 절차]

1. Download the patch to a machine where GUI is enabled following the steps above.
2. From the machine where the patch is downloaded, copy the following files from directory <BEA_HOME>/utils/bsu/cache_dir :
* <patch-id>.jar
* patch-catalog.xml
3. Move these files to the machine where it has to be applied, to the same directory, cache_dir.
4. Run the following command to view the downloaded patches as below:

bsu -prod_dir=<Your WebLogic home directory> -patch_download_dir=<Your patch download dir>-status=downloaded -view -verbose

For example:

D:\bea_homes\103\utils\bsu>bsu -prod_dir=d:\bea_homes\103\wlserver_10.3 -patch_download_dir=d:\bea_homes\103\utils\bsu\cache_dir -status=downloaded -view -verbose 

5. Run the following to apply the patch:

bsu -prod_dir=<Your WebLogic Home Dir> -patchlist=<Your Patch ID> -verbose -install

For example:

D:\bea_homes\103\utils\bsu>bsu -prod_dir=d:\bea_homes\103\wlserver_10.3 -patchlist=4KQN -verbose -install 


6. Run the following command to check if the patch is installed:
bsu -prod_dir=<Your WebLogic home directory> -patch_download_dir=<Your patch download dir>-status=applied -view -verbose:

For example:
D:\bea_homes\103\utils\bsu>bsu -prod_dir=d:\bea_homes\103\wlserver_10.3 -status=applied -view -verbose



3. 커맨드라인 명령어 기반 패치방법

1) 다운로드한 패치 파일을 cache_dir 위치에 Unzip을 함. 아래는 예시임

$ mkdir -p $MW_HOME/utils/bsu/cache_dir
$ cd $MW_HOME/utils/bsu/cache_dir
$ unzip /tmp/p14736139_1036_Generic.zip


2) 패치를 적용

$ cd $MW_HOME/utils/bsu
$ ./bsu.sh -install -patch_download_dir=$MW_HOME/utils/bsu/cache_dir -patchlist=HYKC -prod_dir=$WLS_HOME

충돌나면, 아래와 같은 명령어로 이전 패치를 삭제한 후 패치를 진행해야 한다.

$ cd $MW_HOME/utils/bsu
$ ./bsu.sh -remove -patchlist=ABCD -prod_dir=$WLS_HOME

$ ./bsu.sh -install -patch_download_dir=$MW_HOME/utils/bsu/cache_dir -patchlist=HYKC -prod_dir=$WLS_HOME

패치를 적용한 후, 웹로직을 재기동한다. 그리고, 버전을 체크하여 패치가 잘 적용되었는지 확인한다.

$ . $WLS_HOME/server/bin/setWLSEnv.sh
$ java weblogic.version

WebLogic Server 10.3.6.0.3 PSU Patch for BUG14736139 Fri Nov 23 10:16:54 IST 2012
WebLogic Server 10.3.6.0  Tue Nov 15 08:52:36 PST 2011 1441050

Use 'weblogic.version -verbose' to get subsystem information

Use 'weblogic.utils.Versions' to get version information for all modules
$

[참고] bsu 명령어에 대한 상세한 설명은 http://blueyikim.tistory.com/831  참조할 것

4. commEnv.sh 파일에 PATCH_CLASSPATH를 추가하는 방법

1) 다운로드한 패치 파일을 특정 위치에 패치파일을 위치시킴

$ mkdir -p $MW_HOME/patch 예) /oracle/wls/patch/143N.jar


2) commEnv.sh 파일 상단에 PATCH_CLASSPATH 를 설정한다

$ vi /oracle/wls/common/bin/commEnv.sh

위의 파일(commEnv.sh)에 아래 추가

export PATCH_CLASSPATH=/oracle/wls/patch/I43N.jar


-end-