본문 바로가기
WAS/WEBLOGIC

45. JDK 변경

by coldplayer83 2024. 6. 5.
728x90

참조)

https://docs.oracle.com/en/middleware/fusion-middleware/12.2.1.3/soaqs/shared-updating-jdk-installing-and-configuring-oracle-fusion-middleware-product.html#GUID-A8B58750-8A71-4495-9743-0EB0CEA23512

 

Installing Oracle SOA Suite and Business Process Management Suite Quick Start for Developers

Consider that you have a JDK version jdk1.8.0_121 installed on your machine. When you install and configure an Oracle Fusion Middleware product, the utilities, such as Configuration Wizard (config.sh|exe), OPatch, or RCU point to a default JDK, for example

docs.oracle.com

https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=158802006683942&parent=EXTERNAL_SEARCH&sourceId=HOWTO&id=2185993.1&_afrWindowMode=0&_adf.ctrl-state=15wxeonizm_4

 

https://login-ext.identity.oraclecloud.com/oauth2/v1/authorize?response_mode=form_post&response_type=id_token&scope=openid&IDCS_CG_ENC_VER=v2&state=lpF7TtBmv8ivG-Ew4Lv324c0AZ57UrkFkhMfH_tfpFM&nonce=AYZ0zEik1ekGv8abUZ_VEq5q58cfkWoAgV4VEXWRY_4&IDCS_IS_CLOUDGATE=true&X-HOST-IDENTIFIER-NAME=support.oracle.com&idcs_app_name=cb3a35b10af7484b9c706e5509a7961c&idcs_app_resource_url=https%3A%2F%2Fsupport.oracle.com%2Fepmos%2Ffaces%2FDocumentDisplay%3F_adf.ctrl-state%3D15wxeonizm_4%26_afrLoop%3D158802006683942%26_afrWindowMode%3D0%26id%3D2185993.1%26parent%3DEXTERNAL_SEARCH%26sourceId%3DHOWTO&client_id=b2ea4a3d18dc476aa20c8c0eee2de79d&IDCS_CG_ENC=true&enc=8Qndd_VfhTCHAgAATQIAABAgTQIAADMCAAAQAOsTPrP6h0WZnON1VpakLUSxHfieTZno90iHwS1hxh_I4G3_1UXZh6bujKep0fjKRRytCZQJzrPaKd0Q9ageSk8XUBF6TWeBc_5cQtzz9RrMqpSs6ACR4s8BgUADZgfg_4bae1UrYZJ-57hbvY8FuiuvZNpxeB8m9BTCB5Okf0tdSsHFFBVSsC2zrmZ0vDawwHEoiz44OaGZzXn9FKcjG5PtlO0A_aPJd5aWJyPqSVGtxYmxEy6yJpTmeNIYv2S_Zu3Uwm9KhiDDe7dgtm8UTVb2xvwoFjKO-IKsxYaB5FvlpXX84tohJaglWJ0ybaL41AkpKaPVvRnyDtNrRz1wHYZFMH6JufyZ9vW1wvBQ7Bbgtz2RMsByhr1ffrhdLvpJSauUDKVKlKmYxGL-x_L0prdazQ5P30YgnGpSGBn7EKGxvZ4b7QNQnCFu8YA5Y44Gxyc2WQj_IIPwbl_166zPovvGbatZfB77zaR-eg4fKRxMoXWQSmDCoG8bi5lHxTBJ7fbrdzAO9qnSkAIhBKa4eYak5FpBUZAFLK6xjM4Gv96g-YBmoYeLGU4ZBKnN7H3eKd8fuMfE8gNd7sPrmnFFsv1gev1OX5v44bL0GfS-OvVgEmRQho0mV24O1XqYi-VmoG5Z0hdBJXtmds9sA09tKqctH4u6WbUN5hD__vNhlQ41LIV9Aw8-7rgWMxcIR1CezEAjx0Np_7shYMBqfj-Pvvlz1y33JsTTpcXXnIli7QJMyNR8SUOz4aK-YEpIsITrlJxR5DnR4vcCAuZDWO4fOVL6h7xWhpJoyFwG-UYH18ULKkxUQJxCLFV4-v3D5xJLuKSC9Q

 

login-ext.identity.oraclecloud.com

 

각 웹로직 버전별 JDK 업그레이드 시 변경해야 하는 스크립트 파일 목록)

