Create Weblogic Domain Silently

In this post, I will talk about silently creating a weblogic domain after the weblogic install.
You will need existing wlst.sh and the python script to do so.

/u01/Oracle/Middleware/Oracle_IDM1/common/bin/wlst.sh /u01/tmp/create_domain.py > /u01/logs/create_domain.log

---------------------------------SAMPLE--CREATE-DOMAIN-SCRIPT--------------------------

#!/usr/bin/python

import os, sys
# Replace MW_HOME with Middleware Home Path
readTemplate(r'/u01/oracle/Middleware/wlserver_10.3/common/templates/domains/wls.jar')
cd(r'/Security/base_domain/User/weblogic')
# Enter Password for Weblogic Admin User
cmo.setPassword('password')
cd(r'/Server/AdminServer')
cmo.setName('AdminServer')
# Enter Weblogic Listen Port No.
cmo.setListenPort(14000)
# Enter HostName
cmo.setListenAddress('localhost')
create('AdminServer','SSL')
cd('SSL/AdminServer')
cmo.setEnabled(true)
# Enter Weblogic SSL Listen Port No.
cmo.setListenPort(14001)
cmo.setHostnameVerificationIgnored(true)
cmo.setHostnameVerifier(None)
cmo.setTwoWaySSLEnabled(false)
cd('/')
cmo.setProductionModeEnabled(true)
# Enter the DOMAIN_HOME PATH
writeDomain(r'/u01/oracle/Middleware/user_projects/IAMDomain')
closeTemplate()
exit()

Comments

Popular posts from this blog

OIM 11g R2 PS2 : SOA Approval Workflow Sample

OHS 12c (12.1.3) webgate deployment and configuration

Oracle Identity Manager (OIM) Interview Questions