Weblogic安装部署一、首先上官网下载Weblogic的window x86版本和Linux x86(32bit)版本,地址:/technetwork/middleware/weblogic/downloads/index.html选择AcceptLicense Agreement,点击你要下载的版本就可以下载,下载需要用户登录:用户名:justinhits@密码:1nf0h)W1下载后:linux版本:oepe111130_wls1032_linux32.binWindow版本:wls1032_win32.exe二、安装只要运行安装程序,跟着向导一步一步进行就可以啦。
(windows双击安装程序、linux命令(cd安装程序所在目录然后./oepe111130_wls1032_linux32.bin))注意2点1.记录下自己填写的配置管理用户名和密码。
2.新建域的位置。
(我放在F:\bea\user_projects\domains\mydomain)三、部署应用项目(部分摘自/p-36051142.html):自动布署、命令行布署(可与Ant结合)、控制台(console)布署。
下面简要说明三种布署方式。
1.启动weblogic,浏览器地址http://127.0.0.1:7001/console,输入你安装的时候记录的配置管理用户名和密码,点击登录。
2进入控制台界面:3点击部署进入部署界面:3点击安装按钮进入安装界面,进行安装:选择你要安装项目的根目录,点击下一步。
输入你项目部署的名称,访问位置,点击完成。
4设置项目的上下文根:需要在在你的web应用的WEB-INF文件中创建一个文件(weblogic.xml),内容如下<?xml version="1.0"encoding="UTF-8"?><weblogic-web-app><context-root>/struts2</context-root></weblogic-web-app>5当项目使用到外部的jar包的设置1当直接用windows下的welbogic.cmd或者linux下的weblogic.sh 直接启动,就需要在\bea\user_projects\domains\mydomain\bin下找到这2个命令,用文本编辑器打开,修改set SAVE_CLASSPATH=加入你需要jar包的地址:如E:\workspace\car_java\WebRoot\WEB-INF\lib\antlr-2.7.6.jar ;E:\workspace\car_java\WebRoot\WEB-INF\lib\sapjco.jar;%CL ASSPATH%如果是用myeclipse启动weblogic,也需要加入:然后重新启动weblogic,通过http://127.0.0.1:7001/struts2访问项目起始页:通过点击后台action调用正常。
说明项目部署成功。
Linux 可视化界面部署和windows基本是一致的就是启动、关闭weblogic时候用的是mydomain/bin目录下的startWebLogic.sh 和stopWebLogic.sh命令Linux 命令行界面的安装及部署1切换到命令界面:打开一个终端,输入init 3,然后回车就切换到命令行界面。
运行安装程序:以下是来自网址/techdoc/install/2008/02/05/978116.shtml 概括了一下注意以下几点就OK啦:1 我是用root用户登录的,所以不用权限设置,用普通用户不能运行安装程序的需要授权文件夹权限,su切换下好了2 提前建好weblogic安装的目录,选择的时候方便。
3 安装好以后进入1.1 部署前准备把WebLogic的bin包放在/home目录上.1、创建weblogic用户组。
groupadd weblogicuseradd -g weblogic weblogicpasswd weblogic(修改weblogic密码)2、创建/var/web/jsp/bea目录,修改目录所有者权限mkdir /var/web/jsp/beachown –Rf weblogic:weblogic /var/web/jsp/bea3、用weblogic用户登陆系统,修改配置文件。
~/.bash_profile增加export LANG=en_US.iso8859151.2 安装WebLogic 8.1赋予.bin可执行权限:chmod a+x platform814_linux32.bin执行./platform814_linux32.bin -mode=console进入控制台安装的欢迎界面,键入[Next]继续此时出现授权许可协议,读完后键入[Yes]继续提示选择一个BEA主目录:输入:/var/web/jsp/bea确认BEA主目录,键入[1]继续选择安装类型, 键入[1]继续选择安装路径,默认,输入[next]继续。
确认安装路径。
键入[1]继续安装完毕。
注:(两个补丁文件见补丁包的说明)1.3 创建服务使用WebLogic用户登录系统:[weblogic@jcms bin]$ cd /var/web/jsp/bea/weblogic81/common/bin [weblogic@jcms bin]$ ./config.shUnable to instantiate GUI, defaulting to console mode.进入设置:Create or Extend a Configuration:---------------------------------Choose between creating and extending a configuration. Based on your selection, the Configuration Wizard guides you through the steps togenerate 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]> 1Select a Domain Template:-------------------------Please select a template from the list or select another directory of templates. *[/home/weblogic/bea/weblogic81/common/templates/domains]1|Basic WebLogic Platform Domain 8.1.3.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.2|Basic WebLogic Portal Domain 8.1.3.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.3|Basic WebLogic Integration Domain 8.1.3.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, Web Services, custom controls and business processes. Use domains created from this template for development of WebLogic|Integration applications.4|Basic WebLogic Workshop Domain 8.1.3.0| BEA Systems, Inc.Enter index number to select OR [Down][Exit][Previous][Next]> downSelect a Domain Template:-------------------------Please select a template from the list or select another directory of templates.| 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.->5|Basic WebLogic Server Domain 8.1.3.0| BEA Systems, Inc.| Create a basic WebLogic Server domain without installing sample applications.6|WebLogic Server Examples Domain 8.1.3.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.7|Avitek Medical Records Sample Domain 8.1.3.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. 8|Select another directory locationEnter index number to select OR [Up][Exit][Previous][Next]>5Select a Domain Template:-------------------------Please select a template from the list or select another directory of templates.*The selected template is the same as the one you are working on. Do you *want to reload the template ?->1|Yes2|NoEnter index number to select OR [Exit][Next]> 1Choose Configuration Option:-------------------------*Do you want to run the wizard in express mode?->1|Yes2|NoEnter index number to select OR [Exit][Previous][Next]> 1Configure Administrative Username and Password:--------------------Create a user automatically assigned to the Administrative Role. This user is the default administrator used to start development modeservers.| 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]> 2Configure Administrative Username and Password:--------------------Create a user automatically assigned to the Administrative Role. This user is the default administrator used to start development modeservers."*User password:" = []Input new *User password: OR [Exit][Reset][Accept]> [输入八位密码] Configure Administrative Username and Password:--------------------Create a user automatically assigned to the Administrative Role. This user is the default administrator used to start development modeservers.| 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 ChangesEnter option number to select OR [Exit][Previous][Next]> 3Configure Administrative Username and Password:--------------------Create a user automatically assigned to the Administrative Role. This user is the default administrator used to start development modeservers."*Confirm user password:" = []Input new *Confirm user password: OR [Exit][Reset][Accept]> [确认八位密码] ///口令必须与上面的一样Configure Administrative Username and Password:--------------------Create a user automatically assigned to the Administrative Role. This user is the default administrator used to start development modeservers.| 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 ChangesEnter option number to select OR [Exit][Previous][Next]> nextDomain Mode Configuration:--------------------------Enable Development or Production Mode for this domain.->1|Development Mode2|Production ModeEnter index number to select OR [Exit][Previous][Next]> 2Java SDK Selection:-------------------->1|JRockit SDK 1.4.2_04-8130 @ /home/weblogic/bea/jrockit81sp3_142_04 2|Sun SDK 1.4.2_04 @ /home/weblogic/bea/jdk142_043|Other Java SDKEnter index number to select OR [Exit][Previous][Next]> 1Select the target domain directory for this configuration:----"T arget Location" = [/home/weblogic/bea/user_projects/domains]Input new T arget Location OR [Exit][Previous][Next]> [直接回车]Edit Domain Information:------------------------| Name | Value |_|________|__________|1| *Name: | mydomain |Enter value for "Name" OR [Exit][Previous][Next]> [输入名称或者直接回车]Creating Domain...0% 25% 50% 75% 100%[------------|------------|------------|------------][***************************************************]**** Domain Created Successfully! ****完成服务的建立!1.4部署应用1.4.1启动和关闭1、如何启动WebLogic[weblogic@jcms bin]$ cd /var/web/jsp/bea/user_projects/domains/mydomain [weblogic@jcms bin]$ ./startWebLogic.sh (需要输入用户名密码)2、如何关闭WebLogic[weblogic@jcms bin]$ ./stopWebLogic.sh1.4.2 设置自动启动WebLogic1、无需输入用户名密码启动关闭weblogic。