WebLogic 10.3 安裝、配置與管理手冊
第一章 WebLogic 10.3 for Win32
§1.1 安裝準備
? 下載WebLogic10.3 for x86 Win32安裝文件;
? 安裝Windows XP Sp2或Windows 2003 Server;
? 檢查操作系統的磁盤空間,確保空閑空間在2G以上。
§1.2 安裝過程
§1.2.1 啟動安裝
運行WebLogic10.3_win32.exe,啟動WebLogic 10.3的安裝過程。
§1.2.2 welcome
§1.2.3 選擇Weblogic安裝目錄
建議安裝在非系統盤C:,且目錄名不要包含漢字與空格。
§1.2.4 選擇Custom類型
§1.2.5 選擇要安裝的組件類型
安裝除Workshop組件和例子程序外的組件。
§1.2.6 選擇要安裝的JDK
兩者均安裝。
§1.2.7 選擇產品安裝目錄
建議安裝在非系統盤C:,且目錄名不要包含漢字與空格。
§1.2.8 安裝節點管理服務
要安裝節點管理服務,并修改默認的端口5556為7878。
§1.2.9 選擇快捷菜單模式
§1.2.10 安裝總結
§1.2.11 安裝過程
§1.2.12 安裝結束
取消執行Run Quickstart。
§1.3 創建管理服務器的域
AdminServer Name: AdminServer
Listen Address: 192.168.100.1
Listen Port: 8080
SSL Listen Port: 8081
SSL enabled: true
Domain Name: weblogic
§1.3.1 運行Configuration Wizard
§1.3.2 選擇創建新域
§1.3.3 選擇域源
§1.3.4 配置管理員及密碼
§1.3.5 選產品模式+JRockitJDK
§1.3.6 選擇要定制環境與服務設置
§1.3.7 暫不配置安全存儲
§1.3.8 配置管理服務器的端口
§1.3.9 暫不添加受管的服務器
§1.3.10 暫不添加受管的主機
§1.3.11 Review配置
§1.3.12 指定域名
§1.3.13 創建域
§1.4 創建受管服務器的域
創建受管服務器的Domain有兩種方法:
一、 如管理服務器和受管服務器的操作系統相同,則可以將管理服務器創建的Domain復制到受管服務器。
二、 如管理服務器和受管服務器的操作系統不同,則創建受管服務器的Domain和Server可以比照管理服務器的Domain和Server進行創建,但應確保受管服務器的域名、管理員及密碼和管理服務器完全相同,但Server名稱和管理服務器的Server不同,且在該域中是唯一的。
§1.5 配置和啟動節點管理器
§1.5.1 直接運行
直接運行startNodeManager.cmd。
§1.5.2 配置節點管理器作為Service
除直接運行節點管理器外,還可以將節點管理器配置為Windows Service,執行C:\bea\wlserver_10.3\server\bin\installNodeMgrSvc.cmd將受管服務器主機的NodeManager配置為Windows的Service。在Unix機器,則配置為Daemon進程。(必要時,可以編輯該腳本,配置set NODEMGR_HOST=
更詳細的配置,參考WebLogic管理員手冊。
§1.5.3 啟動受管服務器的節點管理器
第二章 WebLogic 10.3 for SUSE linux
§2.1 安裝準備
? 下載WebLogic10.3 for x86 linux安裝文件;
? 安裝Suse Linux enterprise Server 11.0;
? 檢查Suse環境,確保/root空閑空間在2G以上。如果/root空間不足,則應擴展root空間,或創建一個新的文件系統,并確保該文件系統空間在2G以上。本手冊假定該文件系統的mount點是/soft;如root的空間足夠,則在root創建目錄/soft作為安裝源目錄;
? 創建WebLogic使用的文件系統,該文件系統的mount點建議為/bea,空間應在2G以上,后續將安裝WebLogic軟件到該文件系統中。
§2.2 安裝過程
§2.2.1 創建bea組和weblogic用戶
使用root登錄操作系統,執行下列命令創建bea組和weblogic用戶。bea組號為600,weblogic用戶號為600,屬于bea組,home目錄為/bea。
# groupadd -g 600 bea
# useradd -d /bea -u 600 -g 600 weblogic
# passwd weblogic -- 激活weblogic用戶
執行下列命令將/bea分配給weblogic用戶。
# cd /
# chown weblogic:bea /bea
# chmod 755 /bea
§2.2.2 上傳安裝文件并執行
使用weblogic登錄,使用bin模式,上傳WebLogic安裝文件server103_linux.bin到soft目錄,執行下列命令執行安裝文件。
$ cd /soft
$ chmod a+x server103_linux.bin
$ ./server103_linux.bin -mode=console
系統自動解壓縮安裝文件,并啟動文本的安裝界面。
§2.2.3 歡迎界面
<--------------- Oracle Installer - WebLogic Platform 10.3.0.0 --------------->
Welcome:
--------
This installer will guide you through the installation of WebLogic Platform
10.3.0.0. Type "Next" or enter to proceed to the next prompt. If you want to
change data entered previously, type "Previous". You may quit the installer at any time by typing "Exit".
Enter [Exit][Next]> next
§2.2.4 指定WebLogic主目錄為/bea
<--------------- Oracle Installer - WebLogic Platform 10.3.0.0 --------------->
Choose BEA Home Directory:
--------------------------
"BEA Home" = [Enter new value or use default "/root/bea"]
Enter new BEA Home OR [Exit][Previous][Next]> /bea
<--------------- Oracle Installer - WebLogic Platform 10.3.0.0 --------------->
Choose BEA Home Directory:
--------------------------
"BEA Home" = [/bea]
Use above value or select another option:
1 - Enter new BEA Home
2 - Change to default [/root/bea]
Enter option number to select OR [Exit][Previous][Next]> next
§2.2.5 選擇安裝類型為Custom
<--------------- Oracle Installer - WebLogic Platform 10.3.0.0 --------------->
Choose Install Type:
--------------------
Select the type of installation you wish to perform.
->1|Complete
| Install the following software products and examples:
| - WebLogic Server
| - Workshop
2|Custom
| Choose software products and components to install and perform optional
|configuration.
Enter index number to select OR [Exit][Previous][Next]> 2
§2.2.6 選擇要安裝的產品組件
需取消安裝Workshop和Server Examples
<--------------- Oracle Installer - WebLogic Platform 10.3.0.0 --------------->
Choose Products and Components:
-------------------------------
Release 10.3.0.0
|_____WebLogic Server [1] x
| |_____Core Application Server [1.1] x
| |_____Administration Console [1.2] x
| |_____Configuration Wizard and Upgrade Framework [1.3] x
| |_____Web 2.0 HTTP Pub-Sub Server [1.4] x
| |_____WebLogic JDBC Drivers [1.5] x
| |_____Third Party JDBC Drivers [1.6] x
| |_____WebLogic Server Clients [1.7] x
| |_____WebLogic Web Server Plugins [1.8] x
| |_____UDDI and Xquery Support [1.9] x
| |_____Server Examples [1.10] x
|_____Workshop [2] x
|_____Workshop for WebLogic [2.1] x
|_____Workshop Runtime Framework [2.2] x
*Estimated size of installation: 788.3 MB
Enter number exactly as it appears in brackets to toggle selection OR [Exit][Previous][Next]> 2
<--------------- Oracle Installer - WebLogic Platform 10.3.0.0 --------------->
Choose Products and Components:
-------------------------------
Release 10.3.0.0
|_____WebLogic Server [1] x
| |_____Core Application Server [1.1] x
| |_____Administration Console [1.2] x
| |_____Configuration Wizard and Upgrade Framework [1.3] x
| |_____Web 2.0 HTTP Pub-Sub Server [1.4] x
| |_____WebLogic JDBC Drivers [1.5] x
| |_____Third Party JDBC Drivers [1.6] x
| |_____WebLogic Server Clients [1.7] x
| |_____WebLogic Web Server Plugins [1.8] x
| |_____UDDI and Xquery Support [1.9] x
| |_____Server Examples [1.10] x
|_____Workshop [2]
|_____Workshop for WebLogic [2.1]
|_____Workshop Runtime Framework [2.2]
*Estimated size of installation: 406.3 MB
Enter number exactly as it appears in brackets to toggle selection OR [Exit][Previous][Next]> 1.10
<--------------- Oracle Installer - WebLogic Platform 10.3.0.0 --------------->
Choose Products and Components:
-------------------------------
Release 10.3.0.0
|_____WebLogic Server [1] x
| |_____Core Application Server [1.1] x
| |_____Administration Console [1.2] x
| |_____Configuration Wizard and Upgrade Framework [1.3] x
| |_____Web 2.0 HTTP Pub-Sub Server [1.4] x
| |_____WebLogic JDBC Drivers [1.5] x
| |_____Third Party JDBC Drivers [1.6] x
| |_____WebLogic Server Clients [1.7] x
| |_____WebLogic Web Server Plugins [1.8] x
| |_____UDDI and Xquery Support [1.9] x
| |_____Server Examples [1.10]
|_____Workshop [2]
|_____Workshop for WebLogic [2.1]
|_____Workshop Runtime Framework [2.2]
*Estimated size of installation: 360.4 MB
Enter number exactly as it appears in brackets to toggle selection OR [Exit][Previous][Next]> next
§2.2.7 選擇要安裝的JDK
<--------------- Oracle Installer - WebLogic Platform 10.3.0.0 --------------->
JDK Selection (Any * indicates BEA Supplied VM):
------------------------------------------------
JDK(s) chosen for use with this product installation will be installed. Supported defaults if not deselected will be used in script string-substitution.
1|Add Local Jdk
2|/bea/jdk160_05[x]*
3|/bea/jrockit_160_05[x]*
*Estimated size of installation: 713.2 MB
Enter 1 to add or >= 2 to toggle selection OR [Exit][Previous][Next]> next
§2.2.8 安裝確認
<--------------- Oracle Installer - WebLogic Platform 10.3.0.0 --------------->
Choose Product Installation Directories:
----------------------------------------
BEA Home Directory: [/bea]
Product Installation Directories:
"WebLogic Server" = [Enter new value or use default "/bea/wlserver_10.3"]
Enter new WebLogic Server OR [Exit][Previous][Next]> next
<--------------- Oracle Installer - WebLogic Platform 10.3.0.0 --------------->
The following Products and JDKs will be installed:
--------------------------------------------------
WebLogic Platform 10.3.0.0
|_____WebLogic Server
| |_____Core Application Server
| |_____Administration Console
| |_____Configuration Wizard and Upgrade Framework
| |_____Web 2.0 HTTP Pub-Sub Server
| |_____WebLogic JDBC Drivers
| |_____Third Party JDBC Drivers
| |_____WebLogic Server Clients
| |_____WebLogic Web Server Plugins
| |_____UDDI and Xquery Support
|_____JDKs
|_____Sun SDK 1.6.0_05
|_____BEA JRockit 1.6.0_05 SDK
*Estimated size of installation: 713.3 MB
Enter [Exit][Previous][Next]> next
§2.2.9 文件復制
<--------------- Oracle Installer - WebLogic Platform 10.3.0.0 --------------->
Installing files..
0% 25% 50% 75% 100%
[------------|------------|------------|------------]
[*****************************
Performing String Substitutions...
Creating Domains...
§2.2.10 安裝結束
<--------------- Oracle Installer - WebLogic Platform 10.3.0.0 --------------->
Installation Complete
Congratulations! Installation is complete.
Press [Enter] to continue or type [Exit]> 按回車鍵
§2.3 創建管理服務器的域
AdminServer Name: AdminServer
Listen Address: 192.168.100.1
Listen Port: 8080
SSL Listen Port: 8081
SSL enabled: true
Domain Name: weblogic
§2.3.1 運行Configuration Wizard
$ cd /bea/wlserver_10.3/common/bin
./config.sh -mode=console
§2.3.2 選擇創建新域
<-------------------- Oracle WebLogic 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
| Extend an existing WebLogic domain. Use this option to add
|applications and services, or to override existing database access (JDBC)
|and messaging (JMS) settings. You can also incorporate additional
|functionality in your domain, for example, by including AquaLogic Service
|Bus.
Enter index number to select OR [Exit][Next]> 1
§2.3.3 選擇域源
<-------------------- Oracle WebLogic 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
<-------------------- Oracle WebLogic Configuration Wizard ------------------->
Application Template Selection:
-------------------------------
Available Templates
|_____WebLogic Server (Required)x
Enter number exactly as it appears in brackets to toggle selection OR [Exit][Previous][Next]> next
§2.3.4 配置管理員及密碼
<-------------------- Oracle WebLogic Configuration Wizard ------------------->
Configure Administrator Username 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| *User 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 "User name"
2 - Modify "User password"
3 - Modify "Confirm user password"
4 - Modify "Description"
Enter option number to select OR [Exit][Previous][Next]> 2
<-------------------- Oracle WebLogic Configuration Wizard ------------------->
Configure Administrator Username 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]>
<-------------------- Oracle WebLogic Configuration Wizard ------------------->
Configure Administrator Username 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| *User 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 "User 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
<-------------------- Oracle WebLogic Configuration Wizard ------------------->
Configure Administrator Username 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]>
<-------------------- Oracle WebLogic Configuration Wizard ------------------->
Configure Administrator Username 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| *User 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 "User 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]> Next
§2.3.5 選產品模式+JRockitJDK
<-------------------- Oracle WebLogic 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
<-------------------- Oracle WebLogic Configuration Wizard ------------------->
Java SDK Selection:
-------------------
->1|JRockit SDK 1.6.0_05 @ /bea/jrockit_160_05
2|Sun SDK 1.6.0_05 @ /bea/jdk160_05
3|Other Java SDK
Enter index number to select OR [Exit][Previous][Next]> 1
§2.3.6 選擇要定制環境與服務設置
<-------------------- Oracle WebLogic Configuration Wizard ------------------->
Choose Configuration Option:
----------------------------
*Do you want to modify any of the preconfigured settings or defaults in
*your template?
*
*To keep the default or template settings, and proceed directly to name and *create your domain, leave No selected.
1|Yes
->2|No
Enter index number to select OR [Exit][Previous][Next]> 1
§2.3.7 暫不配置安全存儲
<-------------------- Oracle WebLogic Configuration Wizard ------------------->
Configure RDBMS Security Store Options:
---------------------------------------
Create the RDBMS tables in your datastore prior to booting your domain. The
scripts for use by your DBA are in WebLogic Server's server/lib directory.
Click Next to keep the template settings or bypass RDBMS options.
->1|I don't want to change anything here.
2|I want to create, change, or remove RDBMS support.
Enter index number to select OR [Exit][Previous][Next]> 1
§2.3.8 配置管理服務器的端口
<-------------------- Oracle WebLogic Configuration Wizard ------------------->
Configure the Administration Server:
------------------------------------
Enter adminstration server configurations. Each WebLogic Server domain must
have one Administration Server. The Administration Server hosts the
Administration Console which 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]> 2
<-------------------- Oracle WebLogic Configuration Wizard ------------------->
Configure the Administration Server:
------------------------------------
Enter adminstration server configurations. Each WebLogic Server domain must
have one Administration Server. The Administration Server hosts the
Administration Console which 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 "Listen address" OR [Exit][Previous][Next]> 192.168.100.30
<-------------------- Oracle WebLogic Configuration Wizard ------------------->
Configure the Administration Server:
------------------------------------
Enter adminstration server configurations. Each WebLogic Server domain must
have one Administration Server. The Administration Server hosts the
Administration Console which is used to perform administrative tasks.
| Name | Value |
_|__________________|________________|
1| *Name: | AdminServer |
2| Listen address: | 192.168.100.30 |
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
<-------------------- Oracle WebLogic Configuration Wizard ------------------->
Configure the Administration Server:
------------------------------------
Enter adminstration server configurations. Each WebLogic Server domain must
have one Administration Server. The Administration Server hosts the
Administration Console which 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 "Listen port" OR [Exit][Previous][Next]> 8080
<-------------------- Oracle WebLogic Configuration Wizard ------------------->
Configure the Administration Server:
------------------------------------
Enter adminstration server configurations. Each WebLogic Server domain must
have one Administration Server. The Administration Server hosts the
Administration Console which is used to perform administrative tasks.
| Name | Value |
_|__________________|_____________________|
1| *Name: | AdminServer |
2| Listen address: | All Local Addresses |
3| Listen port: | 8080 |
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]> 4
<-------------------- Oracle WebLogic Configuration Wizard ------------------->
Configure the Administration Server:
------------------------------------
Enter adminstration server configurations. Each WebLogic Server domain must
have one Administration Server. The Administration Server hosts the
Administration Console which is used to perform administrative tasks.
*Enter index number to modify "Value"
1|true
->2|false
3|Unspecified
Enter index number to select OR [Exit][Reset][Accept]> 1
<-------------------- Oracle WebLogic Configuration Wizard ------------------->
Configure the Administration Server:
------------------------------------
Enter adminstration server configurations. Each WebLogic Server domain must
have one Administration Server. The Administration Server hosts the
Administration Console which is used to perform administrative tasks.
| Name | Value |
_|__________________|_____________________|
1| *Name: | AdminServer |
2| Listen address: | All Local Addresses |
3| Listen port: | 8080 |
4| SSL listen port: | 7002 |
5| SSL enabled: | true |
Use above value or select another option:
1 - Modify "Name"
2 - Modify "Listen address"
3 - Modify "Listen port"
4 - Modify "SSL listen port"
5 - Modify "SSL enabled"
6 - Discard Changes
Enter option number to select OR [Exit][Previous][Next]> 4
<-------------------- Oracle WebLogic Configuration Wizard ------------------->
Configure the Administration Server:
------------------------------------
Enter adminstration server configurations. Each WebLogic Server domain must
have one Administration Server. The Administration Server hosts the
Administration Console which is used to perform administrative tasks.
| Name | Value |
_|__________________|_____________________|
1| *Name: | AdminServer |
2| Listen address: | All Local Addresses |
3| Listen port: | 8080 |
4| SSL listen port: | 7002 |
5| SSL enabled: | true |
Enter value for "SSL listen port" OR [Exit][Previous][Next]> 8081
<-------------------- Oracle WebLogic Configuration Wizard ------------------->
Configure the Administration Server:
------------------------------------
Enter adminstration server configurations. Each WebLogic Server domain must
have one Administration Server. The Administration Server hosts the
Administration Console which is used to perform administrative tasks.
| Name | Value |
_|__________________|_____________________|
1| *Name: | AdminServer |
2| Listen address: | All Local Addresses |
3| Listen port: | 8080 |
4| SSL listen port: | 8081 |
5| SSL enabled: | true |
Use above value or select another option:
1 - Modify "Name"
2 - Modify "Listen address"
3 - Modify "Listen port"
4 - Modify "SSL listen port"
5 - Modify "SSL enabled"
6 - Discard Changes
Enter option number to select OR [Exit][Previous][Next]> next
§2.3.9 暫不添加受管的服務器
<-------------------- Oracle WebLogic Configuration Wizard ------------------->
Configure Managed Servers:
--------------------------
Add or delete configuration information for Managed Servers. A typical
production environment has one or more Managed Servers. Each Managed Server
is an instance of WebLogic Server used to host enterprise applications.
| Name* | Listen address | Listen port | SSL listen port | SSL enabled |
_|_______|________________|_____________|_________________|_____________|
Enter name for a new OR [Exit][Previous][Next]> next
<-------------------- Oracle WebLogic Configuration Wizard ------------------->
Configure Clusters:
-------------------
Add or delete configuration information for clusters. A cluster contains
multiple WebLogic Server instances that run simultaneously and work
together to provide increased scalability and reliability. A cluster
appears to be a single WebLogic Server instance to clients.
| Name* | Multicast address | Multicast port | Cluster address |
_|_______|___________________|________________|_________________|
Enter name for a new Cluster OR [Exit][Previous][Next]> next
§2.3.10 暫不添加受管的主機
<-------------------- Oracle WebLogic Configuration Wizard ------------------->
Configure Machines:
-------------------
Add or delete machines. A machine hosts one or more WebLogic Server
instances. The Admin Server and Node Manager use this machine definition to
start remote servers.
| Name* | Node manager listen address | Node manager listen port |
_|_______|_____________________________|__________________________|
Enter name for a new Machine OR [Exit][Previous][Next]> next
<-------------------- Oracle WebLogic Configuration Wizard ------------------->
Configure Unix Machines:
------------------------
Add or delete machines. A machine hosts one or more WebLogic Server
instances. The Admin Server and Node Manager use this machine definition to
start remote servers.
| Name |
_|______|
Enter name for a new Unix Machine OR [Exit][Previous][Next]> next
§2.3.11 指定域名
<-------------------- Oracle WebLogic Configuration Wizard ------------------->
Select the target domain directory for this domain:
---------------------------------------------------
"Target Location" = [Enter new value or use default
"/bea/user_projects/domains"]
Enter new Target Location OR [Exit][Previous][Next]> next
<-------------------- Oracle WebLogic Configuration Wizard ------------------->
Edit Domain Information:
------------------------
| Name | Value |
_|________|_____________|
1| *Name: | base_domain |
Enter value for "Name" OR [Exit][Previous][Next]> weblogic
<-------------------- Oracle WebLogic Configuration Wizard ------------------->
Edit Domain Information:
------------------------
| Name | Value |
_|________|__________|
1| *Name: | weblogic |
Use above value or select another option:
1 - Modify "Name"
2 - Discard Changes
Enter option number to select OR [Exit][Previous][Next]> next
§2.3.12 創建域
<-------------------- Oracle WebLogic Configuration Wizard ------------------->
Creating Domain...
0% 25% 50% 75% 100%
[------------|------------|------------|------------]
[***************************************************]
**** Domain Created Successfully! ****
§2.4 創建受管服務器的域
參考《WebLogic 10.3 for Win32》-《創建受管服務器的Domain和Server》。
§2.5 配置和啟動節點管理器
§2.5.1 直接運行
$ cd /bea/wlserver_10.3/server/bin
$ ./startNodeManager.sh
§2.5.2 配置節點管理器作為Daemon
在/etc/rc.d/rc3.d添加一個啟動節點管理器的文件。該文件核心內容是啟動節點管理器,即:
su - weblogic -c "nohup /bea/wlserver_10.3/server/bin/startNodeManager &"
這樣,Linux啟動后時自動啟動節點管理器。
Runlevel
The term runlevel refers to a mode of operation in one of the computer operating systems that implement Unix System V-style initialization. Conventionally, seven runlevels exist, numbered from zero to six; though up to ten, from zero to nine, may be used. S is sometimes used as a synonym for one of the levels.
In standard practice, when a computer enters runlevel zero, it halts, and when it enters runlevel six, it reboots. The intermediate runlevels (1-5) differ in terms of which drives are mounted, and which network services are started. Lower run levels are useful for maintenance or emergency repairs, since they usually don't offer any network services at all. The particular details of runlevel configuration differ widely among operating systems, and slightly among system administrators.
The runlevel system replaced the traditional /etc/rc script used in Version 7 Unix.
? Standard runlevels
Standard runlevels
ID Name Description
0 Halt Shuts down the system.
S Single-User Mode Does not configure network interfaces or start daemons.[1]
6 Reboot Reboots the system.
1 = Almost all systems use runlevel 1 for this purpose. This mode is intended to provide a safe environment to perform system maintenance. Originally this runlevel provided a single terminal (console) interface running a root login shell. The increasing trend towards physical access to the computer during the boot process has led to changes in this area.
? Linux
The Linux operating system can make use of runlevels through the programs of the sysvinit project. After the Linux kernel has booted, the init program reads the /etc/inittab file to determine the behavior for each runlevel. Unless the user specifies another value as a kernel boot parameter, the system will attempt to enter (start) the default runlevel.
Typical Linux runlevels
Most Linux distributions, in addition to the standard runlevels, define the following additional runlevels:
Typical Linux runlevels
ID Name Description
1 Single-User Mode Does not: configure network interfaces, start daemons, or allow non-root logins.[2]
2 Multi-User Mode Does not: configure network interfaces or start daemons.[3]
3 Multi-User Mode with Networking Starts the system normally.[4]
4 Unused/User defined for special purposes
5 X11 As runlevel 3 + display manager.
^ = The additional behavior of this runlevel varies greatly. All distributions provide at least one virtual terminal. Some distributions start a login shell as the superuser; some require correctly entering the superuser's password first; others provide a login prompt, allowing any user access.
^ = In some cases, runlevels 2 and 3 function identically; offering a Multi-User Mode with Networking.
? Debian Linux
Debian, as well as most of the distributions based on it, like early Ubuntu, does not make any distinction between runlevels 2 to 5.
Debian Linux runlevels
ID Description
0 Halt
1 Single user mode
2-5 Full multi-user with console logins and display manager if installed
6 Reboot
? sidux
sidux, a Debian Sid based distribution (current 20081110). This is the list for sidux operating system runlevels, please note that it does differ from debian stable runlevels.
sidux Linux runlevels
ID Description
0 init 0 powers off the PC, halt
1 init 1 single user mode
2 init 2 Multi-User mode without network, and/or to stop or not enter X,
3 init 3 Multi-User mode with network not running the X Window System, and/or to stop or not enter X
4 init 4 to stop or not enter X
5 init 5 Multi-User mode with network running the X Window System, and/or to start X
6 init 6 Reboot
? Ubuntu
Ubuntu 6.10 (Edgy Eft) and later contain Upstart as a replacement for the traditional init-process, but they still use the traditional init scripts and Upstart's SysV-rc compatibility tools to start most services and emulate runlevels.
? Red Hat Linux and Fedora
Red Hat as well as most of its derivatives (such as CentOS) uses runlevels like this:
Red Hat Linux/Fedora runlevels
ID Description
0 Halt
1 Single user
2 Full multi-user with network enabled but most network services disabled
3 Full multi-user, console logins only
4 Not used/User definable
5 Full multi-user, with display manager as well as console logins
6 Reboot
Which services are started in which runlevels can be managed with the chkconfig tool, which keeps its configuration settings under /etc/rc.d/. /sbin/chkconfig --list lists all the services controlled by chkconfig and whether they are on/off for each runlevel. Setting a service A controlled by chkconfig, for levels X, Y and Z is as simple as /sbin/chkconfig --level XYZ A
? SUSE Linux
SUSE uses a similar setup to Red Hat:
SUSE Linux runlevels
ID Description
0 Halt
1 Single-user
2 Full multi-user with no networking
3 Full multi-user without display manager
4 Not used/User definable
5 Full multi-user with display manager
6 Reboot
The services that run under a specific runlevel can be modified with YaST | System Services (runlevel) or with chkconfig command like the Red Hat based distributions.
? Slackware Linux
Slackware Linux uses runlevel 1 for maintenance, as on other Linux distributions; runlevels 2, 3 and 5 identically configured for a console (with all services active); and runlevel 4 adds the X Window System.
Slackware Linux runlevels
ID Description
0 Halt
1 Single-user
2 Full multi-user NO display manager
3 Full multi-user NO display manager
4 Full multi-user with display manager
5 Not used/User definable
6 Reboot
? Gentoo Linux
Gentoo Linux runlevels
ID Description
0 Halt
1 Single-user
2 Multi-user, no network
3 Full multi-user with display manager
4 Aliased for runlevel 3 (Full multi-user with display manager)
6 Reboot
? System V Releases 3 and 4
System V runlevels
ID Description
0 Shut down system, power-off if hardware supports it (only available from the console)
1 Single-user mode, all filesystems unmounted but root, all processes except console processes killed
2 Multi-user mode
3 Multi-user mode with RFS (and NFS in release 4) filesystems exported
4 Multi-user, user-defined
5 Halt the operating system, go to firmware
6 Halt the system, reboot to default runlevel
s, S Identical to 1 (Single-user mode, all filesystems unmounted but root, all processes except console processes killed) except current terminal acts as the system console
? Solaris
Solaris runlevels
ID Description
0 Operating system halted; (SPARC only) drop to OpenBoot prompt
S Single-user with only root filesystem mounted (as read-only)
1 Single-user mode with all local filesystems mounted (read-write)
2 Multi-user with most daemons started.
3 multi-user, identical to 2 (runlevel 3 runs both /sbin/rc2 and /sbin/rc3), with filesystems exported, plus some other network services started.
4 Alternative multi-user, user-defined
5 Shut down, power-off if hardware supports it
6 Reboot
? HP-UX
HP-UX runlevels
ID Description
0 System halted
S Single-user, booted to system console only, with only root filesystem mounted (as read-only)
s Single user, identical to S except the current terminal acts as the system console
1 Single-user with local filesystems mounted (read-write)
2 Multi-user with most daemons started and Common Desktop Environment launched
3 Multi-user, nearly identical to runlevel 2 with NFS exported
4 Multi-user with VUE started instead of CDE
5, 6 user-defined
? AIX
AIX does not follow the System V R4 (SVR4) run level specification, with run levels from 0 to 9 available, as well as from a to c. 0 and 1 are reserved, 2 is the default normal multi-user mode and run levels from 3 to 9 are free to be defined by the administrator. Run levels from a to c allow the execution of processes in that run level without killing processes started in another.
AIX runlevels
ID Name Description
0 reserved
1 reserved
2 Normal multiuser mode default mode
第三章 配置和管理
§3.1 配置單向SSL認證
WebLogic啟用SSL連接需部署服務器證書、CA證書鏈、信任證書鏈。WebLogic安裝完成后,在
§3.1.1 創建Server存儲庫
§3.1.1.1 創建Server私鑰
使用JDK自帶的keytool工具創建Server私鑰。命令如下:
keytool -genkey -alias AdminServer -keyalg RSA -keysize 1024 -keystore AdminServer.jks
該命令會詢問存儲庫的密碼和證書信息以及私鑰保護密碼。大致內容如下:
輸入keystore密碼:
再次輸入新密碼:
您的名字與姓氏是什么?
[Unknown]: AdminServer
您的組織單位名稱是什么?
[Unknown]: Enterprise
您的組織名稱是什么?
[Unknown]: WJZhiFu
您所在的城市或區域名稱是什么?
[Unknown]: BeiJing
您所在的州或省份名稱是什么?
[Unknown]: BJ
該單位的兩字母國家代碼是什么
[Unknown]: CN
CN=AdminServer, OU=Enterprice, O=WJZhiFu, L=BeiJing, ST=BJ, C=CN 正確嗎?
[否]: y
輸入
(如果和 keystore 密碼相同,按回車):
再次輸入新密碼:
填寫時應注意:
? CN域應和Server域名一致,不應使用Server的ip地址;
? OU域應按頒發的證書類型劃分為多個單元;如:Server、Enterprise、Person,可以使用編碼;
? O域應為公司的英文名稱;
? L域應為城市的英文名稱;
? ST域應為省的英文名稱;
? C域應為國家代碼CN;
? 存儲庫的密碼和私鑰密碼應不同。
§3.1.1.2 生成Server的證書申請文件
keytool -certreq -alias AdminServer -sigalg "MD5withRSA" -file AdminServer.csr -keystore AdminServer.jks
§3.1.1.3 認證證書申請
提交上步生成的AdminServer.csr證書申請文件提交給證書頒發機構進行認證。本例中使用openssl認證該證書申請,命令如下:
openssl ca -in AdminServer.csr -out AdminServer.crt -config openssl.cfg
§3.1.1.4 導入證書文件
從CA獲取到認證的證書文件后,使用keytool將該證書文件導入到存儲庫。Keytool導入證書時,會自動檢查證書的合法性,確認該證書是信任的CA簽署的。默認情況下,我們的CA證書沒有包含在Java信任的CA清單中,因此先需要將我們的CA添加到Java的信任CA清單中。命令如下:
keytool -import -file ca.crt -keystore D:\bea\jdk160_05\jre\lib\security\cacerts
注意:請確認您使用的keytool的JDK位置,Java信任CA清單存儲庫即為該JDK的jre/lib/security/cacerts文件。
添加CA證書完成后,將該文件復制到WebLogic的server/lib目錄,覆蓋當前的cacerts文件,然后執行如下命令導入Server的證書文件。
keytool -import -trustcacerts -alias AdminServer -file AdminServer.crt -keystore AdminServer.jks
導入完成后,復制AdminServer.jks存儲庫到WebLogic的server/lib。至此,Server證書存儲庫準備就緒。
§3.1.2 創建CA證書存儲庫
從CA處下載CA證書文件。CA證書文件一般有兩種形式,一是單獨的CA證書文件,二是.p7b證書鏈文件。
§3.1.2.1 導入獨立的CA證書文件
keytool可以導入DER格式(二進制)和PEM格式(BASE64編碼格式,-----BEGIN CERTIFICATE-----打頭,-----END CERTIFICATE-----結束)。命令如下:
keytool -importcert -file ca.crt -trustcacerts -alias "WJZHIFU CA" -
keystore WJZhiFuCA.jks
導入完成后,復制CA證書存儲庫到WebLogic的server/lib。
§3.1.2.2 導入p7b的CA證書文件
P7b文件不能直接導入到存儲庫,應使用openssl工具將p7b文件轉換為每證書一個der文件,然后參考上節導入各個文件。
轉換p7b文件的命令如下:
openssl pkcs7 -in ca.p7b -out ca.txt -outform PEM -inform DEA -print_certs
編輯ca.txt文件,將每個-----BEGIN CERTIFICATE-----打頭,-----END CERTIFICATE-----結束的證書內容分別復制到一個文件中,然后順序導入各個文件。導入完成后,導入完成后,復制CA證書存儲庫到WebLogic的server/lib。
§3.1.3 部署證書文件
(1) 啟動WebLogic服務器,使用管理員登錄到控制臺;
(2) 編輯Environment?Server的配置。本例編輯AdminServer;
(3) 編輯Server的Keystore屬性;
? Keystore選擇為:Custom Identity and Custom Trust;
? Custom Identity Keystore: 添加Server證書存儲庫全路徑名;
? Custom Identity Keystore Type: JKS
? 填寫該Server存儲庫的密碼;
? Custom Trust Keystore: 填寫CA證書存儲庫的全路徑名;
? Custom Trust Keystore Type: JKS
? 填寫該CA存儲庫的密碼;
? Save
(4) 編輯Server的SSL配置;
? Identity and Trust Locations: KeyStores
? PrivateKey Alias: 填寫為Server存儲庫私鑰的別名,即AdminServer;
? 填寫Server存儲庫私鑰的密碼;
? Save。
至此,單向認證(客戶端認證服務器)的SSL配置完成。
§3.2 配置雙向SSL認證
比照WebLogic服務器單向SSL認證的配置,完成服務器端的SSL配置,然后編輯Server?SSL?Advance配置。
? TwoWayClientCert:ClientCerts Requested and Enforced;
? Inbound Certificate Validation: Builtin SSL Validation And Cert Path Validators;
? Outbound Certificate Validation: Builtin SSL Validation And Cert Path Validators;
? Save
啟用Server雙向認證后,如果客戶端沒有相應的證書,則無法連接服務器。
§3.3 WebLogic集群配置
本集群由三臺計算機組成,AdminServer、Server1、Server2。AdminServer負責集群管理與部署,Server1和Server2組成集群提供對外服務。
§3.3.1 準備證書文件
為AdminServer、Server1、Server2、Server1 NodeManager、Server2 NodeManager各準備一張Server證書,并參考“WebLogic Server雙向SSL認證的配置”節,將這些證書和CA證書制作成如下文件:
文件名 證書組成 說明
ServerAdmin.jks AdminServer私鑰
AdminServer證書 CN=AdminServer
Server1.jks Server1私鑰
Server1證書 CN=server1.wjzhifu.com
Machine1.jks Machine1節點管理器私鑰
Machine1節點管理器證書 CN=machine1
Server2.jks Server2私鑰
Server2證書
Server2節點私鑰
Server2節點證書 CN=server2.wjzhifu.com
Machine2.jks Machine2節點管理器私鑰
Machine2節點管理器證書 CN=machine2
ServerCA.jks CA證書 CN=CA
注意:各證書的私鑰密碼應各不相同以提高安全性。
創建上述文件完成后,將ServerAdmin +ServerCA復制到管理服務器的wlserver_10.3\server\lib目錄,Server1 + Machine1 + ServerCA復制到Server1的wlserver_10.3\server\lib目錄,Server2 + Machine2 + ServerCA復制到Server2的wlserver_10.3\server\lib目錄。
§3.3.2 創建管理服務器和受管服務器的域
參考“創建管理服務器的域”和“創建受管服務器的域”章節,分別為管理服務器和每個Server創建域,并為AdminServer配置雙向的SSL。創建域時應注意各機器域名、管理賬號、密碼均應相同。
創建各服務器的域完成后,啟動管理服務器,并按下列步驟添加機器、Server、配置集群。
§3.3.2.1 啟動管理服務器
§3.3.2.2 啟動管理員終端,并登錄
§3.3.2.3 添加受管計算機
(1) 創建計算機;
(2) 編輯新建計算機的 NodeManager屬性;
(3) 保存并生效;
§3.3.2.4 添加受管服務器
(1) 添加新Server并激活集群模式;
(2) 創建新的集群;
(3) 編輯新Server的屬性,指定計算機;
(4) 保存并生效;
(5) 重啟管理服務器。
§3.3.2.5 啟動受管服務器
使用weblogic用戶登錄操作系統系統,進入域的bin目錄,執行下列命令啟動受管服務器。
$ ./startManagedWebLogic.sh Server1 http://192.168.100.1:8080
Server1: 受管服務器的名稱;
http://192.168.100.1:8080 管理服務器的訪問地址。
待受管服務器啟動完成后,登錄管理服務器的管理控制臺,查詢受管服務器的狀態,應能看到該服務器處于RUNING狀態。否則,應檢查受管服務器的名稱是否和管理服務器中的配置是否一致。
在Server管理界面,點擊Control?Shutdown關閉受管服務器,剛才手工啟動的受管服務器應能退出。后續我們將配置受管服務器的節點管理器,使得AdminServer可以遠程啟動與管理受管服務器。
§3.3.3 配置并啟動受管服務器的節點管理器
受管服務器的節點管理器和AdminServer間通過SSL安全通道傳輸控制命令,因此必須配置節點管理器,以便和AdminServer創建SSL通道。
§3.3.3.1 編輯nodemanager.properties文件
Node Manager Property Description Default
LogFile (New) Location of the Node Manager log file. NodeManagerHome/
nodemanager.log
LogLimit (New) Maximum size of the Node Manager Log specified as an integer. When this limit is reached, a new log file is started.
Valid range for LogLimit is 0 to 2147483647 (int maximum). 0
LogCount (New) Maximum number of log files to create when LogLimit is exceeded.
Valid range for LogCount is 0 to 2147483647 (int maximum). 1
LogAppend (New) If set to true, then a new log file is not created when the Node Manager restarts; the existing log is appended instead. true
LogToStderr (New) If set to true, the log output is also sent to the standard error output. false
LogLevel (New) Severity level of logging used for the Node Manager log. Node Manager uses the same logging levels as WebLogic server. INFO
LogFormatter (New) Name of formatter class to use for NM log messages. weblogic.
nodemanager.
server.
LogFormatter
CrashRecoveryEnabled (New) Enables system crash recovery. false
SecureListener (New) If set to true, use the SSL listener, otherwise use the plain socket true
CipherSuite (New) The name of the cipher suite to use with the SSL listener. TLS_RSA_EXPORT_WITH_RC4_40_MD5
StartScriptEnabled (New) If true, use the start script specified by StartScriptName to start a server. For more information, see Configuring Node Manager to Use Start and Stop Scripts.
false
StartScriptName (New) The name of the start script, located in the domain directory startWebLogic.sh (UNIX)
or
startWebLogic.cmd (Windows)
StopScriptEnabled (New) If true, execute the stop script specified by StopScriptName after the server has shutdown. For more information, see Configuring Node Manager to Use Start and Stop Scripts.
false
StopScriptName (New) The name of the script to be executed after server shutdown. none
DomainsFile (New) The name of the nodemanager.domains file NodeManagerHome/
nodemanager.
domains
DomainsFileEnabled (New) If set to true, use the file specified in DomainsFile. If false, assumes the domain of the current directory or of WL_HOME. true
StateCheckInterval Specifies the interval Node Manager waits to perform a check of the server state. 500 milliseconds
CustomIdentityAlias Specifies the alias when loading the private key into the keystore. This property is required when the Keystores property is set as CustomIdentityandCustomTrust or CustomIdentityAndJavaStandardTrust. none
CustomIdentityKey
StoreFileName Specifies the file name of the Identity keystore (meaning the keystore that contains the private key for the Node Manager). This property is required when the Keystores property is set as CustomIdentity and CustomTrust or CustomIdentityAndJavaStandardTrust. none
CustomIdentity
KeyStorePassPhrase Specifies the password defined when creating the Identity keystore. This field is optional or required depending on the type of keystore. All keystores require the passphrase in order to write to the keystore. However, some keystores do not require the passphrase to read from the keystore. WebLogic Server only reads from the keystore, so whether or not you define this property depends on the requirements of the keystore. none
CustomIdentity
KeyStoreType Specifies the type of the Identity keystore. Generally, this is JKS. This property is optional. default keystore type from java.security
CustomIdentity
PrivateKeyPassPhrase Specifies the password used to retrieve the private key for WebLogic Server from the Identity keystore. This property is required when the Keystores property is set as CustomIdentityandCustomTrust or CustomIdentityAndJavaStandardTrust. none
JavaHome The Java home directory that Node Manager uses to start a Managed Servers on this machine, if the Managed Server does not have a Java home configured in its Remote Start tab. If not specified in either place, Node Manager uses the Java home defined for the Node Manager process. none
JavaStandardTrustKey
StorePassPhrase Specifies the password defined when creating the Trust keystore. This field is optional or required depending on the type of keystore. All keystores require the passphrase in order to write to the keystore. However, some keystores do not require the passphrase to read from the keystore. WebLogic Server only reads from the keystore, so whether or not you define this property depends on the requirements of the keystore.This property is required when the Keystores property is set as CustomIdentityandJavaStandard Trust or DemoIdentityAndDemoTrust. none
KeyStores Indicates the keystore configuration the Node Manager uses to find its identity (private key and digital certificate) and trust (trusted CA certificates). Possible values are:
? DemoIdentityAndDemoTrust
Use the demonstration Identity and Trust keystores located in the BEA_HOME\server\lib directory that are configured by default. The demonstration Trust keystore trusts all the certificate authorities in the Java Standard Trust keystore (JAVA_HOME\jre\lib
\security\cacerts)
? CustomIdentityAndJava
StandardTrust
Uses a keystore you create, and the trusted CAs defined in the cacerts file in the JAVA_HOME\jre\lib\
security\cacerts directory.
? CustomIdentityAndCustomTrust
Uses Identity and Trust keystores you create. DemoIdentity
AndDemoTrust
ListenAddress Any address upon which the machine running Node Manager can listen for connection requests. This argument deprecates weblogic.nodemanager.
listenAddress. null
With this setting, Node Manager will listen on any IP address on the machine
ListenPort The TCP port number on which Node Manager listens for connection requests. This argument deprecates weblogic.nodemanager.listenPort. 5556
NativeVersionEnabled A value of true causes native libraries for the operating system to be used.
For UNIX systems other than Solaris, HP-UX, or Linux, set this property to false to run Node Manager in non-native mode. This will cause Node Manager to use the start script specified by the StartScriptEnabled property to start Managed Servers. true
NodeManagerHome Node Manager root directory which contains the following configuration and log files:
? nm_data.properties
? nodemanager.domains
? nodemanager.log
? nodemanager.properties
For more information on these files, see Node Manager Configuration and Log Files.
Note: By default, NodeManagerHome is WL_HOME/common/nodemanager. In a production environment, you may want to customize the location of the Node Manager root directory.
NodeManagerHome
WeblogicHome Root directory of the WebLogic Server installation. This is used as the default value of -Dweblogic.RootDirectory for a Managed Server that does not have a root directory configured in its Remote Start tab. If not specified in either place, Node Manager starts the Managed Server in the directory where Node Manager runs. none
keyFile The path to the private key file to use for SSL communication with the Administration Server.
Note: This property is used only in the process of upgrading from WebLogic Server, Version 7.x to Version 9.x.
none
keyPassword The password used to access the encrypted private key in the key file.
Note: This property is used only in the process of upgrading from WebLogic Server, Version 7.x to Version 9.x.
none
certificateFile Specifies the path to the certificate file used for SSL authentication.
Note: This property is used only in the process of upgrading from WebLogic Server, Version 7.x to Version 9.x.
none
編輯common/nodemanager/nodemanager.properties文件,增加下列內容:
CustomIdentityAlias=Machine1
CustomIdentityKeyStoreFileName=/bea/wlserver_10.3/server/lib/Machine1.jks
CustomIdentityKeyStorePassPhrase=密碼
CustomIdentityKeyStoreType=JKS
CustomIdentityPrivateKeyPassPhrase=密碼
KeyStores=CustomIdentityAndCustomTrust
節點管理器重新啟動后,WebLogic會自動加密密碼,因此不必擔心明文密碼的問題。
§3.3.3.2 啟動節點管理器
$ cd /bea/wlserver_10.3/server/bin
$ ./startNodeManager.sh
待節點管理器啟動完成后,登錄AdminServer的管理控制臺,檢查受管服務器的節點管理器狀態,應能看到節點管理器可到達。此時,可以通過節點管理器遠程控制受管服務器的啟動與關閉。
如果出現“
§3.3.4 啟用受管服務器的SSL
使用管理員登錄到AdminServer的控制臺,參考《配置雙向SSL認證》節的描述,啟用Server1、Server2的SSL連接。應注意其使用的證書庫分別是Server1.jks/ServerCA.jks和Server2.jks/ServerCA.jks。配置完成后,重新啟動Server1和Server2,并查閱Server的啟動日志,確認SSL監聽激活。
§3.3.5 配置Session復制
(待補充)
§3.3.6 配置命令匯總(OpenSSL and KeyTool)
==CA==============================================================
openssl genrsa -des3 -out c:/ca/keys/CA.key 2048
openssl req -new -out CA.csr -key c:/ca/keys/CA.key -config openssl.cfg
openssl ca -in CA.csr -out c:/ca/certs/CA.crt -selfsign -keyfile c:/ca/keys/CA.key -days 7305 -extensions v3_ca -config openssl.cfg
keytool -import -file c:/ca/certs/ca.crt -keystore D:\bea\jdk160_05\jre\lib\security\cacerts
==AdminServer==========================================================
keytool -genkey -alias AdminServer -keyalg RSA -keysize 1024 -keystore ServerAdmin.jks -keypass welcome2008 -storepass welcome2008
keytool -certreq -alias AdminServer -sigalg "MD5withRSA" -file AdminServer.csr -keypass welcome2008 -keystore ServerAdmin.jks -storepass welcome2008
openssl ca -in AdminServer.csr -out c:/ca/certs/AdminServer.crt -config openssl.cfg
keytool -import -trustcacerts -alias AdminServer -file c:/ca/certs/AdminServer.crt -keystore ServerAdmin.jks -storepass welcome2008 -keypass welcome2008
==Machine1==========================================================
keytool -genkey -alias Machine1 -keyalg RSA -keysize 1024 -keystore Machine1.jks -keypass welcome2008 -storepass welcome2008
keytool -certreq -alias Machine1 -sigalg "MD5withRSA" -file Machine1.csr -keypass welcome2008 -keystore Machine1.jks -storepass welcome2008
openssl ca -in Machine1.csr -out c:/ca/certs/Machine1.crt -config openssl.cfg
keytool -import -trustcacerts -alias Machine1 -file c:/ca/certs/Machine1.crt -keystore Machine1.jks -storepass welcome2008 -keypass welcome2008
==Machine2==========================================================
keytool -genkey -alias Machine2 -keyalg RSA -keysize 1024 -keystore Machine2.jks -keypass welcome2008 -storepass welcome2008
keytool -certreq -alias Machine2 -sigalg "MD5withRSA" -file Machine2.csr -keypass welcome2008 -keystore Machine2.jks -storepass welcome2008
openssl ca -in Machine2.csr -out c:/ca/certs/Machine2.crt -config openssl.cfg
keytool -import -trustcacerts -alias Machine2 -file c:/ca/certs/Machine2.crt -keystore Machine2.jks -storepass welcome2008 -keypass welcome2008
==Server1==========================================================
keytool -genkey -alias Server1 -keyalg RSA -keysize 1024 -keystore Server1.jks -keypass welcome2008 -storepass welcome2008
keytool -certreq -alias Server1 -sigalg "MD5withRSA" -file Server1.csr -keypass welcome2008 -keystore Server1.jks -storepass welcome2008
openssl ca -in Server1.csr -out c:/ca/certs/Server1.crt -config openssl.cfg
keytool -import -trustcacerts -alias Server1 -file c:/ca/certs/Server1.crt -keystore Server1.jks -storepass welcome2008 -keypass welcome2008
==Server2==========================================================
keytool -genkey -alias Server2 -keyalg RSA -keysize 1024 -keystore Server2.jks -keypass welcome2008 -storepass welcome2008
keytool -certreq -alias Server2 -sigalg "MD5withRSA" -file Server2.csr -keypass welcome2008 -keystore Server2.jks -storepass welcome2008
openssl ca -in Server2.csr -out c:/ca/certs/Server2.crt -config openssl.cfg
keytool -import -trustcacerts -alias Server2 -file c:/ca/certs/Server2.crt -keystore Server2.jks -storepass welcome2008 -keypass welcome2008
==Person==============================================================
openssl req -newkey rsa:1024 -keyout c:/ca/keys/lny.key -out lny.csr -config openssl.cfg
openssl ca -in lny.csr -out c:/ca/certs/lny.crt -config openssl.cfg
openssl pkcs12 -export -in c:/ca/certs/lny.crt -inkey c:/ca/keys/lny.key -out lny.pfx
注意:openssl生成的cert前面附加了證書的文本輸出信息,使用keytool處理這些證書時,需編輯證書文件,刪除這些附加的信息,只留下---BEGIN-----至----END….的部分。
§3.4 配置前端Apache負載均衡器
(待補充)
§3.5 配置JMS服務器
本節以配置TongLink/Q消息中間件為例,說明JMS服務器的配置過程。集群內的各個受管服務器應配置指向一個TLQ Server。
啟動管理服務器、受管服務器,并登錄到管理控制臺。
§3.5.1 添加新JMS模塊
(1)指定JMS模塊名稱;
(2)選擇部署的服務器;
(3)同時添加資源到本模塊;
§3.5.2 添加外部JMS服務器
(1)添加外部 JMS服務器;
(2)設置JMS服務器的名稱;
(3)Finish;
(4)編輯JMS Server屬性;
點擊TLQJmsServer。
(5)
本頁需配置下列內容:
? JNDI InitialContext Factory: tongtech.jms.jndi.JmsContextFactory
? JNDI Connection URL: tlkq://localhost:10241/
? Default Targeting Enabled: true
配置完成后Save。
此處端口10241是TLQ配置的基地址+1。
§3.5.3 添加JMS目標隊列
(1)編輯JMS Server的Destinations屬性;
(2)創建遠程發送目標隊列;
遠程JNDI Name應與TLQ配置的JMS隊列名一致。
(2)創建本地接收目標隊列;
§3.5.4 添加 JMS連接工廠
(1)編輯JMS Server的ConnectionFactories屬性;
(2)創新連接工廠;
遠程JNDI Name應與TLQ配置的JMS連接工廠名一致。
§3.5.5 檢查JMS的配置
重新啟動受管服務器。啟動完成后,登錄到管理控制臺,檢查受管服務器的JNDI樹;
點擊View JNDI Tree,應能看到JMS的三個JNDI配置;
順次點擊各JNDI定義,應能獲取到 TLQ的各類名;
如不能獲取到 TLQ類名,則應檢查:
? TongLink/Q的JMS類庫安裝;
? WebLogic的JNDI配置;
? TLQ的JNDI配置。
§3.6 配置數據庫連接池
啟動管理服務器和管理控制臺,登錄到管理控制臺,選擇DataSource。
§3.6.1 添加新數據源
本頁主要設置下列屬性:
? 數據源的名稱:
? JNDI名稱;
? 數據庫類型;
? 數據庫驅動程序名稱。
§3.6.2 提示選擇了XA事務數據庫驅動程序
§3.6.3 指定連接屬性
§3.6.4 測試連接屬性
系統出現如下提示,則說明連接配置正確,否則根據錯誤信息糾正錯誤。
§3.6.5 選擇要部署的目標服務器
點擊[Finish]結束配置,并生效配置。