配置Domain

  • 图形化界面:
    • [Windows] Windows菜单
    • [windows] config.cmd
    • [Unix/Linux] config.sh
  • 命令行界面:
    • [windows] config.cmd -mode=console
    • [Unix/Linux] config.sh -mode=console
  • 静默模式安装(需要使用WLST脚本)

 
 

配置一个Domain需要一个配置助手(需要提前按照
02-安装weblogic软件安装好weblogic),该配置助手实际上是一个脚本,放置在 <WEBLOGIC_HOME>/common/bin目录下。

  1. 图形化界面配置domains

    本节略,可参考:http://dead-knight.iteye.com/blog/1938629。

 
 

  1. Unix/Linux命令行界面

[root@wls1 ~]# /opt/weblogic/wlserver_10.3/common/bin/config.sh

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0

Unable to instantiate GUI, defaulting to console mode.

Java HotSpot(TM) 64-Bit Server VM warning: You have loaded library /opt/weblogic/wlserver_10.3/common/lib/libjni.so which might have disabled stack guard. The VM will try to fix the stack guard now.

It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.

 
 

<------------------- Fusion Middleware Configuration Wizard ------------------>

 
 

Welcome:

--------

 
 

Choose between creating and extending a domain. Based on your selection,

the Configuration Wizard guides you through the steps to generate a new or

extend an existing domain.

 
 

->1|Create a new WebLogic domain

| Create a WebLogic domain in your projects directory.

 
 

2|Extend an existing WebLogic domain

| Use this option to add new components to an existing domain and modify |configuration settings.

 
 

Enter index number to select OR [Exit][Next]> (模式1为新建一个域,模式2为扩展一个域,输入确认项默认为1)

 
 

<------------------- Fusion Middleware Configuration Wizard ------------------>

 
 

Select Domain Source:

---------------------

 
 

Select the source from which the domain will be created. You can create the

domain by selecting from the required components or by selecting from a

list of existing domain templates.

 
 

->1|Choose Weblogic Platform components

| You can choose the Weblogic component(s) that you want supported in

|your domain.

 
 

2|Choose custom template

| Choose this option if you want to use an existing template. This

|could be a custom created template using the Template Builder.

 
 

Enter index number to select OR [Exit][Previous][Next]> (模式1为选择weblogic提供的域模版,模式2使用自定义模版,输入确认默认选择1)

 
 

<------------------- Fusion Middleware Configuration Wizard ------------------>

 
 

Application Template Selection:

-------------------------------

Available Templates

|_____Basic WebLogic Server Domain - 10.3.6.0 [wlserver_10.3]x

|_____Basic WebLogic SIP Server Domain - 10.3.6.0 [wlserver_10.3] [2]

|_____WebLogic Advanced Web Services for JAX-RPC Extension - 10.3.6.0 [wlserver_10.3] [3]

|_____WebLogic Advanced Web Services for JAX-WS Extension - 10.3.6.0 [wlserver_10.3] [4]

 
 

Enter number exactly as it appears in brackets to toggle selection OR [Exit][Previous][Next]> (基础的weblogic domains,默认)

 
 

<------------------- Fusion Middleware Configuration Wizard ------------------>

 
 

Edit Domain Information:

------------------------

 
 

| Name | Value |

_|________|_____________|

1| *Name: | base_domain |

 
 

Enter value for "Name" OR [Exit][Previous][Next]> (输入确认键,默认,可自定义)

 
 

<------------------- Fusion Middleware Configuration Wizard ------------------>

 
 

Select the target domain directory for this domain:

---------------------------------------------------

 
 

"Target Location" = [Enter new value or use default

"/opt/weblogic/user_projects/domains"]

 
 

Enter new Target Location OR [Exit][Previous][Next]> /opt/wldomains/ (输入domains路径,我这选择/opt/wldomains)

 
 

<------------------- Fusion Middleware Configuration Wizard ------------------>

 
 

Configure Administrator User Name and Password:

-----------------------------------------------

 
 

Create a user to be assigned to the Administrator role. This user is the

default administrator used to start development mode servers.

 
 

| Name | Value |

_|_________________________|_________________________________________|

1| *Name: | weblogic |

2| *User password: | |

3| *Confirm user password: | |

4| Description: | This user is the default administrator. |

 
 

Use above value or select another option:

1 - Modify "Name"

2 - Modify "User password"

3 - Modify "Confirm user password"

4 - Modify "Description"

 
 

Enter option number to select OR [Exit][Previous][Next]> 2(输入2选择设置密码)

 
 

<------------------- Fusion Middleware Configuration Wizard ------------------>

 
 

Configure Administrator User Name and Password:

-----------------------------------------------

 
 

Create a user to be assigned to the Administrator role. This user is the

default administrator used to start development mode servers.

 
 

