RHEL6.4安裝WebLogic12c
環境準備
- JDK1.8
- RHEL6.4
安裝WebLogic
新建使用者
groupadd -g 505 weblogic useradd -g weblogic -u 505 weblogic passwd weblogic
下載Weblogic
因weblogic被oracle收購,那麼我們可以在Oracle官網下載weblogic
將下載好的安裝包fmw_12.2.1.3.0_wls_quick_Disk1_1of1.zip
進行解壓
unzip fmw_12.2.1.3.0_wls_quick_Disk1_1of1.zip
解壓完成後可以發現有個fmw_12.2.1.3.0_wls_quick.jar
檔案
預配置(可選)
在/home/weblogic下面新增oraInst.loc
和wls.resp
oraInst.loc
inventory_loc=/home/weblogic/oraInventory inst_group=weblogic
wls.resp
[ENGINE] #DO NOT CHANGE THIS. Response File Version=1.0.0.0.0 [GENERIC] #The oracle home location. This can be an existing Oracle Home or a new Oracle Home ORACLE_HOME=/home/weblogic/weblogic #Set this variable value to the Installation Type selected. e.g. WebLogic Server, Coherence, Complete with Examples. INSTALL_TYPE=WebLogic Server #Provide the My Oracle Support Username. If you wish to ignore Oracle Configuration Manager configuration provide empty string for user name. MYORACLESUPPORT_USERNAME= #Provide the My Oracle Support Password MYORACLESUPPORT_PASSWORD=<SECURE VALUE> #Set this to true if you wish to decline the security updates. Setting this to true and providing empty string for My Oracle Support username will ignore the Oracle Configuration Manager configuration DECLINE_SECURITY_UPDATES=true #Set this to true if My Oracle Support Password is specified SECURITY_UPDATES_VIA_MYORACLESUPPORT=false #Provide the Proxy Host PROXY_HOST= #Provide the Proxy Port PROXY_PORT= #Provide the Proxy Username PROXY_USER= #Provide the Proxy Password PROXY_PWD=<SECURE VALUE> #Type String (URL format) Indicates the OCM Repeater URL which should be of the format [scheme[Http/Https]]://[repeater host]:[repeater port] COLLECTOR_SUPPORTHUB_URL=
安裝weblogic
執行如下命令:
java -jar -d64 fmw_12.2.1.3.0_wls_quick.jar -silent -invPtrLoc /home/weblogic/oraInst.loc -responseFile /home/weblogic/wls.resp
或者直接執行
java -jar fmw_12.2.1.3.0_wls_quick.jar
此時會列印如下日誌:
Launcher log file is /tmp/OraInstall2018-02-05_11-39-28AM/launcher2018-02-05_11-39-28AM.log. Extracting the installer . . . . . Done Checking if CPU speed is above 300 MHz. Actual 2266.000 MHz Passed Checking swap space: must be greater than 512 MB. Actual 4095 MB Passed Checking if this platform requires a 64-bit JVM. Actual 64 Passed (64-bit not required) Checking temp space: must be greater than 300 MB. Actual 121215 MB Passed Preparing to launch the Oracle Universal Installer from /tmp/OraInstall2018-02-05_11-39-28AM Log: /tmp/OraInstall2018-02-05_11-39-28AM/install2018-02-05_11-39-28AM.log ***************************************************** Distribution Name : Oracle Fusion Middleware 12c WebLogic and Coherence Developer Distribution Version : 12.2.1.3.0 Oracle Inventory : /home/weblogic/oraInventory Oracle Home : /home/weblogic/wls12213 Java Home : /usr/local/java/jdk1.8.0_161 Note: Oracle Home not supplied (defaulted to <present working dir>/wls12213) ***************************************************** Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved. Reading response file.. Skipping Software Updates Starting check : CertifiedVersions Expected result: One of oracle-6, oracle-7, redhat-7, redhat-6, SuSE-11, SuSE-12 Actual Result: redhat-6.4 Check complete. The overall result of this check is: Passed CertifiedVersions Check: Success. Starting check : CheckJDKVersion Expected result: 1.8.0_131 Actual Result: 1.8.0_161 Check complete. The overall result of this check is: Passed CheckJDKVersion Check: Success. Validations are enabled for this session. Verifying data Copying Files Percent Complete : 10 Percent Complete : 20 Percent Complete : 30 Percent Complete : 40 Percent Complete : 50 Percent Complete : 60 Percent Complete : 70 Percent Complete : 80 Percent Complete : 90 Percent Complete : 100 The installation of Oracle Fusion Middleware 12c WebLogic and Coherence Developer 12.2.1.3.0 completed successfully. Logs successfully copied to /home/weblogic/wls12213/cfgtoollogs/oui.
至此,Weblogic已經安裝完成。
配置域
命令列方式配置域
配置域
cd wls12213/ oracle_common/common/bin/commEnv.sh oracle_common/common/bin/wlst.sh
Initializing WebLogic Scripting Tool (WLST) ... Welcome to WebLogic Server Administration Scripting Shell Type help() for help on available commands wls:/offline> readTemplate('/home/weblogic/wls12213/wlserver/common/templates/wls/wls.jar') WARNING: The readTemplate is deprecated. Use selectTemplate followed by loadTemplates in place of readTemplate. wls:/offline/base_domain>cd('Servers/AdminServer') wls:/offline/base_domain/Server/AdminServer>set('ListenAddress','') wls:/offline/base_domain/Server/AdminServer>set('ListenPort', 7001) wls:/offline/base_domain/Server/AdminServer>cd('../..') wls:/offline/base_domain>cd('Security/base_domain/User/weblogic') wls:/offline/base_domain/Security/base_domain/User/weblogic>cmo.setPassword('weblogic123') wls:/offline/base_domain/Security/base_domain/User/weblogic>setOption('OverwriteDomain', 'true') wls:/offline/base_domain/Security/base_domain/User/weblogic>writeDomain('/home/weblogic/user_projects/domains/test') wls:/offline/test/Security/test/User/weblogic>closeTemplate() wls:/offline>exit() Exiting WebLogic Scripting Tool.
啟動nodeManager和weblogic
cd ~/user_projects/domains/test/bin
nohup sh startWebLogic.sh &
nohup sh startNodeManager.sh &
GUI方式配置域
安裝VNC
yum install tigervnc yum install tigervnc-server
配置X11
使用操作使用者(weblogic)登入遠端機器,切記一定會weblogic使用者,不可使用其他使用者通過su
命令切換。
然後執行如下命令
export DISPLAY=:0
此時,便可以使用操作機的X11客戶端去安裝Weblogic了。
使用XQuartz登入遠端機器
ssh -X [email protected]
Step01-啟動配置GUI
cd ~/wls12213 oracle_common/common/bin/config.sh
如下圖所示
此時我們選擇Create a new domain
。
Step02-Templates
此時我們按照圖中所示,點選Next >
。
Step03-Admin Account
此處,我們配置管理員的賬號,使用者名稱weblogic
,密碼weblogic123
。
Step04-Domain Mode And JDK
因是測試環境,我們選擇Development
,JDK選擇預設系統配置的JAVA_HOME
。
Step05-Advanced Config
在這裡,選擇Administration Server
和Node Manager
即可。
Step06-Administration Server
ServerName: 應用名稱
Listen Address :測試環境一般推薦All Local Address
,將所有的地址都綁定了。
Listen Port: 一般從7001
開始,本次我們就是用7001
SSL的配置可以不勾選,測試環境沒必要。
Step07-Node Manager
這一步配置Node Manager,Location我們就選擇預設即可,預設的路徑在~/wls12213/user_projects/
在下面的Node Manager Credentials
中填寫使用者名稱密碼,本篇的使用者名稱密碼是weblogic
和weblogic123
。
Step08-Configuration Summary
這一步點選Create
即可。
Step09-Configuration Summary
這一步看進度條就行了。
Step10-End Of Configuration
啟動weblogic Server
cd ~/wls12213/user_projects/domains/base_domain
nohup sh startWebLogic.sh &
等待大約10分鐘就啟動完成了。