https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=158978254715713&parent=DOCUMENT&sourceId=2185993.1&id=1492980.1&_afrWindowMode=0&_adf.ctrl-state=15wxeonizm_53

 

https://login-ext.identity.oraclecloud.com/oauth2/v1/authorize?response_mode=form_post&response_type=id_token&scope=openid&IDCS_CG_ENC_VER=v2&state=GRnvuQeenlGRF7lKYEMr93ftvxPvjXooQqDoCRZRxVc&nonce=VmR_ocetRoukKxCu46-SMzk4CeglU43NlHl1z8uZ2hI&IDCS_IS_CLOUDGATE=true&X-HOST-IDENTIFIER-NAME=support.oracle.com&idcs_app_name=cb3a35b10af7484b9c706e5509a7961c&idcs_app_resource_url=https%3A%2F%2Fsupport.oracle.com%2Fepmos%2Ffaces%2FDocumentDisplay%3F_adf.ctrl-state%3D15wxeonizm_53%26_afrLoop%3D158978254715713%26_afrWindowMode%3D0%26id%3D1492980.1%26parent%3DDOCUMENT%26sourceId%3D2185993.1&client_id=b2ea4a3d18dc476aa20c8c0eee2de79d&IDCS_CG_ENC=true&enc=oJYYHstJpV-FAgAASwIAABAgSwIAADECAAAQAOGc5Gk-719UyNIGsFzaUMDznbo5wv-3B2g0rsW18t4ySd84Si3K06jpIC7QR5LyZJFPad5VXyrLg2q-Sxnamympnx07keKdUa736AOKFE4tLE8vmg-0oN0my4v_HtbRkjGrGXsNGI4kt8WA5WM-C5vSUcOZ7pvzSHnkrKZDRtW4pbun_NVCq6M50W7cDAbFp1vP-5zdd5u__-SuM9ZBRE7UNQAXIYyXOQjt7cRgVZ14vFDX8VV1unC0KnVq-eIUfGmzunuyvRPgU9eD4Nh68MeFFxjWDrrqr96yod-LW_UBjQnRej08tE2s21056dzLf-RjpL_ieoeX7NbKpSE7E4e6YX2zO9pA12bh-t6T_aM04UDZ5nPZSewBs1I56Ofrmajp1J_63f1UG2p3azCwjYPXbCDE7LXVsRuEMnOXMMRJ_Y9t85EULG7I2IsYnqJn4DDNgrxONw2rEDEIKB8urmKtm4c3BnHiakM-HL55Yys3ScJNaNWTrpkcwIHeLo8d-6uAQRg8mctQC-aTBPQ9AXzG52GuKOS7na8fELUQDtbCDvkDfHZNCabwjXBFKlCM1V4LQPd2w8ONMNcKdZOupREvhPsKUhnQYG2jdcbhRCcA7SolQ_KYsq5LSc-kydDASY22VAfDQkmd7dCH6wcCzG-gkcoiZ-5N5B7lbARYU6OLziq8odIh9q5jlYGRpkxANVEsC0SSHWzKdGibeEWKiSw0RV98-_IjbY-ySXgN8MEm-EX04IgMe3kV06pnu8tCLY3E5zIprgHNwJGVbip2bAEEUkwptC9kQrSJLLVinblnU_xNfpJ8R03aSmuMdX9Ig_E

 

login-ext.identity.oraclecloud.com

 

12cR1에서 사용하는 JDK를 다른 버전으로 업그레이드 하는 방법)

https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=158997047579966&id=1616397.1&_afrWindowMode=0&_adf.ctrl-state=15wxeonizm_102

 

