Weblogic12c:使用脚本方式创建域

官方文档参考

通常我们会使用
BEA_HOME/oracle_common/common/bin/config.sh至少在Windows下我们是这样操作的
但是,今天我遇到这样的一个问题,在ssh到一台linux服务器上面时。运行此指令,日志报错

错误信息如下:

2017-10-20 11:10:15,187 严重    [11] com.oracle.cie.wizard.internal.engine.WizardControllerEngine - Wizard error cause
java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
        at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:207)
        at java.awt.Window.(Window.java:535)
        at java.awt.Frame.(Frame.java:420)
        at java.awt.Frame.(Frame.java:385)
        at javax.swing.JFrame.(JFrame.java:180)
        at com.oracle.cie.wizard.internal.cont.GUIContext.initGUI(GUIContext.java:1312)
        at com.oracle.cie.wizard.internal.cont.GUIContext.setupGUI(GUIContext.java:1051)
        at com.oracle.cie.wizard.internal.cont.GUITaskContainer$MethodRunner.run(GUITaskContainer.java:178)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:302)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
        at java.awt.EventQueue.access$200(EventQueue.java:103)
        at java.awt.EventQueue$3.run(EventQueue.java:694)
        at java.awt.EventQueue$3.run(EventQueue.java:692)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

这似乎是因为我当前机器没有图形界面接口(没有显示器设备)

所以这里我要介绍另一种安装方式:模板创建域
首先这个模板安装方式要使用WebLogic Scripting Tool (WLST)

执行BEA_HOME/oracle_common/common/bin/wlst.sh
进入,等待指令


Initializing WebLogic Scripting Tool (WLST) ...

Jython scans all the jar files it can find at first startup. Depending on the system, this process may take a few minutes to complete, and WLST may not return a prompt right away.

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

wls:/offline> 

当然这样似乎更加麻烦,实际上可以使用一个wlst.sh+python脚本,轻松搞定一个域的创建过程

那么问题来了:python脚本怎么写??
答:参照BEA_HOME/wlserver/common/templates/scripts/wlst/*.py

如 basicWLSDomain.py

你可能感兴趣的:(weblogic,Linux运维)