Detailed weblogic

I. Introduction

WebLogic American Oracle company produced an application server, precisely, is a JAVAEE based architecture middleware, WebLogic is used to develop, integrate, deploy and manage large distributed Web applications, Web applications and database applications Java application server. The dynamic features of Java and Java Enterprise security standards introduced large-scale network application development, integration, deployment, and among management.
WebLogic is an American
oracle one of the main products, the Department of mergers and acquisitions BEA come. Is the main commercial market of Java (J2EE) application server software one (application server), the world's first successful commercial J2EE application servers, has launched version to 12c (12.1.3). And this product also extends the middleware WebLogic Portal, WebLogic Integration and other enterprises use (but mainly to the current Oracle Fusion Middleware Fusion Middleware to replace the enterprise package outside these WebLogic Server), and OEPE (Oracle Enterprise Pack for Eclipse) development tool. (From Baidu Encyclopedia)

Official documents Address: http://docs.oracle.com/en/middleware/index.html

Second, the advantages

WebLogic Server has a variety of features and benefits required to develop and deploy mission-critical e-commerce Web applications.

  • Standard
    full support for a variety of industry standards, including EJB, JSP, Servlet, JMS, JDBC, XML ( a subset of the Standard Generalized Markup Language) and WML, the implementation of Web application system more simple and investment protection, while also the development of standards-based solutions easier.
  • Scalability
    WebLogic Server with its highly scalable architecture system known in the industry, including the sharing of client connections, resource pooling and dynamic web pages and EJB components of the cluster.
  • Rapid development
    with the support of EJB and JSP and Servlet WebLogic Server component architecture of the system, can accelerate the speed to market. When fit, to simplify the development of these open standards and WebGain Studio, and can play existing skills to quickly deploy applications.

Third, servers and other differences

  • tomcat (free)
    Tomcat can only be considered Web Container, is officially designated JSP & Servlet container. Only to realize the related specifications JSP / Servlet does not support EJB (Mishap ah)! But with Tomcat and apache jboss j2ee application server functions can be implemented
    in general consider stucts peer architecture tomcat on it, but if you consider the words of EJB, WebLogic It is a better choice.
  • Jboss (free)
    JBoss EJB container is a management and server that supports EJB 1.1, EJB 2.0 and EJB3 specification. JBoss core services but does not include support for servlet / JSP the WEB container, Tomcat or Jetty generally binding uses.
  • WebLogic (charges)
    WebLogic is j2ee application server (application server), comprising ejb, jsp, servlet, jms etc., versatile. Is a commercial software in the container (JSP, servlet, EJB, etc.) ranked first, and provides other editing tools such as JAVA, is an integrated development and runtime environment. toll

Four, Windows download and install

Address:
http://www.oracle.com/technetwork/middleware/weblogic/downloads/index.html?ssSourceSiteId=ocomen
Release Notes:

zip .. green version, unzip can run with.
Generic ... After downloading a jar package, the installation wizard with
the rest of the file with the development environment of each system, larger.
Here we download a second, the installation files with the wizard.

Once downloaded, the file is an executable jar file, so we enter into the / bin directory under jdk system, execute the command window

  1 the Java -jar downloaded file weblogic
  • 1


Start the installation wizard to install, the installation steps is omitted here.

After completion of the installation starting webligic you can see the following:

Then you can view in your browser weblogic management platform
HTTP: // localhost: 7001 / Console (default port 7001, and tomcat8080 the same)

The first time you start the following page, the system configuration relevant, and so will a will can see management platform

Fifth, under linux installation

下载Linux版的jdk 安装并设置环境变量,具体方法参照各个linux发行版本的安装命令。
这里我们创建新的用户用于安装weblogic

  1 # groupadd weblogic  //创建组
  2 # useradd -g weblogic weblogic//创建用户并指定组
  3 # passwd weblogic //修改密码
  4 # su - weblogic  切换用户

安装与windows下一样,使用java 执行jar文件即可。

启动安装向导安装步骤和windows下一样。

进行到这步的时候我们选择生产环境,和之前的windows不一样,windows下我们可以选择开发版。

完成之后如下图:

我们到weblogic安装目录下启动weblogic
因为是生产环境,在启动日志时会提示输入密码
输入我们设置的密码最后看到启动成功。

六、weblogic配置

6.1 生产模式下启动取消密码输入

