首页 > 代码库 > weblogic管理1——创建 和 删除一个domain

weblogic管理1——创建 和 删除一个domain

说明本文环境  WLS_HOME=/home/weblogic/Oracle/Middleware

创建一个domian   第一种方法通过console 创建>

[weblogic@11g Middleware]$ cd /home/weblogic/Oracle/Middleware/wlserver_10.3/common/bin
[weblogic@11g bin]$ ll
total 112
-rwxr-x---. 1 weblogic weblogic 22872 Nov  6 03:25 commEnv.sh
-rwxr-x---. 1 weblogic weblogic  2129 Nov  6 03:25 config_builder.sh
-rwxr-x---. 1 weblogic weblogic  2281 Nov  6 03:25 config.sh
-rwxr-x---. 1 weblogic weblogic  2586 Nov  6 03:25 pack.sh
-rwxr-x---. 1 weblogic weblogic  2150 Nov  6 03:25 setPatchEnv.sh
-rwxr-x---. 1 weblogic weblogic  4089 Nov  6 03:25 startDerby.sh
-rwxr-x---. 1 weblogic weblogic  4095 Nov  6 03:25 startManagedWebLogic.sh
-rwxr-x---. 1 weblogic weblogic  1455 Nov  6 03:25 stopDerby.sh
-rwxr-x---. 1 weblogic weblogic  2094 Nov  6 03:25 unpack.sh
-rwxr-x---. 1 weblogic weblogic  3305 Nov  6 03:25 upgrade.sh
-rwxr-x---. 1 weblogic weblogic 31224 Nov  6 03:25 wlscontrol.sh
-rwxr-x---. 1 weblogic weblogic 13740 Nov  6 03:24 wlsifconfig.sh
-rwxr-x---. 1 weblogic weblogic   791 Nov  6 03:25 wlst.sh
[weblogic@11g 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]> 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]> 










<-------------------------- 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]> 










<-------------------------- fusion="" middleware="" configuration="" wizard="" --------------------------="">


Select the target domain directory for this domain:
---------------------------------------------------


    "Target Location" = [Enter new value or use default 
"/home/weblogic/Oracle/Middleware/user_projects/domains"]








Enter new Target Location OR [Exit][Previous][Next]> 










<-------------------------- 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










<-------------------------- 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]> 








<-------------------------- 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       










<-------------------------- 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]> 








<-------------------------- 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="" --------------------------="">


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




    ** CFGFWK-60050:  Property "Password" of User "weblogic" is invalid.
    ** CFGFWK-60455:  The password must be at least 8 alphanumeric characters with at least 
    ** one number or special character.








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










<-------------------------- 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




    ** CFGFWK-60050:  Property "Password" of User "weblogic" is invalid.
    ** CFGFWK-60455:  The password must be at least 8 alphanumeric characters with at least 
    ** one number or special character.








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










<-------------------------- 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




    ** CFGFWK-60050:  Property "Password" of User "weblogic" is invalid.
    ** CFGFWK-60455:  The password must be at least 8 alphanumeric characters with at least 
    ** one number or special character.








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










<-------------------------- 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




    ** CFGFWK-60050:  Property "Password" of User "weblogic" is invalid.
    ** CFGFWK-60455:  The password must be at least 8 alphanumeric characters with at least 
    ** one number or special character.








Enter option number to select OR [Exit][Previous][Next]> 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]> 








<-------------------------- 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










<-------------------------- 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]> 








<-------------------------- 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]> 2










<-------------------------- fusion="" middleware="" configuration="" wizard="" --------------------------="">


Java SDK Selection:
-------------------


 ->1|JRockit SDK 1.6.0_29 @ /home/weblogic/Oracle/Middleware/jrockit_160_29_D1.2.0-10
   2|Sun SDK 1.6.0_29 @ /home/weblogic/Oracle/Middleware/jdk160_29
   3|Other Java SDK








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










<-------------------------- 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










<-------------------------- 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]> 










<-------------------------- fusion="" middleware="" configuration="" wizard="" --------------------------="">


Creating Domain...


0%          25%          50%          75%          100%
[------------|------------|------------|------------]
[***************************************************]






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




