`
linsl
  • 浏览: 71720 次
  • 性别: Icon_minigender_1
  • 来自: 南京
社区版块
存档分类
最新评论

JBOSS 4.05 安装(转)

阅读更多

安装JBOSS

安装JBoss之前必须检查JDK的版本,JBoss要求JDK1.4以上版本,如果需要使用最新的EJB3技术,必须使用JDK1.5版本。

JBoss有两种发布形式,一种是使用zip和tgz压缩文件,只需要解压缩到某个目录即可,需要注意的是目录名如果包含空格可能会在一些平台导致一些问题。这种方式可以最快地得到一个运行实例,但是稍后必须手工配置各种服务。

JBoss目前提供一个GUI安装程序简化安装过程,这个安装程序允许选择需要安装的服务,保证所有服务之间的依赖关系,配置缺省数据源。使用这个安装程序能极大地简化JBoss的安装和配置。这个安装程序可以使用Java Web Start直接从浏览器中运行,也可以下载一个可执行的JAR文件。

基于GUI安装程序的安装步骤如下:

选择安装语言

启动安装程序,选择安装语言,这里选择的安装语言指安装过程中的使用的语言,与JBoss和布署在JBoss的应用程序没有任何关系。

The installer language selection screen.
确认License
The license screen

选择安装路径

选择安装路径,安装程序不会将安装路径信息写入任何脚本或注册表,因此可以自由地移动或重命名JBoss安装目录。注意安装路径最好不要包含空格。

Selecting the installation directory

 选择启动配置

Selecting the installation group

 

启动配置确定可以安装的包集合,具体如下:

NameDescriptionNotes
allA full J2EE 1.4 server profile with enterprise extensions such as clustering and IIOP.  
defaultA base J2EE 1.4 server profile. 
ejb3An EJB3 profile supporting the full EJB3 specification with TomcatThis requires a Java 5 runtime and is not a J2EE 1.4 compatible configuration.
ejb3-clusteredAn EJB3 profile supporting the full EJB3 specification with Tomcat and clustering.This requires a Java 5 runtime and is not a J2EE 1.4 compatible configuration.
jmsA JMS 1.1 server profileThis is not a J2EE 1.4 compatible configuration.
minimalA minimal JMX microkernelThis is not a J2EE 1.4 compatible configuration.
portalA JBoss Portal 2.4 profileThis is not a J2EE 1.4 compatible configuration.
tomcatA Servlet 2.4 container profileThis is not a J2EE 1.4 compatible configuration.

选择启动配置后可以自定义需要安装的服务。安装程序知道服务之间的依赖关系,可以保证安装的服务的一致性,这个特性比通过压缩文件的安装方式更安全。Selecting the packages to install

命名配置

除非需要创建多个配置,通常应该使用缺省的配置名称default,否则必须在启动JBoss时通过-c选项指定JBoss使用的配置名称。

Name the configuration

配置数据源

几乎所有的应用程序都会要求一个数据源,JBoss提供一个内嵌的Hypersonic数据库,并设置了一个缺省的数据源。下面的屏幕用来选择数据源类型。

Configure the default datasource

 

下面的屏幕用来配置数据源参数,使用这种方式配置数据源,必须将相应的JDBC驱动库保存在服务器。

Configure the default datasource

设置隔离级别 

现在可以启用应用程序隔离功能,此功能可以完全分离所有应用程序的类加载。应用程序隔离功能在某些情况是非常有用的,但是这会降低性能。通常会禁用此功能。

Configure application isolation

安全设置

当使用压缩文件进行安装时,所有的服务都没有安全认证,包括管理服务。GUI安装程序可以进行安全设置,推荐作法是启用所有服务的安全设置,并更改admin用户的密码。

JBoss security settings

确认安装

The installation is completed

目录结构

安装JBoss将创建一个jboss-4.0.4目录,包含服务器启动脚本,库文件,服务配置集和工作目录。下图包含服务器目录结构:The JBoss AS directory structure

 

org.jboss.system.server.ServerConfig 接口常量和相应的系统属性字符串显示如上图。那些以URL结束的位置表示可以使用URL来访问的远程地址。

JBoss顶级目录
DirectoryDescription
binAll the entry point JARs and start scripts included with the JBoss distribution are located in the bin directory.
clientThe JARs that are required for clients that run outside of JBoss are located in the client directory.
serverThe JBoss server configuration sets are located under the server directory. The default server configuration set is the server/default set. JBoss ships with minimal, default and all configuration sets. The subdirectories and key configuration files contained default configuration set are discussed in more detail in Chapter 4, The Default Server Configuration File Set
libThe lib directory contains startup JARs used by JBoss. Do not place your own libraries in this directory.

JBoss服务器配置目录

DirectoryDescription
confThe conf directory contains the jboss-service.xml bootstrap descriptor file for a given server configuration. This defines the core services that are fixed for the lifetime of the server.
dataThe data directory is available for use by services that want to store content in the file system.
deployThe deploy directory is the default location the hot deployment service looks to for dynamic deployment content. This may be overridden through the URLDeploymentScanner URLs attribute.
libThe lib directory is the default location for static Java libraries that should not be hot deployed. All JARs in this directory are loaded into the shared classpath at startup.
logThe log directory is the directory log files are written to. This may be overridden through the conf/log4j.xml configuration file.
tmpThe tmp directory is used by JBoss to store temporarily files such as unpacked deployments.

 

缺省服务器配置

JBOSS_DIST/server 包含一个或多个服务器配置集合,default配置集合保存在 JBOSS_DIST/server/default 目录。JBoss允许添加多个配置文件集合,可以通过选项设置进行切换。

要创建一个新的配置集合,拷贝default文件集合到一个新的目录,并更改相应的配置文件。下图显示default配置文件集合。.

An expanded view of the default server configuration file set conf and deploy directories
如下是conf目录下的配置文件描述:
jboss-minimal.xml

This is a minimalist example of the jboss-service.xml configuration file. It is the jboss-service.xml file used in the minimal configuration file set.

jboss-service.xml

jboss-service.xml defines the core services configurations.

jndi.properties

The jndi.properties file specifies the JNDI InitialContext properties that are used within theNS-MYC10 JBoss server when an InitialContext is created using the no-argument constructor.

log4j.xml

This file configures the Apache log4j framework category priorities and appenders used by the JBoss server code.

login-config.xml

This file contains sample server side authentication configurations that are applicable when using JAVAS based security.

props/*

The props directory contains the users and roles property files for the jmx-console.

standardjaws.xml

This file provides the default configuration for the legacy EJB 1.1 CMP engine.

standardjboss.xml

This file provides the default container configurations.

standardjbosscmp-jdbc.xml

This file provides a default configuration file for the JBoss CMP engine.

xmdesc/*-mbean.xml

The xmdesc directory contains XMBean descriptors for several services configured in the jboss-service.xml file.

The following are the files in the deploy directory and their function.

bsh-deployer.xml

This file configures the bean shell deployer, which deploys bean shell scripts as JBoss services.

cache-invalidation-service.xml

This is a service that allows for custom invalidation of the EJB caches via JMS notifications. It is disabled by default.

client-deployer-service.xml

This is a service that provides support for J2EE application clients. It manages the java:comp/env enterprise naming context for client applications based on the application-client.xml descriptor.

ear-deployer.xml

The EAR deployer is the service responsible for deploying J2EE EAR files.

ejb-deployer.xml

The EJB deployer is the service responsible for deploying J2EE EJB JAR files.

hsqldb-ds.xml

hsqldb-ds.xml configures the Hypersonic embedded database service configuration file. It sets up the embedded database and related connection factories.

http-invoker.sar

http-invoker.sar contains the detached invoker that supports RMI over HTTP. It also contains the proxy bindings for accessing JNDI over HTTP.

jboss-aop.deployer,

This service configure the AspectManagerService and deploys JBoss AOP applications.

jboss-bean.deployer

jboss-bean.deployer provides the JBoss microcontainer, which deploys POJO services wrapped in .beans files.

jboss-ha-local-jdbc.rar

jboss-ha-local-jdbc.rar is an experimental version of jboss-local-jdbc.rar that supports datasource failover.

jboss-ha-xa-jdbc.rar

jboss-ha-xa-jdbc.rar is an experimental version of jboss-xa-jdbc.rar that supports datasource failover.

jboss-local-jdbc.rar

jboss-local-jdbc.rar is a JCA resource adaptor that implements the JCA ManagedConnectionFactory interface for JDBC drivers that support the DataSource interface but not JCA.

jboss-xa-jdbc.rar

jboss-xa-jdbc.rar is a JCA resource adaptor that implements the JCA ManagedConnectionFactory interface for JDBC drivers that support the XADataSource interface.

jbossjca-service.sar

jbossjca-service.sar is the application server implementation of the JCA specification. It provides the connection management facilities for integrating resource adaptors into the JBoss server.

jbossweb-tomcat55.sar

The jbossweb-tomcat55.sar directory provides the Tomcat 5.5 servlet engine. The SAR is unpacked rather than deployed as a JAR archive so that the tomcat configuration files can be easily edited.

jbossws14.sar

jbossws14.sar provides J2EE web services support.

jms/hsqldb-jdbc-state-service.xml

hsqldb-jdbc-state-service.xml provides JMS state management using Hypersonic.

jms/hsqldb-jdbc2-service.xml

hsqldb-jdbc2-service.xml configures JMS persistence and caching using Hypersonic. It also contains the DestinationManager MBean, which is the core service for the JMS implementation.

jms/jbossmq-destinations-service.xml

jbossmq-destinations-service.xml configures a number of JMS queues and topics used by the JMS unit tests.

jms/jbossmq-httpil.sar

jbossmq-httpil.sar provides a JMS invocation layer that allows the use of JMS over HTTP.

jms/jbossmq-service.xml

The jbossmq-service.xml file configures the core JBossMQ JMS service.

jms/jms-ds.xml

The jms-ds.xml file configures the JBossMQ JMS provider for use with the jms-ra.rar JCA resource adaptor.

jms/jms-ra.rar

jms-ra.rar is a JCA resource adaptor that implements the JCA ManagedConnectionFactory interface for JMS connection factories.

jms/jvm-il-service.xml

jvm-il-service.xml configures the in-JVM JMS transport invocation layer.

jms/uil2-service.xml

uil2-service.xml configures the JMS version 2 unified invocation layer. Its a fast and reliable custom socket based transport that should be used for messaging between JVMs.

jmx-console.war

The jmx-console.war directory provides the JMX Console. The JMX Console provides a simple web interface for managing the MBean server.

jmx-invoker-service.sar

jmx-invoker-service.sar is an unpacked MBean service archive that exposes a subset of the JMX MBeanServer interface methods as an RMI interface to enable remote access to the JMX core functionality. This is similar to the legacy jmx-rmi-adaptor.sar, with the difference that the transport is handled by the detached invoker architecture.

jsr-88-service.xml

jsr-88-service.xml provides the JSR 88 remote deployment service.

mail-ra.rar

mail-ra.rar is a resource adaptor that provides a JavaMail connector.

mail-service.xml

The mail-service.xml file is an MBean service descriptor that provides JavaMail sessions for use inside the JBoss server.

management/console-mgr.sar

console-mgr.sar provides the Web Console. It is a web application/applet that provide a richer view of the JMX server management data than the JMX console. You may view the console using the URL http://localhost:8080/web-console/.

monitoring-service.xml

The monitoring-service.xml file configures alert monitors like the console listener and email listener used by JMX notifications.

properties-service.xml

The properties-service.xml file is an MBean service descriptor that allows for customization of the JavaBeans PropertyEditors as well as the definition of system properties.

scheduler-service.xml, schedule-manager-service.xml

The scheduler-service.xml and schedule-manager-service.xml files are MBean service descriptors that provide a scheduling type of service.

sqlexception-service.xml

The sqlexception-service.xml file is an MBean service descriptor for the handling of vendor specific SQLExceptions.

uuid-key-generator.sar

The uuid-key-generator.sar service provides a UUID-based key generation facility.

所有的配置都包含几个额外的服务:
cluster-service.xml

This service configures clustering communication for most clustered services in JBoss.

deploy-hasingleton-service.xml

This provides the HA singleton service, allowing JBoss to manage services that must be active on only one node of a cluster.

deploy.last/farm-service.xml

farm-service.xml provides the farm service, which allows for cluster-wide deployment and undeployment of services.

httpha-invoker.sar

This service provides HTTP tunneling support for clustered environments.

iiop-service.xml

This provides IIOP invocation support.

juddi-service.sar

This service provides UDDI lookup services.

snmp-adaptor.sar

This is a JMX to SNMP adaptor. It allows for the mapping of JMX notifications onto SNMP traps.

tc5-cluster.sar

Provides AOP support for field-level HTTP session replication.

如果安装了EJB3支持,几个额外的EJB3服务可用:

ejb3-interceptors-aop.xml

This service provides the AOP interceptor stack configurations for EJB3 bean types.

ejb3.deployer

This service deploys EJB3 applications into JBoss.

jboss-aop-jdk50.deployer

This is a Java 5 version of the AOP deployer. The AOP deployer configures the AspectManagerService and deploys JBoss AOP applications.

jbossws.sar

This services provides Java EE 5 web services support.

Finally, in the EJB3 all configuration adds two additional services:

ejb3-clustered-sfsbcache-service.xml

This services provides replication and failover for EJB3 stateful session beans.

ejb3-entity-cache-service.xml

This services provides a clustered cache for EJB3 entity beans.

启动停止JBoss

安装好JBoss后,要确认安装是否成功,进入bin目录,执行run.bat或run.sh脚本。输出应该类似如下:

java 代码
  1. $ sh run.sh   
  2. =========================================================================   
  3.   
  4.   JBoss Bootstrap Environment   
  5.   
  6.   JBOSS_HOME: /tmp/jboss-4.0.4.GA   
  7.   
  8.   JAVA: java   
  9.   
  10.   JAVA_OPTS: -server -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000    
  11.              -Dsun.rmi.dgc.server.gcInterval=3600000 -Dprogram.name=run.sh   
  12.   
  13.   CLASSPATH: /tmp/jboss-4.0.4.GA/bin/run.jar:/lib/tools.jar   
  14.                
  15. =========================================================================   
  16.   
  17. 23:28:48,561 INFO  [Server] Starting JBoss (MX MicroKernel)   
  18. ...   
  19. 23:29:09,249 INFO  [Server] JBoss (MX MicroKernel) [4.0.4.GA (build:    
  20.   CVSTag=JBoss_4_0_4_GA date=200605151000)] Started in 20s:679ms  

如果输出类似如上图,现在应该可以使用JBoss了。

如果不指定参数使用run.sh,会使用default服务配置集合。要切换到其他服务配置集合,使用如下命令启动脚本,minimal是服务配置集合名称。

java 代码
  1. $ ./run.sh -c minimal   
  2. ...   
  3. 23:37:41,582 INFO  [Server] JBoss (MX MicroKernel) [4.0.4.GA (build:    
  4.   CVSTag=JBoss_4_0_4_GA date=200605151000)] Started in 2s:212ms  

run脚本选项包括:

java 代码
  1. usage: run.sh [options]   
  2.   -h, --help                  Show this help message   
  3.   -V, --version               Show version information   
  4.   --                          Stop processing options   
  5.   -D[=]          Set a system property   
  6.   -d, --bootdir=         Set the boot patch directory; Must be absolute or url   
  7.   -p, --patchdir=        Set the patch directory; Must be absolute or url   
  8.   -n, --netboot=         Boot from net with the given url as base   
  9.   -c, --configuration=  Set the server configuration name   
  10.   -B, --bootlib=    Add an extra library to the front bootclasspath   
  11.   -L, --library=    Add an extra library to the loaders classpath   
  12.   -C, --classpath=       Add an extra url to the loaders classpath   
  13.   -P, --properties=      Load system properties from the given url   
  14.   -b, --host=     Bind address for all JBoss services   
  15.   -g, --partition=      HA Partition name (default=DefaultDomain)   
  16.   -u, --udp=              UDP multicast address   
  17.   -l, --log=       Specify the logger plugin type  

要关闭服务器,只需要在启动的JBoss控制台按 Ctrl-C 键即可,也可以使用shutdown.sh命令。

java 代码
  1. [bin]$ ./shutdown.sh -S  

shutdow脚本支持如下选项。

java 代码
  1. usage: shutdown [options]    
  2.   
  3. options:   
  4.   -h, --help              Show this help message (default)   
  5.   -D[=]      Set a system property   
  6.   --                      Stop processing options   
  7.   -s, --server=      Specify the JNDI URL of the remote server   
  8.   -n, --serverName=  Specify the JMX name of the ServerImpl   
  9.   -a, --adapter=    Specify JNDI name of the MBeanServerConnection to use   
  10.   -u, --user=       Specify the username for authentication   
  11.   -p, --password=   Specify the password for authentication   
  12.   
  13. operations:   
  14.   -S, --shutdown          Shutdown the server   
  15.   -e, --exit=       Force the VM to exit with a status code   
  16.   -H, --halt=       Force the VM to halt with a status code  

使用shutdown命令将查询包含 jmx-invoker-service.xml 服务的服务器配置,因此shutdown命令不能在minimal配置下使用

分享到:
评论

相关推荐

    JBOSS5.1安装配置说明

    JBOSS5.1安装配置说明 JBOSS 是一个基于 Java 的开源应用服务器,可以运行在 Windows、Linux、Unix 等多种操作系统平台上。为了在 Windows 下安装和配置 JBOSS,我们需要按照以下步骤进行操作。 安装 JAVA 环境 ...

    JBOSS安装手册大全

    根据提供的文件信息,下面对《JBOSS安装手册大全》进行知识点的详细说明。 首先,手册是关于JBOSS应用服务器的安装和升级指南,涵盖了从基础知识到实用操作的具体步骤。JBOSS是一个开源的、符合标准的、100%纯Java...

    jboss安装配置指南

    【JBoss 安装配置指南】 JBoss 是一个基于 J2EE 规范的开源应用服务器,由全球开发者社区共同维护。它完全实现了 J2EE 的核心服务,包括 EJB(Enterprise JavaBeans)、JMS(Java Message Service)、JTS/JTA(Java...

    JBOSS,JBoss安装部署

    【JBOSS,JBoss安装部署】 JBoss是Red Hat公司开发的一款开源的应用服务器,它基于Java EE(Enterprise Edition)规范,提供了全面的企业级应用程序部署和管理解决方案。本篇文章将详细讲解JBoss的安装和部署过程,...

    JBoss篇:安装与配置

    JBoss篇:安装与配置 一、安装与配置 在本文中,我们将下载和安装 JBoss 4.2.1.GA 版本。下载地址为 http://sourceforge.net/project/showfiles.php?group_id=22866&package_id=16942&release_id=523619。下载完成...

    windows jboss 安装及部署

    Windows JBOSS 安装及部署技术详解 本资源摘要信息将详细介绍 JBOSS 在 Windows 平台上的安装和部署过程,涵盖了环境准备、JBOSS 安装、环境变量设置、运行和终止 JBOSS、部署 WAR 文件等多个方面的知识点。 一、...

    Jboss安装配置手册

    Jboss 安装配置指南 本指南旨在指导用户安装和配置 Jboss 中间件,包括数据库产品的安装、初始化数据库、Jboss 中间件的安装和配置服务。以下是详细的安装和配置步骤: 一、数据库产品的安装 在安装 Jboss 之前,...

    最新jboss6.4和glassfish4.0安装笔记

    本文将详细介绍如何在Linux系统上安装JBoss 6.4和GlassFish 4.0服务器,同时涉及JDK的安装和配置。首先,我们需要理解JDK是Java开发工具包,是运行Java应用程序的基础。Oracle JDK是其中的一种版本,这里我们选择的...

    最新_jboss安装文档

    本文将详细介绍如何在最新的环境中安装JBoss,主要涉及的步骤包括JDK的安装、JBoss的下载与配置,以及启动和验证安装。 首先,我们从JDK的安装开始: 1. **下载JDK**:你需要下载适用于操作系统的JDK版本,这里...

    JBOSS 安装

    ### JBoss 安装与配置详解 JBoss是一款开源的应用服务器,它支持多种企业级功能,如Java EE、Web服务和事务处理等。对于初学者和开发者而言,掌握JBoss的安装与配置流程是十分重要的。本文将详细介绍JBOSS5.0 Beta4...

    Jboss的配置安装

    ### JBoss的配置与安装详解 #### 一、JBoss的下载与安装 JBoss是一款开源的应用服务器,广泛应用于Java应用程序的开发与部署环境中。本文将详细介绍如何下载、配置及安装JBoss,以便读者能够快速上手并进行开发...

    jboss安装动画.exe

    jboss安装动画jboss安装动画jboss安装动画jboss安装动画jboss安装动画jboss安装动画jboss安装动画.exe

    linux 下jdk ,jboss的安装和jboss的自启动.txt

    ### Linux下JDK与JBoss的安装及JBoss自启动设置 #### JDK的安装步骤 在Linux环境下安装JDK是部署Java应用的基础。本部分将详细介绍如何在Linux系统上安装JDK。 1. **下载JDK安装包**: - 通常推荐从Oracle官网...

    JBoss的安装、配置和部署

    【JBoss的安装、配置和部署】 JBoss是一款开源的应用服务器,它基于Java EE(Enterprise Edition)标准,提供了丰富的中间件服务,支持Web应用、EJB(Enterprise JavaBeans)、JMS(Java Message Service)等。在...

    jboss 安装教程

    【Jboss 安装教程】 在安装 Jboss 之前,首要任务是确保系统已经安装了 JDK,因为 Jboss 需要 JDK 提供的运行环境。以下是在 Ubuntu 系统上安装 JDK 和 Jboss 的详细步骤: 1. **安装 JDK** 首先,下载 Java ...

    Linux下jboss7.1.1安装帮助

    在Linux环境下安装配置JBoss 7.1.1是一个涉及多步骤的过程,下面将详细讲解这些步骤。 首先,我们需要确认Linux系统的版本。通过运行`uname -a`命令,我们可以检查系统是32位还是64位。如果输出中有"x86_64",则...

    J2EE JNDI配置原理详解 JBOSS安装配置 Maven入门 Ant使用入门

    1.17 JBoss 5.0 安装与配置详解 1.18 JBOSS安装配置 1.19 Oracle,MySql,SQL server分页 1.20 Jboss下的第一个EJB程序 1.21 JNDI 1.22 JNDI配置原理详解 1.23 JSF+Seam框架学习心得 1.24 java jdbc驱动的四...

    Jboss7.1安装配置(linux环境)

    Jboss7.1安装配置(linux环境)

    LINUX下JBOSS的安装及配置[归纳].pdf

    LINUX下JBOSS的安装及配置[归纳].pdf

Global site tag (gtag.js) - Google Analytics