說明本文環境 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">
刪除紅色部分
刪除位於\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
刪除紅色部分