1) Create the python script wls_prod_domain.py with below content
----------------------------------------------------------------------------------------------------------
# Select the template to use for creating the domain
selectTemplate('Basic WebLogic Server Domain','12.2.1.1')
loadTemplates()
# Set the listen address and listen port for the Administration Server
cd('/Servers/AdminServer')
set('ListenAddress','192.168.142.128')
set('ListenPort',7001)
#Enable SSL on the Administration Server and set the SSL listen address and Port
create('AdminServer','SSL')
cd('SSL/AdminServer')
set('Enabled','false')
set('ListenPort', 7002)
# Set the domain password for the WebLogic Server administration user
cd('/')
cd('Security/base_domain/User/weblogic')
cmo.setPassword('welcome1')
# If the domain already exists, overwrite the domain
setOption('OverwriteDomain','true')
# write the domain and close the template
writeDomain('/oracle/Middleware/user_projects/domains/prod_domain')
closeTemplate()
exit()
---------------------------------------------------------------------------------------------------------------
# Select the template to use for creating the domain
selectTemplate('Basic WebLogic Server Domain','12.2.1.1')
loadTemplates()
# Set the listen address and listen port for the Administration Server
cd('/Servers/AdminServer')
set('ListenAddress','192.168.142.128')
set('ListenPort',7001)
#Enable SSL on the Administration Server and set the SSL listen address and Port
create('AdminServer','SSL')
cd('SSL/AdminServer')
set('Enabled','false')
set('ListenPort', 7002)
# Set the domain password for the WebLogic Server administration user
cd('/')
cd('Security/base_domain/User/weblogic')
cmo.setPassword('welcome1')
# If the domain already exists, overwrite the domain
setOption('OverwriteDomain','true')
# write the domain and close the template
writeDomain('/oracle/Middleware/user_projects/domains/prod_domain')
closeTemplate()
exit()
---------------------------------------------------------------------------------------------------------------
3) Start the weblogic server using below command
cd /oracle/Middleware/user_projects/domains/prod_domain/bin
nohup ./startWebLogic.sh &
This really helped me! Thank you for sharing!
ReplyDelete