1.创建domain

[ls@ls ~]$ cd /weblogic/wlserver_10.3/common/bin/                                     #进入创建文件所在目录
[ls@ls bin]$ ./config.sh #执行创建脚本
Unable to instantiate GUI, defaulting to console mode. <------------------- 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]> #回车 <------------------- 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]> #回车 <------------------- 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]> <------------------- Fusion Middleware Configuration Wizard ------------------> Edit Domain Information:
------------------------ | Name | Value |
_|________|_____________|
1| *Name: | base_domain | Enter value for "Name" OR [Exit][Previous][Next]> ls_domain #直接输入domain名称 <------------------- Fusion Middleware Configuration Wizard ------------------> Edit Domain Information:
------------------------ | Name | Value |
_|________|___________|
1| *Name: | ls_domain | Use above value or select another option:
1 - Modify "Name"
2 - Discard Changes Enter option number to select OR [Exit][Previous][Next]> #回车确定名称 <------------------- Fusion Middleware Configuration Wizard ------------------> Select the target domain directory for this domain:
--------------------------------------------------- "Target Location" = [Enter new value or use default
"/weblogic/user_projects/domains"] Enter new Target Location OR [Exit][Previous][Next]> #回车确定domain目录 <------------------- 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]> 1 <------------------- 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. | Enter value for "Name" OR [Exit][Previous][Next]> ls #输入用户名 <------------------- 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: | ls |
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]> 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]> abcd1234 #输入密码 <------------------- 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: | ls |
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再次输入密码 <------------------- 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]> abcd1234 #再次输入密码 <------------------- 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: | ls |
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]> 2 <------------------- Fusion Middleware Configuration Wizard ------------------> Java SDK Selection:
------------------- ->1|Sun SDK 1.6.0_105 @ /opt/jdk1.6.0_105
2|Other Java SDK Enter index number to select OR [Exit][Previous][Next]> #回车,默认是安装weblogic时给的密码 <------------------- 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]> 1 #输入1 <------------------- Fusion Middleware Configuration Wizard ------------------> Select Optional Configuration:
------------------------------ 1|Administration Server [x]
2|Managed Servers, Clusters and Machines [ ]
3|RDBMS Security Store [ ] Enter index number to select OR [Exit][Previous][Next]> #回车确认 <------------------- Fusion Middleware Configuration Wizard ------------------> Configure the Administration Server:
------------------------------------ Each WebLogic Server domain must have one Administration Server. The
Administration Server is used to perform administrative tasks. | Name | Value |
_|__________________|_____________________|
1| *Name: | AdminServer |
2| *Listen address: | All Local Addresses |
3| Listen port: | 7001 |
4| SSL listen port: | N/A |
5| SSL enabled: | false | Use above value or select another option:
1 - Modify "Name"
2 - Modify "Listen address"
3 - Modify "Listen port"
4 - Modify "SSL enabled" Enter option number to select OR [Exit][Previous][Next]> 1 #输入1,修改server名 <------------------- Fusion Middleware Configuration Wizard ------------------> Configure the Administration Server:
------------------------------------ Each WebLogic Server domain must have one Administration Server. The
Administration Server is used to perform administrative tasks. | Name | Value |
_|__________________|_____________________|
1| *Name: | AdminServer |
2| *Listen address: | All Local Addresses |
3| Listen port: | 7001 |
4| SSL listen port: | N/A |
5| SSL enabled: | false | Enter value for "Name" OR [Exit][Previous][Next]> lsAdm #输入server名 <------------------- Fusion Middleware Configuration Wizard ------------------> Configure the Administration Server:
------------------------------------ Each WebLogic Server domain must have one Administration Server. The
Administration Server is used to perform administrative tasks. | Name | Value |
_|__________________|_____________________|
1| *Name: | lsAdm |
2| *Listen address: | All Local Addresses |
3| Listen port: | 7001 |
4| SSL listen port: | N/A |
5| SSL enabled: | false | Use above value or select another option:
1 - Modify "Name"
2 - Modify "Listen address"
3 - Modify "Listen port"
4 - Modify "SSL enabled"
5 - Discard Changes Enter option number to select OR [Exit][Previous][Next]> 3 #输入3,修改控制台监听端口 <------------------- Fusion Middleware Configuration Wizard ------------------> Configure the Administration Server:
------------------------------------ Each WebLogic Server domain must have one Administration Server. The
Administration Server is used to perform administrative tasks. | Name | Value |
_|__________________|_____________________|
1| *Name: | lsAdm |
2| *Listen address: | All Local Addresses |
3| Listen port: | 7001 |
4| SSL listen port: | N/A |
5| SSL enabled: | false | Enter value for "Listen port" OR [Exit][Previous][Next]> 9000 #输入监听端口 <------------------- Fusion Middleware Configuration Wizard ------------------> Configure the Administration Server:
------------------------------------ Each WebLogic Server domain must have one Administration Server. The
Administration Server is used to perform administrative tasks. | Name | Value |
_|__________________|_____________________|
1| *Name: | lsAdm |
2| *Listen address: | All Local Addresses |
3| Listen port: | 9000 |
4| SSL listen port: | N/A |
5| SSL enabled: | false | Use above value or select another option:
1 - Modify "Name"
2 - Modify "Listen address"
3 - Modify "Listen port"
4 - Modify "SSL enabled"
5 - Discard Changes Enter option number to select OR [Exit][Previous][Next]> #回车确认 <------------------- Fusion Middleware Configuration Wizard ------------------> Creating Domain... 0% 25% 50% 75% 100%
[------------|------------|------------|------------]
[***************************************************] **** Domain Created Successfully! **** [ls@ls bin]$

