Creating Domain by Using WLST
Classpath to run WLST in UNIX
To run the WLST on UNIX environemnt we need to point the CLASSPATH environment variable to weblogic.jar and rt.jar.
Set the .profile as shown below:
export CLASSPATH=
/export/home/wluser/bea/jdk150_10/jre/lib/rt.jar:
/export/home/wluser/bea/weblogic92/server/lib/weblogic.jar
NOW TYPE IN VI EDITOR THE FOLLOWING WLST CODE:
#========================================================================== # Create a domain from the weblogic domain template. #================================================================= readTemplate('/export/home/wlsuser/bea/weblogic92/common/templates/domains/wls.jar') cd('Servers/AdminServer') #================================================================= # Configure the Administration Server #================================================================= set('ListenAddress',''WLADMINIP'') set('ListenPort', 9913) #================================================================= # Define the password for user weblogic. You must define the password before you # can write the domain. #================================================================= cd('/') cd('Security/base_domain/User/weblogic') cmo.setPassword(AdminServerPassword) # - OverwriteDomain: Overwrites domain, when saving, if one exists. setOption('OverwriteDomain', 'true') #================================================================= # Write the domain, close the domain template and exit from the WLST #================================================================= writeDomain('/export/home/wlsuser/domains/wlsdom') closeTemplate() exit()