https://login-ext.identity.oraclecloud.com/oauth2/v1/authorize?response_mode=form_post&response_type=id_token&scope=openid&IDCS_CG_ENC_VER=v2&state=MD3trI_dxrkz_Q62K3Aha_HkORspVOEG3QkqGHUP1cs&nonce=86BuMPizUk4t7jDhE8_DXE7LGitJsVklcJSEKB_YDqQ&IDCS_IS_CLOUDGATE=true&X-HOST-IDENTIFIER-NAME=support.oracle.com&idcs_app_name=cb3a35b10af7484b9c706e5509a7961c&idcs_app_resource_url=https%3A%2F%2Fsupport.oracle.com%2Fepmos%2Ffaces%2FDocumentDisplay%3F_adf.ctrl-state%3D15wxeonizm_102%26_afrLoop%3D158997047579966%26_afrWindowMode%3D0%26id%3D1616397.1&client_id=b2ea4a3d18dc476aa20c8c0eee2de79d&IDCS_CG_ENC=true&enc=2foZn4S3-BdjAgAAKQIAABAgKQIAAA8CAAAQAAj9XeAVjDHjkMTdF6CyT2gnGlBFS2gEoyAtF1kE2lfo-Osjrk8II8A2JX0Zn4WtxGLsmpf08A8g78fGW_-mtFe962Du1Md2dXS2E5cxDpNVUz1D8lecILr_4HbJ_qofqBGWYnKzflid3PZFhobr-sN1vQnLcSFlN-TOtdru4bLyFnjpYz6rAWtQquw1rFV3h4vSqIQ-g8lziwA1xhMsCXHrBxk4g5r2-_s-A5AAtlp1Rx62pwZTaBtxA-pwGEQlKEqSVy6eWhfvmf_3FOzAwh1kRu7s_mxlDc9xNNk3dMhYuPPm0Damc5d_6Yat8GMfmicN3pdJYUTgQqz7C1vO9aOj48NjrERzli_tXzy8NFL8H2fFPy4piEk1S818QKMeMION6VFzkLC131IQ4I5TtA8WDI0zY8taAy-rH7_fJQ6wYCVw31A3jy3r5uOm6WpRmvfzaTOlb2DCnrenZDBMH_8ILm8F6qF7Y5eset-lePzwPZvbxPh67jpp2gN8oIN9yGujireipa5COUBa3P9RK8r8GnyFi4gOnaL2l3lms3kJozt4gy93ahtlUnYVRxGv0XvwJ8t7Um1DJIMexFLugV6PO6mKbBgvolum-kui-DDxVkQgjF342F6vG0nP31XAL7mg0rnun-cimWlLG4K2fsF1z1blsXqkHEkqwyJuOQG1rRarPbygCpeeUHCczZnwObJ0HECyhz9fC8ZbugIRDqZnH8Ptn95ItYByIvVi4HvW6LGStZ3IERBNWVcE-6x-J-tm-d7NnsEVqNuv7iUoBA

 

login-ext.identity.oraclecloud.com

 

11g에서 사용하는 JDK를 다른 버전으로 업그레이드 하는 방법)

https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=159023673874501&id=2185993.1&_afrWindowMode=0&_adf.ctrl-state=15wxeonizm_151

 

https://login-ext.identity.oraclecloud.com/oauth2/v1/authorize?response_mode=form_post&response_type=id_token&scope=openid&IDCS_CG_ENC_VER=v2&state=XgH1AQJJctbkgkpxRy2gH4F4-dx_nHOdvAseA-UwrEc&nonce=DUzRUPylT94E19PO9Ea0fFjF1iEX8uanyVa4eSVUBfA&IDCS_IS_CLOUDGATE=true&X-HOST-IDENTIFIER-NAME=support.oracle.com&idcs_app_name=cb3a35b10af7484b9c706e5509a7961c&idcs_app_resource_url=https%3A%2F%2Fsupport.oracle.com%2Fepmos%2Ffaces%2FDocumentDisplay%3F_adf.ctrl-state%3D15wxeonizm_151%26_afrLoop%3D159023673874501%26_afrWindowMode%3D0%26id%3D2185993.1&client_id=b2ea4a3d18dc476aa20c8c0eee2de79d&IDCS_CG_ENC=true&enc=WhJro2yoDg5jAgAAKQIAABAgKQIAAA8CAAAQAD75W7BpogDXJRhOIkmtW_p5K39WO6EvV8KfUSOg15ziQMeerc_KSU26bljwkJOo-ABLrpDn5D5TuklqiuvbY5VcW9vbG7DzQ8AHaBa8kaZ3XxhzPRlWnoHAvMUkytelmocAIq5uRZZdljpdoSwd2POzH1zDnLdar4d6KEhhU7IPaKoj9wbkhSpW1hhiroCyRG-mJ5DylHbo595l-IR7ioSdJoXf6qA05ASk0yvZSI4OzoBD8-CHiP0dZWMUUJNsHx11wiXOdHEntAExO7f5_BI4pOURqFKSQ-Q5-Cp_ACTjFbw2QmZm85C2QZu7s7-4Anr6Al18cKss9e0vn3hQpHpqDUmykzMoxR1UVnLEqPKY3g302-gDoMdsEJja53sYC_N9Om2_2zZo7C2yQFkdSXhBU24ehKq1R0gTLXBe1wXGrVfIx1f53d-vIsCdFcpMTEADtlXqodCWIcCdLcN4BJ-J8DpP3kZHzXMfv7cziZmlVoDU54zTzVCmuHDP0BtKoqwO7-qMSljiyKfr1BgEo2J8Nzlm5qWwSPbxrTurwH3K4li2GLWtJid7PiT3E2EPNVZu46SzMZfcWZ-g8wUYcF5Vu_s5JEilBWkJmGgsDTGX9nwhhkgaVFOTJjKoSeOSxz9tdCdutUbDBJHRGL2jNQ8NQX_KwOS6eVo_yQJtvBiiC55OPlr_6FlTo7GBUOMrHErlWfVZsFwazv7t2LV_8ERsS69eL35mY6SEfFzaGUb4VQdPPNAsPArNtk_dH68Y12xt0wqD038qi8br0K7_Wg

 

