CentOS 7 安装配置 WebLogic 12.2.1.3 (无图形界面)

一、前提

  • Java 8
  • fmw_12.2.1.3.0_wls.jar
  • 查看防火墙是否关闭 service firewalld status,如果没关 service firewalld stop

二、介绍

  • Weblogic 安装有三种方式,1、GUI 方式比较简单,一直点下一步就安装好了;2、命令行模式 12c 无法使用;3、这里是第三种 Silent,不需要交互,适合批量安装。
  • 命令格式: java -jar wls_121200.jar -silent -responseFile file -invPtrLoc file
  • 其中,-responseFile 为响应文件,-invPtrLoc 为初始化环境文件。

三、安装 参考官方文档

  1. 编辑 wls.rsp,vim wls.rsp 下方是我自定义的配置。你要修改的:
  • ORACLE_HOME=/home/oracle/Oracle/Middleware/myOracle_Home,只要路径写出来就可以,不用自己建文件夹。
  • oraInst.loc 文件中的两句话都需要自定义,把 oracle 改为自己的用户名。
[ENGINE]
#DO NOT CHANGE THIS.
Response File Version=1.0.0.0.0
 
[GENERIC]
#Set this to true if you wish to skip software updates
DECLINE_AUTO_UPDATES=true

#My Oracle Support User Name
MOS_USERNAME=

#My Oracle Support Password
MOS_PASSWORD=<SECURE_VALUE>

#If the Software updates are already downloaded and available on your local system,
#then specify the path to the directory where these patches are available and
#set SPECIFY_DOWNLOAD_LOCATION to true
AUTO_UPDATES_LOCATION=

#Proxy Server Name to connect to My Oracle Support
SOFTWARE_UPDATES_PROXY_SERVER=

#Proxy Server Port
SOFTWARE_UPDATES_PROXY_PORT=

#Proxy Server Username
SOFTWARE_UPDATES_PROXY_USER=

#Proxy Server Password
SOFTWARE_UPDATES_PROXY_PASSWORD=<SECURE_VALUE>

#The oracle home location. This can be an existing Oracle Home or a new Oracle Home
# ORACLE_HOME=/home/Oracle/products/Oracle_Home
ORACLE_HOME=/home/oracle/Oracle/Middleware/myOracle_Home

#Set this variable value to the Installation Type selected. 
#e.g. Fusion Middleware Infrastructure, Fusion Middleware Infrastructure 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=
  1. 编辑 oraInst.loc,vim oraInst.loc
#Oracle Installer Location File Location
#Tue Sep 15 13:47:13 CST 2020
inst_group=oracle
inventory_loc=/home/oracle/oraInventory
  1. 将两份文件保存到某个路径,例如,mv wls.rsp /home/oracle/Documents/mv oraInst.loc /home/oracle/Documents/
  2. 运行脚本 java -jar fmw_12.2.1.3.0_wls.jar -silent -responseFile /home/oracle/Documents/wls.rsp -invPtrLoc /home/oracle/Documents/oraInst.loc
  3. 点击回车稍等即安装完成。
    在这里插入图片描述

四、配置域 参考博文

  • 从绝对路径复制模版 /home/oracle/Oracle/Middleware/Oracle_Home/wlserver/common/templates/scripts/wlst/basicWLSDomain.py
  • 修改模版仅留我们需要的属性。
#=======================================================================================
# Open a domain template.
#=======================================================================================

readTemplate("/home/oracle/Oracle/Middleware/Oracle_Home/wlserver/common/templates/wls/wls.jar")

#=======================================================================================
# Configure the Administration Server and SSL port.
#=======================================================================================

cd('Servers/AdminServer')
set('ListenAddress','')
set('ListenPort', 7001)

#=======================================================================================
# Define the user password for weblogic.
#=======================================================================================

cd('/')
cd('Security/base_domain/User/weblogic')
# Please set password here before using this script, e.g. cmo.setPassword('value')
cmo.setPassword('welcome1')

setOption('OverwriteDomain', 'true')
writeDomain('/home/oracle/Oracle/Middleware/Oracle_Home/user_projects/domains/basicWLSDomain')
closeTemplate()

#=======================================================================================
# Exit WLST.
#=======================================================================================

exit()
  • 运行环境脚本 ./home/oracle/Oracle/Middleware/Oracle_Home/oracle_common/common/bin/setWlstEnv.sh
  • 运行配置域脚本 /home/oracle/Oracle/Middleware/Oracle_Home/oracle_common/common/bin/wlst.sh /home/oracle/Documents/basicWLSDomain.py
  • 注意!稍等一会,这个地方只要没有报错,那就是成功配置好了域。
  • 在这个路径查看自己的域:/home/oracle/Oracle/Middleware/Oracle_Home/user_projects/domains
  • 这个路径下有很多脚本,其中就有包括启动 WebLogic 的:/home/oracle/Oracle/Middleware/Oracle_Home/user_projects/domains/basicWLSDomain/bin
  • 启动一下看看能不能打开控制台。运行脚本:bash startWebLogic.sh
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值