首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

linux上weblogic的安装和部署

2012-08-24 
linux下weblogic的安装和部署从weblogic的安装开始。一.weblogic的安装1.创建weblogic的组和用户这是为了更

linux下weblogic的安装和部署
从weblogic的安装开始。
一.weblogic的安装
1.创建weblogic的组和用户
这是为了更好的管理你的Linux服务器。当然,如果你只是玩玩的,那么直接用root也没什么不可以。
创建组:
[root@localhost ~]# groupadd -g 501 weblogic
上面的-g参数是用来指定GID的。上面命令的翻译过来就是添加一个GID为501的名为weblogic的组。GID在500以前的一般是系统级的。看看是否成功创建了组:
[root@localhost ~]# cat /etc/group
在group文件的最下方应该可以看到刚才创建的群组weblogic:x:501:
创建用户:
[root@localhost ~]# useradd -u 1001 -g 501 weblogic
上面的-u参数是指定UID的,-g参数是指定其所属组GID的。翻译过来就是添加一个UID为1001的并且属于刚才创建的组的名为weblogic的用户。同样,UID在1000以前的属于系统级的。看看是否成功创建了用户:
[root@localhost ~]# cat /etc/passwd
在该文件内容的最下方应该可以看到所创建的用户weblogic:x:1001:501::/home/weblogic:/bin/bash
2.创建一个目录存放安装文件
[root@localhost ~]# mkdir /home/weblogic/share/
毕竟Linux用着不如windows顺手,下载安装文件还是用windows吧。完了利用SMB或者直接用SSH传过来就行。
[root@localhost ~]# cd /home/weblogic/share/
Linux的权限体系非常严格,需要对文件赋予权限后才能做相应操作。更改share文件夹的所有者为weblogic。
[root@localhost ~]# chown -R /home/weblogic/share weblogic
[root@localhost share]# ls -al
drwxrwxrwx 2 root     root          4096 08-08 13:51 .
drwx------ 4 weblogic weblogic      4096 08-08 12:47 ..
-rwxrwx--- 1 weblogic weblogic 358708754 2008-08-15 server816_linux32.bin
3.安装过程
既然所有者已经给了weblogic了,当然我们需要切换用户去安装。
[root@localhost share]# su weblogic
以下就开始执行安装文件进行安装了:
[weblogic@localhost share]$ ./server816_linux32.bin
Extracting 0%....................................................................................................100%
Unable to instantiate GUI, defaulting to console mode.

解包需要一点时间,耐心等待一小会。之后会出现安装欢迎界面:



<------------------------------- BEA Installer - WebLogic Server 8.1 SP6 ------------------------------->

Welcome:
--------

This installer will guide you through the installation of WebLogic Server 8.1 SP6. 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".


后面还有,输入Next,回车继续到许可协议页面:

Enter [Exit][Next]>Next
<------------------------------- BEA Installer - WebLogic Server 8.1 SP6 ------------------------------->

BEA Systems License Agreement:
------------------------------

BEA SYSTEMS, INC. SOFTWARE LICENSE AGREEMENT

USE OF SOFTWARE ORDERED FROM BEA SYSTEMS, INC. ("BEA") IS PROVIDED ONLY UNDER LICENSE FROM BEA. PLEASE READ THE FOLLOWING LICENSE CAREFULLY AND INDICATE YOUR ACCEPTANCE BY
CLICKING THE ACCEPTANCE BOX. CERTAIN CAPITALIZED TERMS ARE DEFINED IN SECTION 11.

1.      LICENSE TERMS

a.      WebLogic SDK Use.  The terms of this Section 1(a) are applicable to you if you have registered as a WebLogic SDK customer. Subject to the terms of this Agreement, BEA grants to you a non-exclusive, non-transferable, royalty-free license to use WebLogic SDK solely for Development Use and Scale-Limited Personal Use for the number of users and/or
developers and the number of CPU's, Servers and/or at the Sites, as specified at the time of registration. Third party software products or modules supplied by BEA, if any, may
be used solely with the Software. All rights not specifically granted to you herein are retained by BEA.