"*User password:" = []

 
 

Enter new *User password: OR [Exit][Reset][Accept]> !QAZ2wsx(密码)

 
 

<------------------- Fusion Middleware Configuration Wizard ------------------>

 
 

Configure Administrator User Name and Password:

-----------------------------------------------

 
 

Create a user to be assigned to the Administrator role. This user is the

default administrator used to start development mode servers.

 
 

| Name | Value |

_|_________________________|_________________________________________|

1| *Name: | weblogic |

2| *User password: | ******** |

3| *Confirm user password: | |

4| Description: | This user is the default administrator. |

 
 

Use above value or select another option:

1 - Modify "Name"

2 - Modify "User password"

3 - Modify "Confirm user password"

4 - Modify "Description"

5 - Discard Changes

 
 

Enter option number to select OR [Exit][Previous][Next]> 3(输入3选择重新输入密码,要和2一样。)

 
 

<------------------- Fusion Middleware Configuration Wizard ------------------>

 
 

Configure Administrator User Name and Password:

-----------------------------------------------

 
 

Create a user to be assigned to the Administrator role. This user is the

default administrator used to start development mode servers.

 
 

"*Confirm user password:" = []

 
 

Enter new *Confirm user password: OR [Exit][Reset][Accept]> !QAZ2wsx(输入密码)

 
 

<------------------- Fusion Middleware Configuration Wizard ------------------>

 
 

Configure Administrator User Name and Password:

-----------------------------------------------

 
 

Create a user to be assigned to the Administrator role. This user is the

default administrator used to start development mode servers.

 
 

| Name | Value |

_|_________________________|_________________________________________|

1| *Name: | weblogic |

2| *User password: | ******** |

3| *Confirm user password: | ******** |

4| Description: | This user is the default administrator. |

 
 

Use above value or select another option:

1 - Modify "Name"

2 - Modify "User password"

3 - Modify "Confirm user password"

4 - Modify "Description"

5 - Discard Changes

 
 

Enter option number to select OR [Exit][Previous][Next]>

 
 

<------------------- Fusion Middleware Configuration Wizard ------------------>

 
 

Domain Mode Configuration:

--------------------------

 
 

Enable Development or Production Mode for this domain.

 
 

->1|Development Mode

 
 

2|Production Mode

 
 

Enter index number to select OR [Exit][Previous][Next]> (输入确定键会选择默认项,1为开发模式,2为生产模式,生产上一定要选择生产模式。)

 
 

<------------------- Fusion Middleware Configuration Wizard ------------------>

 
 

Java SDK Selection:

-------------------

 
 

->1|Sun SDK 1.8.0_144 @ /opt/jdk1.8.0_144

2|Other Java SDK

 
 

Enter index number to select OR [Exit][Previous][Next]> (输入确定键会选择默认项,输入路径指定其他jdk)

 
 

<------------------- Fusion Middleware Configuration Wizard ------------------>

 
 

Select Optional Configuration:

------------------------------

 
 

1|Administration Server [ ]

2|Managed Servers, Clusters and Machines [ ]

3|RDBMS Security Store [ ]

 
 

Enter index number to select OR [Exit][Previous][Next]> (输入确定键会选择默认项,输入其他会进入各种管理模式。)

 
 

<------------------- Fusion Middleware Configuration Wizard ------------------>

 
 

Creating Domain...

 
 

0% 25% 50% 75% 100%

[------------|------------|------------|------------]

[***************************************************]

 
 

**** Domain Created Successfully! ****

  

 
 

  1. 静默模式安装

    静默模式的安装方式是使用WLST脚本来安装weblogic,所以需要熟悉WLST脚本。当然也可以按照本文示例来安装。

    本节参考:https://segmentfault.com/a/1190000006795936

    1. 复制/opt/weblogic/wlserver_10.3/common/templates/scripts/wlst/basicWLSDomain.py到当前目录,并重命名为ExampleDomain.py ,该文件将作为创建当前域的脚本文件。
    2. 修改脚本

      打开 ExampleDomain.py 文件,按照以下代码所示,删除多余的配置并修改该脚本文件:

# Weblogic Domain Template

# Use Basic Domain Template

readTemplate("/opt/weblogic/wlserver_10.3/common/templates/domains/wls.jar")

 
 

# Config AdminServer Listen Address and Port

cd('Servers/AdminServer')

set('ListenAddress','')

set('ListenPort', 7001)

 
 

# Config username and password of Console User

cd('/')

# 'Security/base_domain/User/weblogic' The 'weblogic' is username

cd('Security/base_domain/User/weblogic')

cmo.setPassword('!QAZ2wsx')

 
 

# If the domain already exists, overwrite the domain

setOption('OverwriteDomain', 'true')

# Config home directory for the JVM to be used when starting the weblogic server