login-ext.identity.oraclecloud.com

 


 

WebLogic 설치후 JDK 버전을 변경할 필요가 있는 경우 단순 환경변수의 JAVA_HOME만 변경해서는 변경이 이루어지지 않는다
JDK 업그레이드 시 지원하는 weblogic 버전 Certification과 맞는지 확인!

 

[방법1] 새로운 JAVA_HOME을 설치하고 기존 JAVA 디렉토리 이름을 변경

이 방법의 경우 완전한 JAVA 디렉토리 구조가 필요하므로 심볼릭 링크를 사용하면 안된다

 

심볼릭 링크인지 여부를 확인하는 방법)

ls -ld ${jdk_version}

 


 

[방법2] 새로운 JAVA를 설치하고 모든 스크립트에서 참조하는 JAVA_HOME 환경 변수를 변경

 

1. 현재 웹로직에서 사용하는 JDK 버전 및 JAVA_HOME  확인

https://coldplayer83.tistory.com/95

 

33. 웹로직에서 사용중인 자바 버전 확인

웹로직에서는 웹로직 설치시에 사용할 jdk의 경로를 직접 입력하여 설치하고, 이후로는 해당 jdk를 사용수동으로 JAVA_HOME 등을 설정하지 않고, 설치시 사용한 자바 경로를 웹로직에서 자동으로 설

coldplayer83.tistory.com

 

2. 모든 weblogic 프로세스 중지

3. 업그레이드 할 자바 설치

4. 현재 사용중인 JDK 디렉토리 백업

5. 웹로직 홈 디렉토리에서 JAVA_HOME 옵션을 사용하고 있는 파일 찾기

find . -type f -name "*.sh" -exec grep -il JAVA_HOME {} \;

 

window)

findstr /?
findstr /S /C:\jdk *
findstr /S /C:\jdk * | findstr jdk7
findstr /S /M /C:\jdk *
findstr /S /M /C:\jdk %ORACLE_HOME%\*
findstr /S /i /C:JRELOC= *
findstr /S /i /C:JRELOC= * | findstr jdk7
findstr /S /i /C:JAVA_HOME=c:\ *

 

※ 특정 디렉토리를 제외하고 검색하기

grep -ri JAVA_HOME * --exclude-dir={log,logs}

 

각 웹로직 서버 버전 별 변경 대상 파일 목록은 위의 참조 링크 확인!

 

6. 4에서 찾은 파일들의 JAVA_HOME 변경(직접 변경 또는 명령어 사용하여 일괄 변경)

grep "${이전 JAVA_HOME}" * -rl | xargs sed -i 's/${이전 JAVA_HOME}/${교체 JAVA_HOME}/g'
ex) grep "jdk1.6.0_45" * -rl | xargs sed -i 's/jdk1.6.0_45/jdk1.8.0_131/g'

로그 디렉토리 제외
grep -ri JAVA_HOME * --exclude-dir={log,logs}

 

7. 변경되지 않은 파일이 있는지 확인

find . -type f -name "*" -exec grep -il ${이전 JAVA_HOME} {} \;
ex) find . -type f -name "*" -exec grep -il jdk1.6.0_45 {} \;

 

8. 변경된 파일 목록 확인

find . -type f -name "*" -exec grep -il ${변경 JAVA_HOME} {} \;
ex) find . -type f -name "*" -exec grep -il jdk1.8.0_131 {} \;

 

9. setDomainEnv.sh에 있는 JAVA_HOME이 변경된 것을 확인

 

10. 웹로직 기동시 변경한 jdk 버전으로 기동되는지 확인