jboss相关

jboss环境的安装和配置

1、安装jdk
chmod 775 jdk-6u2-linux-i586-rpm.bin
./jdk-6u2-linux-i586-rpm.bin
[root@MDT software]# rpm -ivh jdk-6u2-linux-i586.rpm
Preparing...                ########################################### [100%]
        package jdk-1.6.0_02-fcs is already installed
[root@MDT software]# rpm -qa|grep jdk
jdk-1.6.0_02-fcs
[root@MDT ~]# ln -s -f /usr/java/jdk1.6.0_02/jre/bin/java /usr/bin
[root@MDT ~]# ln -s -f /usr/java/jdk1.6.0_02/bin/javac /usr/bin
[root@MDT ~]# vi /etc/bashrc
JAVA_HOME=/usr/java/jdk1.6.0_02
PATH=$JAVA_HOME/bin/:$PATH
CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar
export JAVA_HOME PATH CLASSPATH
[root@MDT ~]# . /etc/bashrc
[root@MDT ~]# vi helloworld.java
[root@MDT ~]# cat helloworld.java
public class helloworld{
        public static void main(String args[])
                {
                System.out.println("Hello,world!");
                }
                        }
[root@MDT ~]# javac helloworld.java
[root@MDT ~]# java helloworld
Hello,world!


2、拷贝并解压jboss
[root@MDT usr]# vi /etc/bashrc
export JBOSS_HOME=/usr/jboss


[root@MDT usr]# source /etc/bashrc

[root@localhost bin]# sh run.sh -c mdt -b 172.16.68.173
=========================================================================

  JBoss Bootstrap Environment

  JBOSS_HOME: /usr/jboss

  JAVA: /usr/java/jdk1.6.0_02/bin/java

  JAVA_OPTS: -Dprogram.name=run.sh -server -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.net.preferIPv4Stack=true

  CLASSPATH: /usr/jboss/bin/run.jar:/usr/java/jdk1.6.0_02/lib/tools.jar

=========================================================================