setOption('JavaHome', '/opt/java')

# Config the Domain folder path

writeDomain('/opt/wldomains/base_domains')

 
 

# Close Template

closeTemplate()

 
 

# Exit script

exit()

  1. 脚本流程
  • 使用readTemplate函数读取建域模版脚本,Weblogic预置了多种建域脚本,我们仅使用最基础的建域脚本即可。
  • 设置AdminServer的监听地址和端口号,ListenAddress为监听地址,默认为''表示监听所有本机地址;ListenPort为监听端口号,这里根据实际情况设置,不冲突即可。
  • 设置用户名密码,'Security/base_domain/User/weblogic'中weblogic就是用户名,cmo.setPassword('!QAZ2wsx')用于将密码设置为!QAZ2wsx。
  • 设置域参数:OverwriteDomain设置为覆盖已有域文件;JavaHome设置Weblogic域运行时用到的JVM 。
  • 设置域路径并写入,使用writeDomain函数设置待写入的域路径,并执行写入过程。
  • 使用closeTemplate函数在执行完域写入后关闭域模版。
  • 使用exit函数退出脚本。
  1. 执行 WLST 建域脚本

    进入ExampleDomain.py脚本所在目录,执行如下命令,通过WLST脚本创建域:

    首先执行以下命令设置临时环境变量,用于解决创建域过程过慢问题:(centos 7中并没有该文件/dev/urandom)

$ export CONFIG_JVM_ARGS='-Djava.security.egd=file:/dev/urandom'

然后执行建域脚本:

[root@wls1 ~]# /opt/weblogic/wlserver_10.3/common/bin/wlst.sh ExampleDomain.py

 
 

CLASSPATH=/opt/weblogic/patch_wls1036/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/opt/weblogic/patch_ocp371/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/opt/jdk1.8.0_144/lib/tools.jar:/opt/weblogic/wlserver_10.3/server/lib/weblogic_sp.jar:/opt/weblogic/wlserver_10.3/server/lib/weblogic.jar:/opt/weblogic/modules/features/weblogic.server.modules_10.3.6.0.jar:/opt/weblogic/wlserver_10.3/server/lib/webservices.jar:/opt/weblogic/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/opt/weblogic/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar::/opt/weblogic/utils/config/10.3/config-launch.jar::/opt/weblogic/wlserver_10.3/common/derby/lib/derbynet.jar:/opt/weblogic/wlserver_10.3/common/derby/lib/derbyclient.jar:/opt/weblogic/wlserver_10.3/common/derby/lib/derbytools.jar::

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0

 
 

Initializing WebLogic Scripting Tool (WLST) ...

 
 

Welcome to WebLogic Server Administration Scripting Shell

 
 

Type help() for help on available commands

 
 

Exiting WebLogic Scripting Tool.

 
 

Weblogic domains已经配置完成。

Weblogic domain目录说明:

目录

描述

/opt/wldomains/base_domain

webLogic 域路径

├── autodeploy

自动部署目录,在开发模式下,将EJB、ear等包复制在该目录下会自动部署。

├── bin

可执行脚本路径,用来管理启动和停止weblogic domain中的管理服务器和受管服务器。

├── config

配置文件路径,包含当前域的配置和部署状态,主要配置文件config.xml

├── console-ext

控制的扩展

├── init-info

域的初始化信息

├── lib

jar包,weblogic域每次启动时都会调用该文件夹下的jar包。必须放在CLASSPATH变量下。

├── pengding

此目录包含表示已请求但尚未激活的配置更改的域配置文件。激活配置更改后,将从此目录中删除这些配置文件。

├── security

域安全相关的文件

├── servers

配置的每一个server

│   ├── server-name

每配置一个server都会在该路径下生成一个server名相关的文件。

│   │   ├── cache

Server-name 的
缓存数据目录

│   │   ├── data

用于存放Server-name的持久性状态的文件。

│   │   │   ├── ldap

用于存放嵌入式LDAP数据库,weblogic server实例的运行时安全状态持久保存在此目录中。

│   │   │   └── stopre

存放weblogic持久性存储

│   │   ├── logs

存放日志和诊断信息

│   │   ├── security

存放与安全相关的文件,最常见用于存放受管服务器连接管理服务器的帐号密码boot.properties文件。

│   │   └── tmp

用于存放临时文件

└── startWebLogic.sh

启动脚本,实际是调用bin目录下的启动脚本。

 
 