b.      WebLogic SDK Pro Use.  The terms of this Section 1(b) are applicable to you if you have registered as a WebLogic SDK Pro customer. Subject to the terms of this Agreement, BEA grants to you a non-exclusive, non-transferable, fee-bearing license to use WebLogic SDK Pro solely for Development Use and Scale-Limited Commercial Use for the number of users
and/or developers and the number of CPU's, Servers and/or at the Sites, as specified on BEA's invoice. Third party software products or modules supplied by BEA, if any, may be
used solely with the Software. All rights not specifically granted to you herein are retained by BEA.

c.      Evaluation Use.  The terms of this Section 1(c) are applicable to you if you have registered as an Evaluation Use customer. Subject to the terms of this Agreement, BEA grants to you a non-exclusive, non-transferable, license to use the Software solely for Evaluation Use. Third party software products or modules supplied by BEA, if any, may be used
solely with the Software, and may be subject to your acceptance of terms and conditions provided by such third parties. This license begins upon downloading and ends if and when terminated by BEA in accordance with this Agreement. When the license terminates you must stop using the Software.  All rights not specifically granted to you herein are
retained by BEA.  Note that not all Software is available for Evaluation Use.  Your Evaluation Use license shall terminate on the earlier of: (i) the license key provided by BEA expiring or ceasing to function; (ii) at any time upon notice from BEA; or (iii) the expiration date indicated in any related BEA quotation or order document.

d.      Development Use. The terms of this Section 1(d) are applicable to you if you have registered as a Development Use customer. Subject to the terms of this Agreement, BEA grants
Select Option:
    1 - Yes, I agree with the terms of the license
    2 - No, I do not agree with the terms of the license


问是否同意此协议,废话,输入1回车继续:

Enter option number to select OR [Down][Exit][Previous]> 1
<------------------------------- BEA Installer - WebLogic Server 8.1 SP6 ------------------------------->

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

    "BEA Home" = [/home/weblogic/bea]

此处设置程序主目录,输入Next表示接受默认路径,不然就自己输入一个路径回车:

Input new BEA Home OR [Exit][Previous][Next]> /var/bea 





<------------------------------- BEA Installer - WebLogic Server 8.1 SP6 ------------------------------->

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

    *BEA home choice

->1|Yes, Use this BEA home directory [/var/bea]
   2|No, return to BEA home directory selection

此处确认程序主目录,输入2可以回到上一界面重新设置,输入1表示确认之前的设定,回车继续:

Enter index number to select OR [Exit][Previous][Next]> 1
<------------------------------- BEA Installer - WebLogic Server 8.1 SP6 ------------------------------->

Choose Install Type:
--------------------

->1|Complete
    |Install the complete BEA WebLogic Platform.

   2|Custom Installation
    |Choose software components to install and perform optional configuration.


此处选择安装模式,选择2开始自定义安装;选择1开始完全安装,如果不很熟悉就选1然后回车:

Enter index number to select OR [Exit][Previous][Next]> 1
<------------------------------- BEA Installer - WebLogic Server 8.1 SP6 ------------------------------->

Choose Product Directory:
-------------------------

    "Product Installation Directory" = [/var/bea/weblogic81]

此处设置程序安装路径,可以定义个一个有权限的路径,或者输入Next使用之前设置的程序主目录:

Input new Product Installation Directory OR [Exit][Previous][Next]> Next
<------------------------------- BEA Installer - WebLogic Server 8.1 SP6 ------------------------------->

Choose Product Directory:
-------------------------

->1|Yes, use this product directory [/var/bea/weblogic81]
   2|No, select another product directory

再次确认程序安装路径,输入1回车。之后会出现一个进度条,程序就开始安装了,安装完程序后还会安装SUN的JDK,如果已经有了JDK不想再安装,可以在之前的步骤选择自定义安装,并去掉它。

Enter index number to select OR [Exit][Previous][Next]> 1
<------------------------------- BEA Installer - WebLogic Server 8.1 SP6 ------------------------------->

Installing files..