02:31:02,091 INFO  [Server] Starting JBoss (MX MicroKernel)...
02:31:02,107 INFO  [Server] Release ID: JBoss [Trinity] 4.2.1.GA (build: SVNTag=JBoss_4_2_1_GA date=200707131605)
02:31:02,112 INFO  [Server] Home Dir: /usr/jboss
02:31:02,113 INFO  [Server] Home URL: file:/usr/jboss/
02:31:02,116 INFO  [Server] Patch URL: null
02:31:02,117 INFO  [Server] Server Name: mdt
02:31:02,117 INFO  [Server] Server Home Dir: /usr/jboss/server/mdt
02:31:02,119 INFO  [Server] Server Home URL: file:/usr/jboss/server/mdt/
02:31:02,119 INFO  [Server] Server Log Dir: /usr/jboss/server/mdt/log
02:31:02,121 INFO  [Server] Server Temp Dir: /usr/jboss/server/mdt/tmp
02:31:02,122 INFO  [Server] Root Deployment Filename: jboss-service.xml
02:31:03,819 INFO  [ServerInfo] Java version: 1.6.0_02,Sun Microsystems Inc.
02:31:03,820 INFO  [ServerInfo] Java VM: Java HotSpot(TM) Server VM 1.6.0_02-b05,Sun Microsystems Inc.
02:31:03,821 INFO  [ServerInfo] OS-System: Linux 2.6.9-34.EL,i386
02:31:05,960 INFO  [Server] Core system initialized
02:31:14,174 INFO  [WebService] Using RMI server codebase: http://172.16.68.173:8083/
02:31:14,181 INFO  [Log4jService$URLWatchTimerTask] Configuring from URL: resource:jboss-log4j.xml
02:31:16,147 INFO  [TransactionManagerService] JBossTS Transaction Service (JTA version) - JBoss Inc.
02:31:16,148 INFO  [TransactionManagerService] Setting up property manager MBean and JMX layer
02:31:16,926 INFO  [TransactionManagerService] Starting recovery manager
02:31:17,244 INFO  [TransactionManagerService] Recovery manager started
02:31:17,245 INFO  [TransactionManagerService] Binding TransactionManager JNDI Reference
02:31:31,284 INFO  [EJB3Deployer] Starting java:comp multiplexer
02:31:37,787 INFO  [ServiceEndpointManager] jbossws-1.2.1.GA (build=200704151756)
02:31:43,629 INFO  [AprLifecycleListener] The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/jdk1.6.0_02/jre/lib/i386/server:/usr/java/jdk1.6.0_02/jre/lib/i386:/usr/java/jdk1.6.0_02/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib
02:31:44,878 INFO  [Http11Protocol] Initializing Coyote HTTP/1.1 on http-172.16.68.173-8080
02:31:44,881 INFO  [AjpProtocol] Initializing Coyote AJP/1.3 on ajp-172.16.68.173-8009
02:31:44,883 INFO  [Catalina] Initialization processed in 1833 ms
02:31:44,884 INFO  [StandardService] Starting service jboss.web
02:31:44,891 INFO  [StandardEngine] Starting Servlet Engine: JBossWeb/2.0.0.GA
02:31:45,523 INFO  [Catalina] Server startup in 639 ms
02:31:45,938 INFO  [TomcatDeployer] deploy, ctxPath=/, warUrl=.../deploy/jboss-web.deployer/ROOT.war/
02:31:48,726 INFO  [TomcatDeployer] deploy, ctxPath=/invoker, warUrl=.../deploy/http-invoker.sar/invoker.war/
02:31:49,379 INFO  [TomcatDeployer] deploy, ctxPath=/jbossws, warUrl=.../tmp/deploy/tmp35010jbossws-context-exp.war/
02:31:50,652 INFO  [TomcatDeployer] deploy, ctxPath=/jbossmq-httpil, warUrl=.../deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/
02:31:56,921 INFO  [TomcatDeployer] deploy, ctxPath=/web-console, warUrl=.../deploy/management/console-mgr.sar/web-console.war/
02:31:58,730 INFO  [MailService] Mail Service bound to java:/Mail
02:31:59,242 INFO  [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-local-jdbc.rar
02:31:59,390 INFO  [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-xa-jdbc.rar
02:31:59,542 INFO  [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-local-jdbc.rar
02:31:59,637 INFO  [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-xa-jdbc.rar
02:31:59,802 INFO  [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jms/jms-ra.rar
02:31:59,894 INFO  [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/quartz-ra.rar
02:31:59,920 INFO  [QuartzResourceAdapter] start quartz!!!
02:32:00,083 INFO  [SimpleThreadPool] Job execution threads will use class loader of thread: main
02:32:00,147 INFO  [QuartzScheduler] Quartz Scheduler v.1.5.2 created.
02:32:00,153 INFO  [RAMJobStore] RAMJobStore initialized.
02:32:00,155 INFO  [StdSchedulerFactory] Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
02:32:00,156 INFO  [StdSchedulerFactory] Quartz scheduler version: 1.5.2
02:32:00,157 INFO  [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
02:32:03,180 INFO  [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
02:32:04,807 INFO  [A] Bound to JNDI name: queue/A
02:32:04,814 INFO  [B] Bound to JNDI name: queue/B
02:32:04,821 INFO  [C] Bound to JNDI name: queue/C
02:32:04,828 INFO  [D] Bound to JNDI name: queue/D
02:32:04,836 INFO  [ex] Bound to JNDI name: queue/ex
02:32:04,900 INFO  [testTopic] Bound to JNDI name: topic/testTopic
02:32:04,907 INFO  [securedTopic] Bound to JNDI name: topic/securedTopic
02:32:04,914 INFO  [testDurableTopic] Bound to JNDI name: topic/testDurableTopic
02:32:04,925 INFO  [testQueue] Bound to JNDI name: queue/testQueue
02:32:05,042 INFO  [UILServerILService] JBossMQ UIL service available at : /172.16.68.173:8093
02:32:05,171 INFO  [DLQ] Bound to JNDI name: queue/DLQ
02:32:05,693 INFO  [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
02:32:05,795 INFO  [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
02:32:08,096 INFO  [Http11Protocol] Starting Coyote HTTP/1.1 on http-172.16.68.173-8080
02:32:08,208 INFO  [AjpProtocol] Starting Coyote AJP/1.3 on ajp-172.16.68.173-8009
02:32:08,312 INFO  [Server] JBoss (MX MicroKernel) [4.2.1.GA (build: SVNTag=JBoss_4_2_1_GA date=200707131605)] Started in 1m:6s:183ms

 

[root@localhost bin]# sh shutdown.sh --server=172.16.68.173

 

 

 

 

 

 

 

 

Jboss运行参数

Jboss 运行参数

-h, –help Show this help message
-V, –version Show version information
– Stop processing options
-D<name>[=<value>] Set a system property
-d, –bootdir=<dir> Set the boot patch directory; Must be absolute or url
-p, –patchdir=<dir> Set the patch directory; Must be absolute or url
-n, –netboot=<url> Boot from net with the given url as base
-c, –configuration=<name> Set the server configuration name
-B, –bootlib=<filename> Add an extra library to the front bootclasspath
-L, –library=<filename> Add an extra library to the loaders classpath
-C, –classpath=<url> Add an extra url to the loaders classpath
-P, –properties=<url> Load system properties from the given url
-b, –host=<host or ip> Bind address for all JBoss services
-g, –partition=<name> HA Partition name (default=DefaultDomain)
-u, –udp=<ip> UDP multicast address
-l, –log=<log4j|jdk> Specify the logger plugin type

-c 服务配置名,指定JBoss启动哪个服务配置,默认是default,常用有 -c all

-b 绑定JBoss服务的IP,特别在部署EJB服务,只能通过绑定的IP查找EJB,在Linux下,不绑定IP将找不到EJB服务.对于单纯的Web应用,不绑定IP可以实现全地址绑定,对双网卡或者多个IP的环境都能通过不同IP访问.

-g 绑定HA分区名,用于EJB集群分组.

-u UDP多播地址,用于集群JBoss环境,默认为230.0.0.4,如果在局域网在有多个启动all配置(有集群配置)的JBoss服务,那在 JBoss日志中能看到不时的有组播信息出现,可以设置为不同的组播地址,避免这些干扰.合法值是IP协议中说到的广播段.

 

 

 

 

 

 

 

 

 

集群之间及节点之间的信息屏蔽

集群之间及节点之间的信息屏蔽

暂时的测试结果是:
<Config>
            <UDP mcast_addr="${jboss.partition.udpGroup:228.1.2.3}"
                 mcast_port="${jboss.hapartition.mcast_port:45566}"
其中设定的udpGroup和mcast_port可以用来阻隔各个--集群--之间(不同集群)的信息收敛,避免多个集群变成一个集群


      <!-- Multicast Address and group port used for auto-discovery -->
      <attribute name="AutoDiscoveryAddress">${jboss.partition.udpGroup:230.0.0.4}</attribute>
而这个udpGroup的设定则是用来阻隔各个--节点--之间(包括同一集群和不同集群节点)广播信息的传递

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值