2.设置启动用户名密码文件boot.properties

weblogic可以将应用部署在控制台的server上(本配置中是上一步骤中建的lsAdm),在本配置中将另建立一个受控server--lsApp11(控制台server在上一步中用命令创建,受控server不需要命令建直接写文件就行)

在ls_domian主目录下执行(将其中的in后改为自己所要创的server,username和password改成自己在上一步设定的控制台用户名和密码):

for var_domain in lsAdm lsApp11
do
mkdir -p servers/$var_domain/security
cat > servers/$var_domain/security/boot.properties << EOF
username=ls
password=abcd1234
EOF
done

3.设置配置脚本setDomainEnv.sh

主要是设置weblogic的占用内存(要视机器具体情况修改)和java选项:

cd bin
sed -i 's/WLS_MEM_ARGS_64BIT=\"-Xms256m -Xmx512m\"/WLS_MEM_ARGS_64BIT=\"-Xms2048m -Xmx2048m\"/' setDomainEnv.sh
sed -i 's/MEM_MAX_PERM_SIZE_64BIT=\"-XX:MaxPermSize=256m\"/MEM_MAX_PERM_SIZE_64BIT=\"-XX:MaxPermSize=512m\"/' setDomainEnv.sh
sed -i 's/JAVA_OPTIONS=\"${JAVA_OPTIONS}\"/JAVA_OPTIONS=\"${JAVA_OPTIONS} -Djava.net.preferIPv4Stack=true\"/' setDomainEnv.sh

如果页面中文乱码,在JAVA_OPTIONS再追加选项-Duser.language=zh -Duser.region=CN -Dfile.encoding=GBK

4.设置启动脚本

startman.sh/stopman.sh中要注意修改server名、控制台IP和控制台端口

cat > startadm.sh <<EOF
nohup ./startWebLogic.sh & > /dev/null &
EOF cat > stopadm.sh <<EOF
./stopWebLogic.sh
EOF cat > startman.sh << EOF
nohup ./startManagedWebLogic.sh lsApp11 t3://193.168.220.128:9000 &>/dev/null &
EOF cat > stopman.sh << EOF
./stopManagedWebLogic.sh lsAapp11 t3://192.168.220.128:9000
EOF chmod u+x *.sh

5.启动控制台并添加受控服务器

./startadm.sh

说明:如果启动不成功那么直接使用./startWeblogic.sh来查看输出日志

控制台启动错误: java.lang.AssertionError: Could not obtain the localhost address

解决方法:此错误一般是没将主机名和IP对应关系写入/etc/hosts文件所致,在/etc/hosts中追加“IP--hostname”组即可(至于是只加127.0.0.1就行还是所有Ip都得加没还没确认,建议全加)

受控服务器启动错误:The server name lsApp11 specified with -Dweblogic.Name does not exist. The configuration includes the following servers {lsAdm}

解决方法:受控服务器要先到控制台中建立,否则启动报此错

默认控制台地址:http://192.168.220.128:9000/console

说明:有时控制启动后直接以192.168.220.128:9000/console不能访问,那是浏览器没自动加上http://手动加上访问即可

启动受控服务器:

./startman.sh

6.修改日志等配置【优化步骤,可选】

