- 添加用户组和用户
groupadd weblogic
useradd -m -g weblogic weblogic
passwd weblogic
-
确定JAVA环境变量正常,为1.8;把weblog的jar包拷到指定目录,下面以/home/weblogic/为例
-
准备文件wls.rsp,oraInst.loc
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=/home/weblogic/oracle
#指定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=
oraInst.loc
inventory_loc=/home/weblogic/oraInventory
inst_group=weblogic
java -jar fmw_12.2.1.3.0_wls.jar -silent -responseFile /home/weblogic/wls.rsp -invPtrLoc /home/weblogic/oraInst.loc
- 设置weblogic的环境变量profile
export MW_HOME="/home/weblogic/oracle"
export WL_HOME="/home/weblogic/oracle/oracle_common"
- 创建domain(静默方式)
create_domains.py
readTemplate('/home/weblogic/oracle/wlserver/common/templates/wls/wls.jar')
cd('Servers/AdminServer')
set('ListenAddress','')
set('ListenPort', 7001)
cd('../..')
cd('Security/base_domain/User/weblogic')
cmo.setPassword('weblogic@2020')
setOption('OverwriteDomain', 'true')
setOption('ServerStartMode', 'prod')
writeDomain('/home/weblogic/oracle/user_projects/domains/base_domain')
closeTemplate()
exit()
进入目录:/home/weblogic/oracle/wlserver/common/
chmod +x create_domains.py
创建domain
./wlst.sh create_domains.py
- 接下来就可以进入对应的目录启动weblogic了。