# 调用WLST来执行.py脚本
# source /$DOMAIN_HOME/bin/setDomainEnv.sh
# java weblogic.WLST xxx.py

# Read the template to use for creating the domain
readTemplate(‘oracle_home/middleware/wlserver/common/templates/wls/wls.jar’)

# Set the listen address and listen port for the Administration Server
cd(‘Servers/AdminServer’)
set(‘ListenAddress’,”)
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’, ‘True’)
set(‘ListenPort’, 7002)

# Set the domain password for the WebLogic Server administration user
cd(‘/’)
cd(‘Security/base_domain/User/’adminusername’)
cmo.setPassword(‘adminpassword’)

# If the domain already exists, overwrite the domain
setOption(‘OverwriteDomain’, ‘true’)

# write the domain and close the template
writeDomain(‘/domains/mydomain’)
closeTemplate()

exit()

廣告