修改控制台地址和会话超时时间(控制台重启后地址变为http://192.168.220.128:9000/csl)

修改domain日志配置

修改一般信息日志配置

修改http日志配置;http会产生大量日志所以一般不启用

修改数据源日志配置

对于控制台server(这里是lsAdm)和所有受控server(这里是lsApp11)都要如此配置“一般信息”、“HTTP”和“数据源”三项。

至此weblogic创建domain并配置已经完成,重启受控服务器和控制台服务器使配置生效即可。

weblogic创建domain教程的更多相关文章

  1. 实战weblogic集群之创建domain,AdminServer

    在weblogic安装完后,接下来就可以创建domain,AdminSever了. 第1步: $ cd /app/sinova/Oracle/wlserver_10./common/bin $ ./c ...

  2. WebLogic Developer版创建domain

    1.直接在cmd命令窗口中运行%MW_HOME%目录下的configure.cmd文件,这个过程会解压一些jar文件,知道提示是否配置domain: 2.可以通过执行%MW_HOME%\oracle_ ...

  3. Linux下Weblogic创建域方法和步骤

    Weblogic 创建域 以weblogic帐号登录(与创建域目录相对应账户) cd /home/weblogic/bea/weblogic92/common/bin 执行./config.sh进入配 ...

  4. weblogic配置domain和删除domain

    weblogic创建域的过程比较简单,但是在创建域之前一定要注意不能存在重名的domain. Domain简单定义为:是一个逻辑管理单元,Domain下面包含着weblogic应用服务器中的所有东西, ...

  5. hibernate(四)__由表逆向创建Domain对象和对象关系映射文件

    之前我们是手写Domain对象和对象关系映射文件->然后生成数据库中的Table. 现在我们反过来先在数据库中建好Table->然后用工具生成Domain对象和对象关系映射文件. 步骤: ...

  6. WebLogic使用总结(六)——WebLogic创建虚拟主机和修改启动端口号

    一.在WebLogic中创建一个虚拟主机 找到虚拟主机面板,如下图所示:

  7. weblogic创建域生产模式,输入用户名闪退

    weblogic创建域,生产模式,报错 <2017-12-29 下午04时53分59秒 CST> <Info> <Security> <BEA-090065& ...

  8. Altium 中异形焊盘异形封装的创建图文教程

    Altium 中异形焊盘异形封装的创建图文教程 一般不规则的焊盘被称为异型焊盘,典型的有金手指.大型的器件焊盘或者板子上需要添加特殊形状的铜箔(可以制作一个特殊封装代替). 如图27所示,此处我们以一 ...

  9. Oracle创建用户教程

    计算机-->管理-->应用程序与服务-->(OracleOraDb11g_home1TNSListener 和 OracleServiceORCL 服务)->启动服务 打开Or ...

随机推荐

  1. 【Python】【面向对象】

    """# [[面向对象]]#[访问限制]#如果要让内部属性不被外部访问,可加双下划线,编程私有变量.只有内部可以访问,外部不能访问.class Student(objec ...

  2. selenium 在电脑浏览器中用手机模式打开

    import requests from selenium import webdriver from selenium.webdriver.common.action_chains import A ...

  3. python类与类的关系

    类与类之间的关系(依赖关系,大象与冰箱是依赖关系) class DaXiang: def open(self, bx): # 这里是依赖关系. 想执行这个动作. 必须传递一个bx print(&quo ...

  4. Java一次性读取文件的内容

    我们做文本处理的时候的最常用的就是读写文件了,尤其是读取文件,不论是什么文件,我都倾向于一次性将文本的原始内容直接读取到内存中再做处理,当然,这需要你有一台大内存的机器,内存不够者……可以一次读取少部 ...

  5. JSON parse error: Cannot deserialize instance of `int` out of START_OBJECT token; nested exception is com.fasterxml.jackson.databind.exc

    代码程序: @PostMapping("selectById") @ResponseBody public Result selectById(@RequestBody int i ...

  6. 1. dubbo概述

    dubbo简介: 官网:http://dubbo.io 最大程度进行解耦,降低系统耦合性,可以跨工程,跨项目; 生产者/消费者模式; jdk:1.6以上 maven:3.0以上 国际maven仓库:h ...

  7. R 的内部机制

    在前面的章节中,我们已经学习了 R 语言的基础功能,并且了解了如何运用向量.矩阵.列表和数据框表示不同形式的数据,以及用内置函数解决简单的问题.但是仅仅了解这些功能并不能解决所有问题.现实中的数据分析 ...

  8. 力扣(LeetCode)69. x 的平方根

    实现 int sqrt(int x) 函数. 计算并返回 x 的平方根,其中 x 是非负整数. 由于返回类型是整数,结果只保留整数的部分,小数部分将被舍去. 示例 1: 输入: 4 输出: 2 示例 ...

  9. numpy广播

    (m,n)   +,-,*,/  (m,1) 先将(m,1)复制n次,构成(m,n)矩阵,然后再进行+,-,*,/运算 (m,n)   +,-,*,/  (1,n) 先将 (1,n)复制m次,构成(m ...

  10. Swift与JS的交互

    Swift与JS的交互 原理 同Object-C与JS交互的大同小异,只是方法形式改变了. 首先我们需要引入iOS7.0出来的JavaScriptCore.framework JavaScriptCo ...