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的設定則是用來阻隔各個--節點--之間(包括同一集羣和不同集羣節點)廣播信息的傳遞

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章