0%          25%          50%          75%          100%
[------------|------------|------------|------------]
[**************************************************
<------------------------------- BEA Installer - WebLogic Server 8.1 SP6 ------------------------------->

Installing JDK....

0%          25%          50%          75%          100%
[------------|------------|------------|------------]
[*************************************************
<------------------------------- BEA Installer - WebLogic Server 8.1 SP6 ------------------------------->

Installation Complete


Congratulations! WebLogic Server 8.1 SP6 has been successfully installed to /var/bea/weblogic81.

OK,程序安装完成,按回车结束。
Press any key to continue OR [Exit]>

二.新建domain域
在安装主目录下的/weblogic81/common/bin/下执行config.sh
[weblogic@localhost bin]$ ./config.sh
Unable to instantiate GUI, defaulting to console mode.





<---------------------------------- BEA WebLogic Configuration Wizard ---------------------------------->

Create or Extend a Configuration:
---------------------------------

Choose between creating and extending a configuration. Based on your selection, the Configuration Wizard guides you through the steps to generate a new or extend an existing
configuration.

->1|Create a new WebLogic configuration
    |    Start here to create a WebLogic configuration in your projects directory.

   2|Extend an existing WebLogic configuration
    |    Start here to extend an existing WebLogic configuration.  Use this option to add applications and services, including Database access (JDBC) and Messaging (JMS). This
    |option also enables you to extend functionality by enabling WebLogic Workshop.


此处选择选择2为维护现有的domain,输入1回车继续,开始创建一个新的domain:


Enter index number to select OR [Exit][Next]> 1
<---------------------------------- BEA WebLogic Configuration Wizard ---------------------------------->

Select a Domain Template:
-------------------------

Please select a template from the list or select another directory of templates.

    * [/var/bea/weblogic81/common/templates/domains]

   1|WebLogic Server Examples Domain 8.1.6.0
    |  BEA Systems, Inc.
    |  Create the WebLogic Server Examples domain in a directory outside of the installed kit.  The Examples domain contains a collection of examples to show best practices for
    |coding individual J2EE APIs.

   2|Basic WebLogic Workshop Domain 8.1.6.0
    |  BEA Systems, Inc.
    |  Create a basic WebLogic Workshop domain, without installing sample applications.   Domains created from this template will support the WebLogic Server and WebLogic
    |Workshop runtime functionality, including support for J2EE applications, Web applications, Web Services and custom controls.  Use domains created from this template for
    |development of WebLogic Workshop applications.

->3|Basic WebLogic Server Domain 8.1.6.0
    |  BEA Systems, Inc.
    |  Create a basic WebLogic Server domain without installing sample applications.

   4|Avitek Medical Records Sample Domain 8.1.6.0
    |  BEA Systems, Inc.
    |  Create the Avitek Medical Records domain in a directory outside of the installed kit.  The Avitek Medical Records is a WebLogic Server sample application suite that
    |concisely demonstrates all aspects of the J2EE platform.

   5|Select another directory location

此处根据用途选择不同的配置模版,输入3回车继续,创建一个server domain:


Enter index number to select OR [Exit][Previous][Next]> 3
<---------------------------------- BEA WebLogic Configuration Wizard ---------------------------------->

Choose Configuration Option:
----------------------------

    *Do you want to run the wizard in express mode?

->1|Yes

   2|No

此处提示是否进行快速配置,选择2,则开始自定义配置,如果需要更改端口号等配置就输入2,不过此处稍显繁琐,可以之后修改config.xml文件,故此处推荐输入1回车继续:



Enter index number to select OR [Exit][Previous][Next]> 1
<---------------------------------- BEA WebLogic Configuration Wizard ---------------------------------->

Configure Administrative Username and Password:
-----------------------------------------------

Create a user automatically assigned to the Administrative 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:       | The default administration user |

Select Option:
    1 - Modify "User name"
    2 - Modify "User password"
    3 - Modify "Confirm user password"
    4 - Modify "Description"

此处为控制台设置用户名和密码,用户名默认为weblogic,可以输入1更改,此处输入2,设置密码:


Enter option number to select OR [Exit][Previous][Next]> 2
<---------------------------------- BEA WebLogic Configuration Wizard ---------------------------------->

Configure Administrative Username and Password:
-----------------------------------------------

Create a user automatically assigned to the Administrative Role. This user is the default administrator used to start development mode servers.

    "*User password:" = []

输入一个密码后回车:


Input new *User password: OR [Exit][Reset][Accept]>




<---------------------------------- BEA WebLogic Configuration Wizard ---------------------------------->

Configure Administrative Username and Password:
-----------------------------------------------

Create a user automatically assigned to the Administrative 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:       |   The default administration user    |

Select Option:
    1 - Modify "User name"
    2 - Modify "User password"
    3 - Modify "Confirm user password"
    4 - Modify "Description"
    5 - Discard Changes

输入3进行验证密码,要与上一步的密码一致:


Enter option number to select OR [Exit][Previous][Next]> 3
<---------------------------------- BEA WebLogic Configuration Wizard ---------------------------------->

Configure Administrative Username and Password:
-----------------------------------------------

Create a user automatically assigned to the Administrative Role. This user is the default administrator used to start development mode servers.

    "*Confirm user password:" = []

输入验证密码后回车继续:


Input new *Confirm user password: OR [Exit][Reset][Accept]>




<---------------------------------- BEA WebLogic Configuration Wizard ---------------------------------->

Configure Administrative Username and Password:
-----------------------------------------------

Create a user automatically assigned to the Administrative 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:       |   The default administration user    |

Select Option:
    1 - Modify "User name"
    2 - Modify "User password"
    3 - Modify "Confirm user password"
    4 - Modify "Description"
    5 - Discard Changes


选项4可以为此server添加备注,选项5为恢复默认。没什么事的话就输入Next回车继续:

Enter option number to select OR [Exit][Previous][Next]> Next
<---------------------------------- BEA WebLogic Configuration Wizard ---------------------------------->

Domain Mode Configuration:
--------------------------

Enable Development or Production Mode for this domain.

->1|Development Mode

   2|Production Mode

此处询问选择开发模式还是产品模式,当然选择1了,除非你习惯每次起服务都输入用户名和密码,输入1回车继续:


Enter index number to select OR [Exit][Previous][Next]> 1
<---------------------------------- BEA WebLogic Configuration Wizard ---------------------------------->

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

->1|JRockit SDK 1.4.2_10-8160 @ /var/bea/jrockit81sp6_142_10
   2|Sun SDK 1.4.2_11 @ /var/bea/jdk142_11
   3|Other Java SDK

此处询问server将使用的JDK,根据自己需要选择,此处选择了之前自动安装的SUN_JDK_1.4.2_11


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





<---------------------------------- BEA WebLogic Configuration Wizard ---------------------------------->

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

    "Target Location" = [/var/bea/user_projects/domains]

此处设置domain所在的路径,可以输入一个指定的路径或输入Next接受默认


Input new Target Location OR [Exit][Previous][Next]> Next
<---------------------------------- BEA WebLogic Configuration Wizard ---------------------------------->

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

    |  Name  |  Value   |
   _|________|__________|
   1| *Name: | mydomain |

此处可更改domain的名称输入新的名称或输入Next接受默认名称:


Enter value for "Name" OR [Exit][Previous][Next]> Next
<---------------------------------- BEA WebLogic Configuration Wizard ---------------------------------->

Creating Domain...

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


**** Domain Created Successfully! ****
耐心等待进度到100%,设置完成。访问http://127.0.0.1/console开始吧!

三.相关问题

1.关于SSH终端乱码

用SSH终端登录可能产生乱码,解决方法:

登陆后输入:

export LANG=C

export LANG=zh_ZN.GBK
export LC_ALL=zh_CN.GBK

2.关于部署完成后其它机器无法访问的问题

如果出现此情况,请检查防火墙配置

输入setup后在防火墙设置中‘允许进入’选项选中HTTP,之后在其它端口项填写Web程序端口号即可解决。

热点排行