[weblogic@11g bin]$ cd /home/weblogic/Oracle/Middleware/user_projects/domains/base_domain/bin
[weblogic@11g bin]$ ./startWebLogic.sh 
.
.
JAVA Memory arguments: -Xms512m -Xmx512m
.
WLS Start Mode=Production
.
CLASSPATH=/home/weblogic/Oracle/Middleware/patch_wls1036/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/weblogic/Oracle/Middleware/patch_ocp371/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/weblogic/Oracle/Middleware/jrockit_160_29_D1.2.0-10/lib/tools.jar:/home/weblogic/Oracle/Middleware/wlserver_10.3/server/lib/weblogic_sp.jar:/home/weblogic/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar:/home/weblogic/Oracle/Middleware/modules/features/weblogic.server.modules_10.3.6.0.jar:/home/weblogic/Oracle/Middleware/wlserver_10.3/server/lib/webservices.jar:/home/weblogic/Oracle/Middleware/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/home/weblogic/Oracle/Middleware/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar:/home/weblogic/Oracle/Middleware/wlserver_10.3/common/derby/lib/derbyclient.jar:/home/weblogic/Oracle/Middleware/wlserver_10.3/server/lib/xqrl.jar
.
PATH=/home/weblogic/Oracle/Middleware/wlserver_10.3/server/bin:/home/weblogic/Oracle/Middleware/modules/org.apache.ant_1.7.1/bin:/home/weblogic/Oracle/Middleware/jrockit_160_29_D1.2.0-10/jre/bin:/home/weblogic/Oracle/Middleware/jrockit_160_29_D1.2.0-10/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/weblogic/bin
.
***************************************************
*  To start WebLogic Server, use a username and   *
*  password assigned to an admin-level user.  For *
*  server administration, use the WebLogic Server *
*  console at http://hostname:port/console        *
***************************************************
starting weblogic with Java version:
java version "1.6.0_29"
Java(TM) SE Runtime Environment (build 1.6.0_29-b11)
Oracle JRockit(R) (build R28.2.0-79-146777-1.6.0_29-20111005-1807-linux-ia32, compiled mode)
Starting WLS with line:
/home/weblogic/Oracle/Middleware/jrockit_160_29_D1.2.0-10/bin/java -jrockit   -Xms512m -Xmx512m -Dweblogic.Name=AdminServer -Djava.security.policy=/home/weblogic/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.policy  -Dweblogic.ProductionModeEnabled=true   -da -Dplatform.home=/home/weblogic/Oracle/Middleware/wlserver_10.3 -Dwls.home=/home/weblogic/Oracle/Middleware/wlserver_10.3/server -Dweblogic.home=/home/weblogic/Oracle/Middleware/wlserver_10.3/server   -Dweblogic.management.discover=true  -Dwlw.iterativeDev=false -Dwlw.testConsole=false -Dwlw.logErrorsToConsole=false -Dweblogic.ext.dirs=/home/weblogic/Oracle/Middleware/patch_wls1036/profiles/default/sysext_manifest_classpath:/home/weblogic/Oracle/Middleware/patch_ocp371/profiles/default/sysext_manifest_classpath  weblogic.Server
 
 
 
 
 
Enter username to boot WebLogic server:weblogic
Enter password to boot WebLogic server:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

_________________________________________________________________________________________________________________
   第二种方法 通过图形化界面创建>

使用config脚本创建:

config.sh 脚本所在的目录:

[apptest@vs022 bin]$ pwd
/u01/test/apps/fs2/FMW_Home/wlserver_10.3/common/bin


[apptest@vs022 bin]$ ls
commEnv.sh         pack.sh         startManagedWebLogic.sh  upgrade.sh      wlst.sh
config_builder.sh  setPatchEnv.sh  stopDerby.sh             wlscontrol.sh
config.sh          startDerby.sh   unpack.sh                wlsifconfig.sh

执行后,出现

技术分享

技术分享

技术分享

输入密码:

技术分享

选择为开发模式,选择适合的Java:

技术分享

选择创建一个Admin server 然后再创建一个managed server:

技术分享

设置监听端口:

技术分享

添加一个managed server :

技术分享

后面创建cluster 和 machine先不管,直接next到:

技术分享

然后就开始创建咯:

技术分享

 

创建好之后,我们就可以在weblogic的domian目录下看到我们新创建的这个域:

技术分享

 

启动这个域的管理控制台:

启动脚本:

技术分享

在启动的过程中,会让你输入密码,这个密码文件实际上是存储在servers目录下,对应的的某个server的boot.properties文件,默认情况下,创建完admin server或者managed server都不会创建这个文件的,看以看下目录结构:

技术分享

 

我们boot.properties文件中编辑如下内容:

username=weblogic1

password=manager1

然后保存,再次启动这个admin server的时候,就不需要输入用户名和密码了,也就是在此时,这个boot.properties会被重新加密。当你再次打开查看的时候就成了加密的文件了。

在启动的输入条目中,会看到有如下一行记录:

  

 

说明图形化创建请用博客:  http://blog.csdn.net/cymm_liu/article/details/25002097
————————————————————————————————————————————————————————————————————————

删除一个domian >

1.   
[weblogic@11g servers]$ rm -rf /home/weblogic/Oracle/Middleware/user_projects/domains/base_domain/

2.  
编辑domain-registry.xml文件 删除这个domain的配置信息
[weblogic@11g servers]$ vi  /home/weblogic/Oracle/Middleware/domain-registry.xml 


<domain-registry xmlns="http://xmlns.oracle.com/weblogic/domain-registry">
  
  

删除红色部分

3. 

删除位于\wlserver_10.3\common\nodemanager之下

nodemanager.domains中有关该domain的条目

#Domains and directories created by Configuration Wizard
#Fri Apr 06 13:09:46 CST 2012
base_domain=D\:\\Oracle\\middleware\\user_projects\\domains\\base_domain
bifoundation_domain=D\:\\Oracle\\middleware\\user_projects\\domains\\bifoundation_domain

删除红色部分

 

 

至此,domain已经彻底的被移除了。
 
注:删除domain不需要更改Metadata Service (MDS)



weblogic管理1——创建 和 删除一个domain