依然饭跑跑 发表于 2017-2-18 09:57:14

加密weblogic 用户名和口令到文件 来避免在脚本中使用硬编码来实现对资源的访问

1. 进入目录


for example -
cd /opt/appsvr/product/wls_103/user_projects/domains/mydomain


2. 启动脚本工具 WLST


java weblogic.WLST
wls:/offline>


3. 连接节点管理器和weblogic服务器


nmConnect("weblogic","webl0gic","localhost","5557","mydomain","/opt/appsvr/product/wls_103/user_projects/domains/mydomain","plain")


connect('weblogic','webl0gic', localhost.com:7001')


4. 运行如下命令产生密钥文件,注意修改相应的目录


wls:/offline> storeUserConfig('/opt/appsvr/product/wls_103/user_projects/domains/mydomain/configfile.secure', '/opt/appsvr/product/wls_103/user_projects/domains/mydomain /keyfile.secure')

5.怎么使用这些密钥文件–


连接节点管理器


nmConnect (userConfigFile='/opt/appsvr/product/wls_103/user_projects/domains/mydomain/configfile.secure',userKeyFile='/opt/appsvr/product/wls_103/user_projects/domains/mydomain/keyfile.secure',host='localhost',port='5557',domainName='mydomain',domainDir='/opt/appsvr/product/wls_103/user_projects/domains/mydomain',nmType='plain')


连接weblogic服务器


connect(userConfigFile='/opt/appsvr/product/wls_103/user_projects/domains/mydomain/configfile.secure',userKeyFile='/opt/appsvr/product/wls_103/user_projects/domains/mydomain/keyfile.secure',url='localhost':7001')
页: [1]
查看完整版本: 加密weblogic 用户名和口令到文件 来避免在脚本中使用硬编码来实现对资源的访问