linux环境下安装、部署weblogic8.1.5
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
部署前准备
创建Weblogic用户组
groupadd weblogic
useradd –g weblogic weblogic
passwd weblogic(修改weblogic用户密码)
创建Weblogic部署目录,修改目录及安装文件的权限
mkdir /opt/middleware/weblogic815
chown –Rf weblogic:weblogic /opt/middleware/weblogic815
chown weblogic:weblogic weblogic815_linux32.bin
chmod a+x weblogic815_linux32.bin
用weblogic用户登录系统
su - weblogic
安装Weblogic8.1.5
执行./ weblogic815_linux32.bin –mode=console
进入控制台安装的欢迎界面
Extracting 0%....................................................................................................100%
Unable to instantiate GUI, defaulting to console mode.
<----------------- BEA Installer - WebLogic Platform 8.1 SP5 ----------------->
Welcome:
--------
This installer will guide you through the installation of WebLogic Platform 8.1 SP5. 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]继续
此时出现授权许可协议,读完后键入[1]继续
<----------------- BEA Installer - WebLogic Platform 8.1 SP5 ----------------->
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,
Select Option:
1 - Yes, I agree with the terms of the license
2 - No, I do not agree with the terms of the license
提示选择一个BEA主目录
<----------------- BEA Installer - WebLogic Platform 8.1 SP5 ----------------->
Choose BEA Home Directory:
--------------------------
"BEA Home" = [/home/weblogic/bea]
Input new BEA Home OR [Exit][Previous][Next]>
输入:/opt/middleware/weblogic815/bea
确认BEA主目录
*BEA home choice
->1|Yes, Use this BEA home directory [/opt/middleware/weblogic815/bea]
2|No, return to BEA home directory selection
输入[1]继续
<----------------- BEA Installer - WebLogic Platform 8.1 SP5 ----------------->
Choose Install Type:
--------------------
->1|Complete
|Install the complete BEA WebLogic Platform.
2|Custom Installation
|Choose software components to install and perform optional configuration. Enter index number to select OR [Exit][Previous][Next]>
选择安装类型,键入[1]继续,完全安装
<----------------- BEA Installer - WebLogic Platform 8.1 SP5 ----------------->
Choose Product Directory:
-------------------------
"Product Installation Directory" = [/opt/middleware/weblogic815/bea/weblogic81] Input new Product Installation Directory OR [Exit][Previous][Next]>
选择安装路径,默认,键入[Next]继续
<----------------- BEA Installer - WebLogic Platform 8.1 SP5 ----------------->
Choose Product Directory:
-------------------------
->1|Yes, use this product directory
|[/opt/middleware/weblogic815/bea/weblogic81]
2|No, select another product directory
Enter index number to select OR [Exit][Previous][Next]>
确认安装路径,键入[1]继续
<----------------- BEA Installer - WebLogic Platform 8.1 SP5 ----------------->
Installing files..
0% 25% 50% 75% 100%
[------------|------------|------------|------------]
[***************************************************]
<----------------- BEA Installer - WebLogic Platform 8.1 SP5 ----------------->
Installing JDK....
0% 25% 50% 75% 100%
[------------|------------|------------|------------]
[***************************************************]
<----------------- BEA Installer - WebLogic Platform 8.1 SP5 ----------------->
Installation Complete
Congratulations! WebLogic Platform 8.1 SP5 has been successfully installed to /opt/middleware/weblogic815/bea/weblogic81.
Press any key to continue OR [Exit]>
安装完毕
创建服务
使用weblogic用户登录系统
cd /opt/middleware/weblogic815/bea/weblogic81/common/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.
Enter index number to select OR [Exit][Next]>
创建一个新的weblogic配置,键入[1]继续
<--------------------- BEA WebLogic Configuration Wizard --------------------->
Select a Domain Template:
-------------------------
Please select a template from the list or select another directory of templates.
* [/opt/middleware/weblogic815/bea/weblogic81/common/templates/domains]
1|Basic WebLogic Portal Domain 8.1.5.0
| BEA Systems, Inc.
| Create a basic WebLogic Portal domain, without installing sample
|applications. Domains created from this template will support the
|WebLogic Server, WebLogic Workshop and WebLogic Portal runtime
|functionality, including support for J2EE applications, Web applications,
|Web Services, custom controls and portals. Use domains created from this
|template for development of WebLogic Portal applications.
2|Avitek Medical Records Sample Domain 8.1.5.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.
3|Basic WebLogic Integration Domain 8.1.5.0
| BEA Systems, Inc.
| Create a basic WebLogic Integration domain, without installing sample
|applications. Domains created from this template will support the
|WebLogic Server, WebLogic Workshop and WebLogic Integration runtime
|functionality, including support for J2EE applications, Web applications,
Enter index number to select OR [Down][Exit][Previous][Next]>
选择配置模板,由于没有,键入[Down]继续
<--------------------- BEA WebLogic Configuration Wizard --------------------->
Select a Domain Template:
-------------------------
Please select a template from the list or select another directory of templates.
|Web Services, custom controls and business processes. Use domains created |from this template for development of WebLogic Integration applications.
->4|Basic WebLogic Server Domain 8.1.5.0
| BEA Systems, Inc.
| Create a basic WebLogic Server domain without installing sample
|applications.
5|WebLogic Server Examples Domain 8.1.5.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.
6|Basic WebLogic Platform Domain 8.1.5.0
| BEA Systems, Inc.
| Create a basic WebLogic Platform domain, without installing sample
|applications. Domains created from this template will support the
|WebLogic Server, WebLogic Workshop, WebLogic Integration and WebLogic
|Portal runtime functionality, including support for J2EE applications, Web |applications, Web Services, custom controls, business processes and
|portals. Use domains created from this template for development of
|WebLogic Platform applications.
Enter index number to select OR [Up][Down][Exit][Previous][Next]>
键入[4]继续
<--------------------- BEA WebLogic Configuration Wizard --------------------->
Choose Configuration Option:
----------------------------
*Do you want to run the wizard in express mode?
->1|Yes
2|No
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"
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
Enter option number to select OR [Exit][Previous][Next]>
确认密码,长度最小8个字符,键入[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
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
Enter index number to select OR [Exit][Previous][Next]>
选择产品模式/开发模式。
系统实施时应选择产品模式,键入[2]继续<--------------------- BEA WebLogic Configuration Wizard --------------------->
Java SDK Selection:
-------------------
->1|JRockit SDK 1.4.2_08-8150 @
|/opt/middleware/weblogic815/bea/jrockit81sp5_142_08
2|Sun SDK 1.4.2_08 @ /opt/middleware/weblogic815/bea/jdk142_08
3|Other Java SDK
Enter index number to select OR [Exit][Previous][Next]>
选择Java虚拟机类型,这里选择Sun的JDK,键入[2]继续
<--------------------- BEA WebLogic Configuration Wizard --------------------->
Select the target domain directory for this configuration:
----------------------------------------------------------
"Target Location" = [/opt/middleware/weblogic815/bea/user_projects/domains]
Input new Target Location OR [Exit][Previous][Next]>
键入[回车]继续
<--------------------- BEA WebLogic Configuration Wizard --------------------->
Edit Domain Information:
------------------------
| Name | Value |
_|________|__________|
1| *Name: | mydomain |
Enter value for "Name" OR [Exit][Previous][Next]>
输入domain名称或直接回车
<--------------------- BEA WebLogic Configuration Wizard --------------------->
Creating Domain...
0% 25% 50% 75% 100%
[------------|------------|------------|------------]
[***************************************************]
**** Domain Created Successfully! ****
服务建立完毕。
部署应用
启动Weblogic
cd /opt/middleware/weblogic815/bea/user_projects/domains/mydomain/ nohup ./startWeblogic.sh &
关闭Weblogic
方法1:./stopWeblogic.sh
方法2:ps –ef | grep weblogic
kill {pid}
无需输入密码启动关闭Weblogic
Weblogic账户在mydomail目录下,新建boot.properties文件,输入:
password=****
username=weblogic
把启动weblogic的用户名密码写进入
部署Web应用
1、登录Weblogic控制台http://ip:port/console,输入用户名及密码
2、控制台主页面
3、依次打开mydomain->Deployments->Web Application Modules,选Deploy a new Web Application Module...显示如下页面:
此处有两种部署方法:
3.1、如果Web应用已经上传至服务器端(/data/webapps/cms40目录)
点击“Target Module”按钮继续
点击“Deploy”按钮继续
部署成功
3.2、如果Web应用在客户端
点击“upload you file(s)”链接继续
点击“浏览”按钮
选择需要上传的war包,点击“Upload”进行上传
点击“Target Module”继续,后面的操作与3.1一致。
配置数据库连接池
依次点开mydomain->Services->JDBC-Connection Pools,见到如下页面
点击“Configure a new JDBC Connection Pool”创建新的数据库连接池,见到如下页面。
数据库类型选择“Oracle”,数据库驱动选择“Oracle `s Driver (Thin) Version:9.0.1,9.2.0.10”,点击“Continue”继续。
填好数据库参数选项,点击“Continue”按钮继续。
确认数据库连接池参数选项,可点击“Test Driver Configuration”测试连接是否成功,或“Skip this Step”跳过此步。
数据库连接验证成功,点击“Create and deploy”结束配置。
配置数据源
依次打开mydomain->Services->JDBC->Data Sources,看到如下界面
点击“Configure a new JDBC Data Source”创建数据源
配置JNDI名称,设置名称为jdbc/EnpJNDI。
点击“Continue”继续
为数据源选择数据库连接池,这里选择刚刚创建的数据库连接池。
点击“Continue”继续
点击“Create”继续
创建成功。