歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux技術 >> Linux靜默安裝weblogic12(fmw_12.1.3.0.0_wls.jar)

Linux靜默安裝weblogic12(fmw_12.1.3.0.0_wls.jar)

日期:2017/3/3 12:50:57   编辑:Linux技術
1、安裝JDK環境
#tar zxvf jdk-7u80-linux-x64.gz
#mv jdk1.7.0_80 /usr/local/jdk1.7.0_80/

2、創建安裝用戶
#useradd weblogic
#su - weblogic

3、配置JAVA環境變量
$vi .bash_profile
export JAVA_HOME=/usr/local/jdk1.7.0_80
export JRE_HOME=/usr/local/jdk1.7.0_80/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
export ORACLE_HOME=/bea

4、創建響應文件wls.rsp
響應文件中的項一定要寫全,否則會報奇怪的錯誤。
[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=/bea
#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=

5、創建Loc文件oraInst.loc
inventory_loc=/home/weblogic/oraInventory
#用戶的組名稱,根據實際的修改
inst_group=weblogic

6、執行安裝
java -jar fmw_12.1.3.0.0_wls.jar -silent -responseFile /home/weblogic/wls.rsp -invPtrLoc /home/weblogic/oraInst.loc
啟動程序日志文件為/tmp/OraInstall2016-05-13_01-02-56PM/launcher2016-05-13_01-02-56PM.log。
正在提取文件.........
啟動 Oracle Universal Installer
檢查 CPU 速度是否大於 300 MHz。   實際為 2400.217 MHz    通過
檢查交換空間: 必須大於 512 MB。   實際為 18513912 MB    通過
檢查此平台是否需要 64 位 JVM。   實際為64    通過 (不需要 64 位)
檢查臨時空間: 必須大於 300 MB。   實際為 36518 MB    通過
准備從/tmp/OraInstall2016-05-13_01-02-56PM啟動 Oracle Universal Installer
日志:/tmp/OraInstall2016-05-13_01-02-56PM/install2016-05-13_01-02-56PM.log
版權所有 (c) 1996, 2014, Oracle 和/或其附屬公司。保留所有權利。
正在讀取響應文件...
開始檢查: CertifiedVersions
預期的結果: enterprise-4,enterprise-5,enterprise-6,redhat-6,redhat-4,redhat-5,SuSE-11之一
實際結果: enterprise-6
檢查完成。此次檢查的總體結果為: 通過
CertifiedVersions 檢查: 成功。
開始檢查: CheckJDKVersion
預期的結果: 1.7.0_15
實際結果: 1.7.0_80
檢查完成。此次檢查的總體結果為: 通過
CheckJDKVersion 檢查: 成功。
已啟用此會話的驗證。
正在驗證數據...
正在復制文件...
可以在以下位置找到本次安裝會話的日志:
 /tmp/OraInstall2016-05-13_01-02-56PM/install2016-05-13_01-02-56PM.log
-----------20%----------40%----------60%----------80%--------100%
Oracle Fusion Middleware 12c WebLogic Server 和 Coherence 12.1.3.0.0 的 安裝 已成功完成。
日志已成功復制到/home/weblogic/oraInventory/logs。

7、創建域
export MW_HOME="/bea"
export WL_HOME="/bea/oracle_common"
export CONFIG_JVM_ARGS='-Djava.security.egd=file:/dev/urandom'  --執行該命令,避免創建域過慢
bash$ pwd
/bea/wlserver/common/bin
bash$ ./commEnv.sh 
bash$ ./wlst.sh 
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Initializing WebLogic Scripting Tool (WLST) ...
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
wls:/offline>readTemplate('/bea/wlserver/common/templates/wls/wls.jar')
wls:/offline/base_domain>cd('Servers/AdminServer')
wls:/offline/base_domain/Server/AdminServer>set('ListenAddress','')
wls:/offline/base_domain/Server/AdminServer>set('ListenPort', 8080)
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('weblogic12')
wls:/offline/base_domain/Security/base_domain/User/weblogic>setOption('OverwriteDomain', 'true')
wls:/offline/base_domain/Security/base_domain/User/weblogic>writeDomain('/bea/user_projects/domains/hbintf_domain')
closeTemplate()
exit()

8、啟動
$cd /bea/user_projects/domains/hbintf_domain
$./startWeblogic.sh

參考資料:
https://docs.oracle.com/middleware/1213/core/OUIRF/silent.htm#OUIRF323
Copyright © Linux教程網 All Rights Reserved