weblogic10.3命令行的安装和配置_Tomcat, WebLogic及J2EE讨论区_Weblogic技术|Tuxedo技术|中间件技术|Oracle论坛|JAVA论坛|Linux/Unix技术|hadoop论坛_联动北方技术论坛  
网站首页 | 关于我们 | 服务中心 | 经验交流 | 公司荣誉 | 成功案例 | 合作伙伴 | 联系我们 |
联动北方-国内领先的云技术服务提供商
»  游客             当前位置:  论坛首页 »  自由讨论区 »  Tomcat, WebLogic及J2EE讨论区 »
总帖数
1
每页帖数
101/1页1
返回列表
0
发起投票  发起投票 发新帖子
查看: 3820 | 回复: 0   主题: weblogic10.3命令行的安装和配置        下一篇 
红与黑
注册用户
等级:上尉
经验:644
发帖:51
精华:1
注册:2013-2-25
状态:离线
发送短消息息给红与黑 加好友    发送短消息息给红与黑 发消息
发表于: IP:您无权察看 2014-9-5 11:11:43 | [全部帖] [楼主帖] 楼主

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.properties,logging.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




赞(0)    操作        顶端 
总帖数
1
每页帖数
101/1页1
返回列表
发新帖子
请输入验证码: 点击刷新验证码
您需要登录后才可以回帖 登录 | 注册
技术讨论