191145692 发表于 2017-2-15 12:20:50

Using weblogic.WLST to create userConfigFile and userConfigKey

  Weblogic provide script tool to create userConfigFile and userConfigKey, that encrypt the current user login and password, can be used by auto_deploy tools.
  1. Set domain variable:

cd ${DOMAIN_HOME}/bin
source setDomainEnv.sh
   2. Invoke WLST:
  


java weblogic.WLST
 
    3. Generate user config and user key
  connect(<admin_username>,<admin_password>,<admin_url>)
  eg.

connect('weblogic','weblogic1','t3://localhost:7101')
  Note:


[*]all parameters enclosed by single quotes(' ') 
[*]should be use t3 protocol
  4. Store the user information
  storeUserConfig(<location_of_user_config_file>,<location_of_user_key_file>)
  eg.
  


storeUserConfig('localConfigFile','localUserKey')
   5. exit WLST

exit()
  6. connect to weblogic using configuration file and key file


connect(userConfigFile='localConfigFile',userKeyFile='localUserKey')
   7. Set weblogic.userConfigFile and weblogic.userKeyFile properties in build.properties based on your settings
  


#Location of stored weblogic user config file.
weblogic.userConfigFile=localConfigFile
#Location of stored weblogic user key file.
weblogic.userKeyFile=localUserKey
   8. Put the config file and user key as parameters. then it will use the current user login and password.
  


<target name="configure.jms">
<java classname="weblogic.WLST" fork="true" failonerror="true">
<classpath>
<pathelement location="${fusion.middleware.home}/wlserver_10.3/server/lib/weblogic.jar"/>
</classpath>
<arg line="configJMS.py ${weblogic.adminurl} ${sifagent.weblogic.server} ${weblogic.userConfigFile} ${weblogic.userKeyFile}"/>
</java>
</target>
 
页: [1]
查看完整版本: Using weblogic.WLST to create userConfigFile and userConfigKey