weblogic10.3命令行的安裝和配置

1.weblogic部署前準備

把weblogic的bin放到/home/zhuying下

1.1創建weblogic用戶組

groupadd oinstall;

usermod -g oinstall zhuying;

passwd zhuying

根據提示輸入密碼,這是創建weblogic控制檯登錄所需的賬號和密碼

1.2創建目錄/home/zhuying/opt/bea,修改目錄所有者權限

[zhuying@Test232 ~]$ pwd
/home/zhuying
[zhuying@Test232 ~]$ mkdir -p opt/bea/

[zhuying@Test232 ~]$ chown -Rf zhuying:oinstall ~/opt/bea/

2.安裝weblogic10.3目錄

2.1安裝weblogic10.3目錄

賦予.bin可執行權限:

[zhuying@Test232 ~]$ chmod u+x server103_linux32.bin

執行:

[zhuying@Test232 ~]$ ./server103_linux32.bin 

2.1.1進入控制檯安裝的歡迎界面【裏面主要是告訴你一些用法,使用Next或者回車來進行下一步】,鍵入[Next]繼續

2.1.2選擇BEA的家目錄,回車就是默認,或者鍵入你選擇的家目錄,如:/home/zhuying/opt/bea,然後進入你所選擇的家目錄

2.1.3選擇安裝類型:complete或者custom【默認complete】

2.1.4選擇產品安裝目錄,按Next【默認WebLogic Server: [/home/zhuying/opt/bea/wlserver_10.3]和Workshop: [/home/zhuying/opt/bea/workshop_10.3]都會被安裝】

2.1.5確認Products and JDKs,按回車,安裝jdk和域,安裝完成後會在家目錄下創建一個bea目錄,裏面有個beahomelist文件,內容就是你的bea的家目錄路徑,如:/home/zhuying/opt/bea

2.1.6 要點:安裝過weblogic目錄後,你可以到bea的家目錄下查看一下registry.xml文件【這個註冊表文件裏面記錄了一些版本信息,家目錄路徑,主機名及Javahome,另外還有已安裝的組件名(這個可以在BEA_HOME/logs/log.txt中查看)等信息】

2.2 安裝步驟如下:

[zhuying@Test232 opt]$ ./server103_linux32.bin 
Extracting 0%....................................................................................................100%
Unable to instantiate GUI, defaulting to console mode.

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

<----------------------------------------- Oracle Installer - WebLogic Platform 10.3.0.0 ----------------------------------------->

Choose BEA Home Directory:
--------------------------

    "BEA Home" = [Enter new value or use default "/home/zhuying/bea"]

Enter new BEA Home OR [Exit][Previous][Next]> /home/zhuying/opt/bea


<----------------------------------------- Oracle Installer - WebLogic Platform 10.3.0.0 ----------------------------------------->

Choose BEA Home Directory:
--------------------------

    "BEA Home" = [/home/zhuying/opt/bea]

Use above value or select another option:
    1 - Enter new BEA Home
    2 - Change to default [/home/zhuying/bea]


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

<----------------------------------------- Oracle Installer - WebLogic Platform 10.3.0.0 ----------------------------------------->

Choose BEA Home Directory:
--------------------------

    "BEA Home" = [/home/zhuying/opt/bea]

Enter new BEA Home OR [Exit][Previous][Next]> next


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

<----------------------------------------- Oracle Installer - WebLogic Platform 10.3.0.0 ----------------------------------------->

Choose Product Installation Directories:
----------------------------------------

BEA Home Directory: [/home/zhuying/opt/bea]

Product Installation Directories:


   1|WebLogic Server: [/home/zhuying/opt/bea/wlserver_10.3]
   2|Workshop: [/home/zhuying/opt/bea/workshop_10.3]


Enter index number to select 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
    |    |_____Server Examples
    |_____Workshop
    |    |_____Workshop for WebLogic
    |    |_____Workshop Runtime Framework
    |_____JDKs
         |_____Sun SDK 1.6.0_05
         |_____BEA JRockit 1.6.0_05 SDK

    *Estimated size of installation: 1,129.9 MB


Enter [Exit][Previous][Next]>按回車

<----------------------------------------- Oracle Installer - WebLogic Platform 10.3.0.0 ----------------------------------------->

Installing files..


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


<----------------------------------------- Oracle Installer - WebLogic Platform 10.3.0.0 ----------------------------------------->

Installing JDK....

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


Performing String Substitutions... 


Creating Domains...



<----------------------------------------- Oracle Installer - WebLogic Platform 10.3.0.0 ----------------------------------------->

Installation Complete


Congratulations! Installation is complete.


Press [Enter] to continue or type [Exit]> 按回車會直接退出
[zhuying@Test232 opt]$ 

2.3 創建服務

使用zhuying用戶登錄

[zhuying@Test232 bin]$ pwd
/home/zhuying/opt/bea/wlserver_10.3/common/bin
[zhuying@Test232 bin]$ ./config.sh 

Unable to instantiate GUI, defaulting to console mode.


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

<---------------------------------------------- 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
    |_____Workshop for WebLogic 10.3 [2] 