03-02_配置weblogic domain的更多相关文章

  1. weblogic domain creation

    管理服务器 URL: http://CICI-ThinkPad:7001 Domain Path: D:\Program Files\DEV\Oracle\Middleware\user_projec ...

  2. Linux下,安装配置Weblogic

    环境说明 系统 -- Linux RHEL5 32bit 环境 -- 局域网中在192.168.0.140(windows)通过xshell连接服务器 软件 -- 1.JDK:1.5.0_15  2. ...

  3. WebLogic的安装和配置以及MyEclipse中配置WebLogic

    WebLogic 中间件: 是基础软件的一大类,属于可复用软件的范畴,顾名思义,中间件属于操作系统软件与应用软件的中间,比如:JDK,框架,weblogic. weblogic与tomcat区别 : ...

  4. 配置WebLogic的详细步骤

    配置WebLogic的详细步骤 1.安装好WebLogic后,进入配置阶段,点击"Getting started with WebLogic Server 10.3.6" 2.进入 ...

  5. 【CAS单点登录视频教程】 第03集 -- 配置 tomcat的 ssl

    目录 ----------------------------------------- [CAS单点登录视频教程] 第06集[完] -- Cas认证 学习 票据认证FormsAuthenticati ...

  6. IDEA工具配置weblogic

    1.首先打开IDEA,点击Run-Edit Configurations… 2.配置weblogic页面 2.1点击“+”号,选WeblogicServer-local 2.2红框的是新添加的服务,起 ...

  7. 03-03_启动weblogic domain

    本文重点: 直接启动weblogic 控制台访问 weblogic概念及手工启动脚本分析 启动weblogic 启动admin Server做了哪些事情     一.直接启动weblogic [roo ...

  8. 20151208_使用windows2012配置weblogic节点管理器

    经过实践,weblogic节点管理器的作用主要有两点: 1.可通过weblogic控制台远程控制被管server启停. 2.可以自动重启被管server的进程,并且对spring框架提供比直接启动更快 ...

  9. myeclipse 配置weblogic

    1.打开myeclipse,选择Window -> Preferences--->MyEclipse--->servers 2.点击servers---->weblogic-- ...

随机推荐

  1. vue2.0+Element-ui实战案例

    前言 我们将会选择使用一些 vue 周边的库vue-cli, vue-router,axios,moment,Element-ui搭建一个前端项目案例,后端数据接口,会使用json-server快速搭 ...

  2. 装饰者模式——Java设计模式

    装饰模式 1.概念 动态地为对象附加上额外的职责 其目的是包装一个对象,从而可以在运行时动态添加新的职责.每个装饰器都可以包装另一个装饰器,这样理论上来说可以对目标对象进行无限次的装饰. 2.装饰器类 ...

  3. golang实现unicode码和中文之间的转换

    将中文转换为unicode码,使用golang中的strconv包中的QuoteToASCII直接进行转换,将unicode码转换为中文就比较麻烦一点,先对unicode编码按\u进行分割,然后使用s ...

  4. Spring IOC 源码之ResourceLoader

    转载自http://www.blogjava.net/DLevin/archive/2012/12/01/392337.html 在<深入Spring IOC源码之Resource>中已经 ...

  5. logstash与kafka消息传输<一>

    1.版本: logstash6.1.2.kafka-0.11.kafka-0.8.2.java1.8 Note: Logstash requires Java 8. Java 9 is not sup ...

  6. Eclipse和Myeclipse的Properties插件(解决properties文件乱码)

    资源链接:链接:https://pan.baidu.com/s/13M2ovUUXLfOENFoD17MLng 密码:zvo9 插件安装: 解压后得到features.Plugins两个文件将他们放入 ...

  7. Linux下Nginx访问web目录提示403Forbidden

    在Linux下http服务器nginx时,访问web目录提示403 Forbidden,首先需要了解nginx出现403错误是什么意思: 403 Forbidden表示你在请求一个资源文件但是ngin ...

  8. 解决使用vue-cli生成项目后项目地址自动添加#号的问题

    vue-router官网https://router.vuejs.org/zh/guide/ vue的路由在默认的hash模式下,url会带有一个#,不美观,而且在微信分享,授权登录等都会有一些坑.所 ...

  9. ArcGIS紧凑型切片读取与应用2-webgis动态加载紧凑型切片(附源码)

    1.前言 上篇主要讲了一下紧凑型切片的的解析逻辑,这一篇主要讲一下使用openlayers动态加载紧凑型切片的web地图服务. 2.代码实现 上篇已经可以通过切片的x.y.z得对应的切片图片,现在使用 ...

  10. 原本在滴滴只负责批100万元以上开支的Leslie决定,ofo所有30万元以上的开支都要由她亲自过目。那段时间,他“天天晚上12点才下班,眼睛都熬红了”

    戴威即将28岁了,熟悉他的人更愿意用“孩子”来形容他. 这样的特质,在追随者眼中,是天真.纯粹.理想主义:在合作伙伴眼中,是倔强高傲.不可一世:在投资人眼中,则是任性狂妄,一味蒙眼狂奔.他像个无意间闯 ...