启动weblogic域不需要输入密码设置方法
分类: IT综合技术
一、问题描述与分析
部署完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文件 ,并且重启动一次后,密码变为密文,这样更加安全可靠。
分类:
oracle
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?