启动weblogic域不需要输入密码设置方法

一、问题描述与分析
    部署完WEBLOGIC后,在每次启动时执行./startWebLogic.sh脚本时,都会停在输入用户名与密码这里,相当不方便。所以要做到启动过程不输入密码有两种做法,见下面实例。

二、实验过程
A. 修改WebLogic的启动脚本,即修改startWebLogic.sh,增加用户名(weblogic)与密码(password),步骤如下:

1. 进入WLS_HOME/bin目录
[wls06@wls bin]$ pwd
/home/wls06/base_domain/bin

2. 在startWebLogic.sh执行脚本中加入用户名与密码,并保存退出
[wls06@wls bin]$ vi startWebLogic.sh

WLS_USER="weblogic"
export WLS_USER
WLS_PW="password"
export WLS_PW

3. 重新启动WebLogic服务
[wls06@wls bin]$ ./startWebLogic.sh &

B. 将用户名和密码保存到/home/wls06/base_domain/servers/AdminServer/security/boot.properties文件中,security文件夹需要新建,步骤如下:

1. 进入WLS_HOME/base_domain/servers/AdminServer目录
[wls06@wls security]$ cd /home/wls06/base_domain/servers/AdminServer
[wls06@wls security]$ pwd
/home/wls06/base_domain/servers/AdminServer

2. 创建security目录,并进入
[wls06@wls security]$ mkdir security
[wls06@wls security]$ cd security

3. 创建boot.properties文件编辑后保存退出
[wls06@wls security]$ vi boot.properties 
username=weblogic
password=password

4. 重新启动WebLogic服务(此处忽略停WebLogic服务)
[wls06@wls bin]$ ./startWebLogic.sh &

启动过程中日志:
<Sep 23, 2015 4:10:58 PM CST> <Notice> <Security> <BEA-090083> <Storing boot identity in the file: /home/wls02/base_domain/base_domain/servers/AdminServer/security/boot.properties>
<Sep 23, 2015 4:11:43 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY>
<Sep 23, 2015 4:11:43 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>


5. 再次检查boot.properties文件,发现用户名与密码已经做过加密处理
[wls02@test1 security]$ cat boot.properties
#Wed Sep 23 16:10:59 CST 2015
password={AES}Fl/BKG+a166kZkR/m7gOL+hMhPF9JACWZLvxo5fFC4c\=
username={AES}e/zSyaDEsl6eBx0tVIBj7ISnhcN1wu3nw1dLPLBC2qA\=


三、总结
   Weblogic在安装部署后,每次启动输入密码的做法很少见,使用上述两种方法可以解决,通常会选用第二种做法boot.properties文件 ,并且重启动一次后,密码变为密文,这样更加安全可靠。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26148431/viewspace-1812420/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/26148431/viewspace-1812420/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值