zoukankan      html  css  js  c++  java
  • 启动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文件 ,并且重启动一次后,密码变为密文,这样更加安全可靠。
  • 相关阅读:
    ruby on rails爬坑(三):图片上传及显示
    js 实现图片实时预览
    Rails中的content_tag与concat用法,可以连接任意html元素
    rspec中的shared_examples与shared_context有什么不同
    RSpec shared examples with template methods
    How to Test Controller Concerns in Rails 4
    JMeter压力测试入门教程[图文]
    京东后台图片优化技巧
    程序猿,千万别说你不了解Docker!
    DIV+CSS:页脚永远保持在页面底部
  • 原文地址:https://www.cnblogs.com/lcword/p/7833139.html
Copyright © 2011-2022 走看看