Enter number exactly as it appears in brackets to toggle selection OR [Exit][Previous][Next]> 



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

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


Enter value for "User name" OR [Exit][Previous][Next]> zhuying

<---------------------------------------------- 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:       |                 zhuying                 |
   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]> 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:       |                 zhuying                 |
   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:       |                 zhuying                 |
   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]> 按回車

<---------------------------------------------- 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 @ /home/zhuying/opt/bea/jrockit_160_05
   2|Sun SDK 1.6.0_05 @ /home/zhuying/opt/bea/jdk160_05
   3|Other Java SDK

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

<---------------------------------------------- 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]> 按回車或者 2【選2的話,默認域名就是base_domain】


<---------------------------------------------- Oracle WebLogic Configuration Wizard --------------------------------------------->
Select the target domain directory for this domain:
---------------------------------------------------

    "Target Location" = [Enter new value or use default "/home/zhuying/opt/bea/user_projects/domains"]

Enter new Target Location OR [Exit][Previous][Next]> 按回車

<---------------------------------------------- Oracle WebLogic Configuration Wizard --------------------------------------------->

Edit Domain Information:
------------------------

    |  Name  |    Value    |
   _|________|_____________|
   1| *Name: | base_domain |


Enter value for "Name" OR [Exit][Previous][Next]> 按回車


<---------------------------------------------- Oracle WebLogic Configuration Wizard --------------------------------------------->

Creating Domain...

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

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

[zhuying@Test232 bin]$ 

安裝完成後,bea的家目錄下就會出現user_projects

小節:

1.當我啓動Admin時,發現總是啓動報錯,然後我就查找文件,發現賬號和密碼在/home/zhuying/opt/bea/user_projects/domains/base_domain/init-info/security.xml裏面保存,賬號和密碼居然搞反了~

2.啓動過程中可能還會有緩存日誌,那麼根據提示請將緩存日誌/home/zhuying/opt/bea/user_projects/domains/base_domain/servers/AdminServer/tmp/刪除

3.wblogic的控制檯登錄的URL,端口和console等~

/home/zhuying/opt/bea/user_projects/domains/base_domain/init-info/startscript.xml

模板文件:

/home/zhuying/opt/bea/wlserver_10.3/samples/server/examples/src/examples/jms/topic/example.xml

/home/zhuying/opt/bea/wlserver_10.3/samples/server/examples/src/examples/jms/queue/example.xml

/home/zhuying/opt/bea/wlserver_10.3/samples/server/examples/src/examples/jms/messageformat/example.xml

/home/zhuying/opt/bea/wlserver_10.3/samples/server/examples/src/examples/security/sslclient/build.xml

/home/zhuying/opt/bea/wlserver_10.3/samples/server/examples/src/examples/webapp/pubsub/stock/jms-handler-config/weblogic-pubsub.xml

/home/zhuying/opt/bea/wlserver_10.3/samples/server/examples/src/examples/ejb/ejb30/build.xml

/home/zhuying/opt/bea/wlserver_10.3/samples/server/examples/src/examples/jta/jmsjdbc/example.xml

/home/zhuying/opt/bea/wlserver_10.3/samples/domains/wl_server/init-info/startscript.xml

3.創建servers,並加入cluster

1.將192.168.55.233做爲控制檯,通過控制檯創建兩個server,分別爲Test232-zy和Test233-zy,並加入集羣TestCluster,如下圖所示:

[zhuying@Test233 base_domain]$ pwd
/home/zhuying/opt/bea/user_projects/domains/base_domain
[zhuying@Test233 base_domain]$ sh startWebLogic.sh

這樣啓動的時候會提示讓輸入賬號和密碼,否則你ctrl+c的時候進程就crash掉了~

[zhuying@Test233 AdminServer]$ pwd
/home/zhuying/opt/bea/user_projects/domains/base_domain/servers/AdminServer
[zhuying@Test233 AdminServer]$ mkdir security

[zhuying@Test233 AdminServer]$ cd security/
[zhuying@Test233 security]$ touch boot.properties 

[zhuying@Test233 security]$ cat boot.properties 

#Thu Jun 21 14:07:04 CST 2012
password=
{3DES}5TnyJcJyF1ZDMpzn9/Vq1A\=\=
username={3DES}AzGo83s4LCI\=

等號後面的就是你的密碼和賬號,啓動後就會加密~


2.分別創建兩個server Test232-zy和Test233-zy目錄,並啓動兩個實例~

[zhuying@Test232 bea]$ pwd
/home/zhuying/bea
[zhuying@Test232 bea]$ cat startTest232-zy.sh 
#!/bin/sh
USER_MEM_ARGS="-Xms1024m -Xmx1024m -XX:PermSize=64M -XX:MaxPermSize=160m"
export USER_MEM_ARGS
sh ~/opt/bea/user_projects/domains/base_domain/bin/startManagedWebLogic.sh Test232-zy http://192.168.55.233:7001 >> ~/opt/log/Test232-zy.log &
[zhuying@Test232 bea]$ cat stopTest232-zy.sh 
#!/bin/sh
sh ~/opt/bea/user_projects/domains/base_domain/bin/stopManagedWebLogic.sh Test232-zy t3://192.168.55.233:7001 zhuying ********
[zhuying@Test232 bea]$