进入到weblogic安装目录下,进到user_projects/domains/base_domain/servers/AdminServer 下
新建文件夹 命名为:security
进入文件夹,新建文件boot.properties,内容如下:

  1 username=登陆用户名
  2 password=密码

再次启动则不会让你输入用户名密码。

6.2 生产模式与开发模式切换

在生产环境中,进入到当前域的根目录下。
在config/config.xml中可以通过配置从生产环境切换开发环境

将true改为false即可,这是在生产模式中改开发模式,在开发模式中看不到这段配置项

6.3 增加多个域

进入D:\Oracle\Middleware\Oracle_Home\wlserver\common\bin下
运行config.cmd linux下运行config.sh可启动配置向导,可以添加新的域。

6.4 增加多个server

进入weblogic管理页面,点击进入服务器管理页面
点击新建,输入服务器名称以及端口

部署应用后目标选择新建的server,输入下面的命令可以启动该server

startManagedWebLogic.cmd managed_server_name admin_url (Windows)  
startManagedWebLogic.sh managed_server_name admin_url (UNIX) 

如:
c:\Oracle\Middleware\user_projects\domains\mydomain\bin\startManagedWebLogic.cmd myManagedServer
http://AdminHost:7001
managed_server_name将指定受管服务的名称,admin_url指定管理服务监听地址(主机、IP地址,或者DNS名称),端口。如果管理服务和受管服务在一起的话,可以省略admin_url

6.5 修改weblogic 端口

进入D:\Oracle\Middleware\Oracle_Home\user_projects\domains\base_domain\config
编辑config.xml

6.6 修改weblogic jdk 位置

说明:
1.D:\bea为笔者weblogic安装目录
2.D:\bea\user_projects\domains\base_domain为笔者域创建目录

方法1:
修改文件:D:\bea\wlserver_10.3\common\bin\commEnv.cmd

修改如下行:

@rem Reset java Home
set JAVA_HOME=d:\bea\jdk160_05

方法2:
修改文件:D:\bea\user_projects\domains\base_domain\bin\setDomainEnv.cmd

在下面行
call “%WL_HOME%\common\bin\commEnv.cmd”

后面增加
set JAVA_HOME=d:\bea\jdk160_05

方法3:
修改文件:D:\bea\user_projects\domains\base_domain\bin\startWebLogic.cmd

在下面行
%JAVA_HOME%\bin\java %JAVA_VM% -version

前面增加:
set JAVA_HOME=d:\bea\jdk160_05

方法4:
修改domain中的 setDomainEnv.cmd 文件,将 SUN_JAVA_HOME 和 JAVA_HOME 修改为安装后的JDK路径。

set SUN_JAVA_HOME=C:\Program Files\Java\jdk1.6.0_27

if “%JAVA_VENDOR%”==”Oracle” (
set JAVA_HOME=�A_JAVA_HOME%
) else (
if “%JAVA_VENDOR%”==”Sun” (
set JAVA_HOME=%SUN_JAVA_HOME%
) else (
set JAVA_VENDOR=Sun
set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_27
)
)

七、weblogic 应用开发

7.1、环境搭建

下载eclipse 以及 oracle eclipse 开发工具
eclipse下载地址参见官网
oracle eclipse 开发工具下载地址:
http://www.oracle.com/technetwork/developer-tools/eclipse/downloads/index.html


也可以在下载weblogic时选择后三个文件,对应系统的全部环境开发工具包括eclipse

或者可以打开Eclipse的安装新软件的页面,Help -> Install New Software。
在Name处输入oepe(可以随便填,只是标记下这个url是什么),
Location处输入
http://download.oracle.com/otn_software/oepe/12.1.3.3.1/luna/repository(之后的版本需jdk8支持)
我的eclipse版本为luna
可以在这个地址
http://www.oracle.com/technetwork/developer-tools/eclipse/downloads/index.html
找到相应的插件地址:

点击OK。

点开Tools下来菜单,选择Oracle Weblogic Server Tools,点击Next。

我安装了如下插件:

7.2、添加weblogic server

打开添加server的窗口,这里我们展开Oracle

选择相应版本的weblogic server,可以自己设置weblogic server名字,下一步;

weblogic home 选择到本地weblogic 的 wlserver目录,
java home 会自动选择jdk的位置,也可以自己选择。next。

选择到本地weblogic 一个域的路径

安装好结果如下

7.3、部署

进入weblogic 后台管理平台,进入部署页面,部署项目。

Guess you like

Origin www.cnblogs.com/lz1996/p/12511133.html