一,創建用戶組和用戶
[root@localhost weblogic]# groupadd weblogic
[root@localhost weblogic]# useradd –g weblogic weblogic
[root@localhost weblogic]# passwd weblogic 輸入weblogic用戶的密碼
二,準備weblogic目錄
[root@localhost weblogic]# mkdir /opt/weblogic
[root@localhost weblogic]# chown -R weblogic /opt/weblogic
安裝WebLogic
[root@localhost weblogic]# chown weblogic:weblogic /home/weblogic/fmw_12.1.3.0.0_wls.jar
[root@localhost weblogic]# chmod a+x /home/weblogic/fmw_12.1.3.0.0_wls.jar
[root@localhost weblogic]# su weblogic
[weblogic@localhost ~]$ java -d64 -jar fmw_12.1.3.0.0_wls.jar
weblogic Server 12.1.1全部都可以用原來方式.
WebLogic Server 12.1.2後已經取消了console安裝模式,目前只有gui和靜默安裝模式。並且安裝方式下也有很大變化
三, 創建初始化環境文件oraInst.loc
inventory_loc=/home/weblogic/oraInventory
inst_group=weblogic
有的文檔上寫成 inst_group=oui_install_group
四,創建響應文件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=/opt/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=
#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=
#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=
五, 執行安裝
java -jar -d64 /home/weblogic/fmw_12.1.3.0.0_wls.jar -silent -invPtrLoc /home/weblogic/oraInst.loc -responseFile /home/weblogic/wls.resp
Oracle Fusion Middleware 12c WebLogic Server 和 Coherence 12.1.3.0.0 的 安裝 已成功完成。
日誌已成功複製到/home/weblogic/oraInventory/logs。 -----打印此信息,說明weblogic安裝成功了。
六. 創建domain
[weblogic@localhost bin]$ pwd /opt/weblogic/wlserver/common/bin
[weblogic@localhost bin]$ ./commEnv.sh MW_HOME or WL_HOME is not set.
[weblogic@localhost bin]$
注:export MW_HOME=$ORACLE_HOME 見響應文件 wls.resp 中的 ORACLE_HOME
export MW_HOME=/opt/weblogic
export WLS_HOME=$MW_HOME/wlserver
export WL_HOME=$WLS_HOME
cd /opt/weblogic/wlserver/common/bin
bash$ pwd
/opt/weblogic/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('/opt/weblogic/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', 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('weblogic12')
wls:/offline/base_domain/Security/base_domain/User/weblogic>setOption('OverwriteDomain', 'true')
wls:/offline/base_domain/Security/base_domain/User/weblogic>writeDomain('/opt/weblogic/user_projects/domains/test')
closeTemplate()
exit()
七, 啟動nodeManager和weblogic
cd /opt/weblogic/user_projects/domains/test
./startWebLogic.sh &
./startNodeManager.sh &
閱讀更多 文話教育 的文章