注意:

1.標顏色的是控制檯的ip和端口,同時應該注意該格式書寫的原因:

USER_MEM_ARGS:The variable to override the standard memory arguments passed to java.

DOMAIN_HOME/init-info/startscript.xml文件如是說:

Need to set SERVER_NAME and ADMIN_URL environment variables or specify

Usage: %1 SERVER_NAME {ADMIN_URL}"

%1 managedserver1 http://localhost:7001

USER_NAME and PASSWORD are required for shutting the server down when running in production mode:

Usage: %1 {SERVER_NAME} {ADMIN_URL} {USER_NAME} {PASSWORD}

%1 managedserver1 t3://localhost:7001 weblogic weblogic

2.啓動的時候先是創建兩個實例目錄Test232-zy和Test233-zy,然後分別將賬號和密碼加入到boot.properties中,方法同Admin Server的方法相同~

啓動信息:

<2012-6-21 下午06時12分59秒 CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to ADMIN> 
<2012-6-21 下午06時12分59秒 CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RESUMING> 
<2012-6-21 下午06時12分59秒 CST> <Notice> <Cluster> <BEA-000162> <Starting "async" replication service with remote cluster address "null"> 
<2012-6-21 下午06時12分59秒 CST> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 192.168.55.233:7002 for protocols iiop, t3, CLUSTER-BROADCAST, ldap, snmp, http.> 
<2012-6-21 下午06時12分59秒 CST> <Notice> <WebLogicServer> <BEA-000330> <Started WebLogic Managed Server "Test233-zy" for domain "base_domain" running in Production Mode> 
<2012-6-21 下午06時13分01秒 CST> <Notice> <Cluster> <BEA-000102> <Joining cluster TestCluster on 239.192.0.1:10021> 
<2012-6-21 下午06時13分01秒 CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING> 
<2012-6-21 下午06時13分01秒 CST> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode> 

啓動後如下所示:

3.查看weblogic已安裝組件:BEA_HOME/logs/log.txt

[zhuying@sor-sys logs]$ cat log.txt 
Jun 25, 2012 2:32:08 PM -- install "WebLogic Platform" 10.3.0.0 at /home/zhuying/opt/bea
    release  10.3.0.0 [Added]
    |_____Common Infrastructure Engineering 6.6.0.0 [Added]
    |    |_____Uninstall [Added]
    |    |_____Patch Client [Added]
    |    |_____Patch Attachment Facility [Added]
    |_____WebLogic Server 10.3.0.0 [Added]
    |    |_____Core Application Server [Added]
    |    |_____Administration Console [Added]
    |    |_____Configuration Wizard and Upgrade Framework [Added]
    |    |_____Web 2.0 HTTP Pub-Sub Server [Added]
    |    |_____WebLogic JDBC Drivers [Added]
    |    |_____Third Party JDBC Drivers [Added]
    |    |_____WebLogic Server Clients [Added]
    |    |_____WebLogic Web Server Plugins [Added]
    |    |_____UDDI and Xquery Support [Added]
    |    |_____Server Examples [Added]
    |    |_____Evaluation Database [Added]
    |    |_____Workshop Code Completion Support [Added]
    |_____Workshop 10.3.0.0 [Not Installed]
         |_____Workshop for WebLogic [Not Installed]
         |_____Workshop Runtime Framework [Not Installed]
         |_____WebLogic Server Tooling [Not Installed]
         |_____Workshop AST Model Tooling [Not Installed]
         |_____Workshop Commonviews Tooling [Not Installed]
         |_____Workshop Crashweb Tooling [Not Installed]
         |_____Workshop Upgrade81 Tooling [Not Installed]
         |_____Spring IDE Framework [Not Installed]
         |_____Workshop CIE Features [Not Installed]
         |_____Workshop Launcher [Not Installed]
         |_____Workshop Eclipse Framework [Not Installed]
[zhuying@sor-sys logs]$ 

4.日誌級別

WebLogic Server 具有從 TRACE 到 EMERGENCY 的預定義嚴重程度,在將日誌請求調度給記錄器時,會將對應嚴重程度轉換爲日誌級別。日誌級別對象可以指定下列按照最小影響到最大影響的順序排列的任意值:TRACE、DEBUG、INFO、NOTICE、WARNING、ERROR、CRITICAL、ALERT、EMERGENCY

日誌級別設定:BEA_HOME/wlserver_10.3/server/lib/consoleapp/consolehelp/WEB-INF/classes/{log4j.propertieslogging.properties}



WeblogicJMS配置:

http://www.builder.com.cn/2007/1102/598634.shtml

http://blog.csdn.net/zxm0412/article/details/2419226

http://vivaxiaohua.iteye.com/blog/1450040

http://www.blogjava.net/shmily432685/archive/2005/12/05/22502.html

發佈了238 篇原創文章 · 獲贊 74 · 訪問量 356萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章