|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
小知识:CentOS是企业Linux发行版领头羊RedHatEnterpriseLinux(以下称之为RHEL)的源代码再编译版本。
1、简介
JBoss是一个运转EJB的J2EE运用办事器。它是开放源代码的项目,遵守最新的J2EE标准。从JBoss项目开端至今,它曾经从一个EJB容器成长成为一个基于的J2EE的一个web操作体系(operatingsystemforweb),它表现了J2EE标准中最新的技巧。不管是进修照样运用,JBoss为我们供给了一个异常优良的平台。
JBoss是一个治理EJB的容器和办事器,支撑EJB1.1、EJB2.0和EJB3.0的标准。但JBoss焦点办事不包含支撑servlet/JSP的WEB容器,普通与Tomcat或Jetty绑定应用。
JBoss具有以下长处:
1、JBoss是收费的,开放源代码J2EE的完成,经由过程LGPL允许证停止宣布.但同时也有闭源的,开源和闭源流入流出的不是统一门路。
2、JBoss须要的内存和硬盘空间比拟小。
3、装置便捷:解压后,只需设置装备摆设一些情况变量便可。
4、JBoss支撑"热安排",安排BEAN时,只拷贝BEAN的JAR文件到安排路径下便可主动加载它,假如有修改,也会主动更新
5、JBoss与Web办事器在统一个Java虚拟机中运转,Servlet挪用EJB不经由收集,从而年夜年夜进步运转效力,晋升平安机能
6、用户可以直接实行J2EE-EAR,而不是之前分离实行EJB-JAR和Web-WAR,异常便利。
7、Jboss支撑集群。
2006年,Jboss公司(http://jboss.org)被Redhat公司(http://redhat.com)收买。
有关JBoss的具体信息请参阅其主页http://www.jboss.org
2、体系情况
体系平台:RHEL5.4
Javaversion:jdk-6u17-linux-i586
Jbossversion:jboss-5.1.0.GA-jdk6
3、装置预备
下载jboss5.1和jdk1.6
jbosshttp://sourceforge.net/projects/jboss/files/JBoss/JBoss-5.1.0.GA/jboss-5.1.0.GA-jdk6.zip/download
jdk1.6http://download.oracle.com/otn/java/jdk/6u31-b04/jdk-6u31-linux-i586.bin
4、解压
#./jdk-6u17-linux-i586.bin//以后目次生成一个jdk1.6.0_17
#mvjdk1.6.0_17/usr/local/java//把刚生成的目次"jdk1.6.0_17"重定名为"java"
#unzipjboss-5.1.0.GA-jdk6.zip-d/usr/local///解压到/usr/local目次下
#mvjboss-5.1.0.GAjboss//重定名为jboss
5、设置装备摆设情况变量
#vi/etc/profile
//添加以下内容
JAVA_HOME="/usr/local/java"
CLASS_PATH="$JAVA_HOME/lib:$JAVA_HOME/jre/lib"
PATH=".:$PATH:$JAVA_HOME/bin"
exportJAVA_HOMECLASS_PATHPATH
6、运转
#/usr/local/jboss/bin/run.sh-b10.0.0.133//IP写本机地址- [root@linuxbin]#./run.sh-b10.0.0.133=========================================================================JBossBootstrapEnvironmentJBOSS_HOME:/usr/local/jbossJAVA:/usr/local/jdk/jdk1.6.0_17/bin/javaJAVA_OPTS:-Dprogram.name=run.sh-server-Xms128m-Xmx512m-XX:MaxPermSize=256m-Dorg.jboss.resolver.warning=true-Dsun.rmi.dgc.client.gcInterval=3600000-Dsun.rmi.dgc.server.gcInterval=3600000-Djava.net.preferIPv4Stack=trueCLASSPATH:/usr/local/jboss/bin/run.jar:/usr/local/jdk/jdk1.6.0_17/lib/tools.jar=========================================================================01:57:50,713INFO[ServerImpl]StartingJBoss(Microcontainer)...01:57:50,718INFO[ServerImpl]ReleaseID:JBoss[TheOracle]5.1.0.GA(build:SVNTag=JBoss_5_1_0_GAdate=200905221634)01:57:50,725INFO[ServerImpl]BootstrapURL:null01:57:50,727INFO[ServerImpl]HomeDir:/usr/local/jboss01:57:50,742INFO[ServerImpl]HomeURL:file:/usr/local/jboss/01:57:50,756INFO[ServerImpl]LibraryURL:file:/usr/local/jboss/lib/01:57:50,761INFO[ServerImpl]PatchURL:null01:57:50,776INFO[ServerImpl]CommonBaseURL:file:/usr/local/jboss/common/01:57:50,778INFO[ServerImpl]CommonLibraryURL:file:/usr/local/jboss/common/lib/01:57:50,806INFO[ServerImpl]ServerName:default01:57:50,811INFO[ServerImpl]ServerBaseDir:/usr/local/jboss/server01:57:50,814INFO[ServerImpl]ServerBaseURL:file:/usr/local/jboss/server/01:57:50,817INFO[ServerImpl]ServerConfigURL:file:/usr/local/jboss/server/default/conf/01:57:50,818INFO[ServerImpl]ServerHomeDir:/usr/local/jboss/server/default01:57:50,826INFO[ServerImpl]ServerHomeURL:file:/usr/local/jboss/server/default/01:57:50,829INFO[ServerImpl]ServerDataDir:/usr/local/jboss/server/default/data01:57:50,832INFO[ServerImpl]ServerLibraryURL:file:/usr/local/jboss/server/default/lib/01:57:50,834INFO[ServerImpl]ServerLogDir:/usr/local/jboss/server/default/log01:57:50,840INFO[ServerImpl]ServerNativeDir:/usr/local/jboss/server/default/tmp/native01:57:50,857INFO[ServerImpl]ServerTempDir:/usr/local/jboss/server/default/tmp01:57:50,860INFO[ServerImpl]ServerTempDeployDir:/usr/local/jboss/server/default/tmp/deploy01:57:52,509INFO[ServerImpl]StartingMicrocontainer,bootstrapURL=file:/usr/local/jboss/server/default/conf/bootstrap.xml01:57:53,876INFO[VFSCacheFactory]InitializingVFSCache[org.jboss.virtual.plugins.cache.CombinedVFSCache]01:57:53,888INFO[VFSCacheFactory]UsingVFSCache[CombinedVFSCache[real-cache:null]]01:57:54,617INFO[CopyMechanism]VFStempdir:/usr/local/jboss/server/default/tmp01:57:54,637INFO[ZipEntryContext]VFSforcenestedjarscopy-modeisenabled.01:57:58,247INFO[ServerInfo]Javaversion:1.6.0_17,SunMicrosystemsInc.01:57:58,249INFO[ServerInfo]JavaRuntime:Java(TM)SERuntimeEnvironment(build1.6.0_17-b04)01:57:58,259INFO[ServerInfo]JavaVM:JavaHotSpot(TM)ServerVM14.3-b01,SunMicrosystemsInc.01:57:58,266INFO[ServerInfo]OS-System:Linux2.6.18-194.el5,i38601:57:58,283INFO[ServerInfo]VMarguments:-Dprogram.name=run.sh-Xms128m-Xmx512m-XX:MaxPermSize=256m-Dorg.jboss.resolver.warning=true-Dsun.rmi.dgc.client.gcInterval=3600000-Dsun.rmi.dgc.server.gcInterval=3600000-Djava.net.preferIPv4Stack=true-Djava.endorsed.dirs=/usr/local/jboss/lib/endorsed01:57:58,408INFO[JMXKernel]LegacyJMXcoreinitialized01:58:04,694INFO[ProfileServiceBootstrap]Loadingprofile:ProfileKey@19b7c62[domain=default,server=default,name=default]01:58:10,585INFO[WebService]UsingRMIservercodebase:http://10.0.0.133:8083/01:58:32,816INFO[NativeServerConfig]JBossWebServices-StackNativeCore01:58:32,823INFO[NativeServerConfig]3.1.2.GA01:58:34,296INFO[AttributeCallbackItem]Ownercallbacknotimplemented.01:58:37,600INFO[LogNotificationListener]Addingnotificationlistenerforloggingmbean"jboss.system:service=Logging,type=Log4jService"toserverorg.jboss.mx.server.MBeanServerImpl@63a1ae[defaultDomain=jboss]01:59:05,890INFO[Ejb3DependenciesDeployer]EncountereddeploymentAbstractVFSDeploymentContext@19213615{vfsfile:/usr/local/jboss/server/default/deploy/profileservice-secured.jar/}01:59:05,904INFO[Ejb3DependenciesDeployer]EncountereddeploymentAbstractVFSDeploymentContext@19213615{vfsfile:/usr/local/jboss/server/default/deploy/profileservice-secured.jar/}01:59:05,908INFO[Ejb3DependenciesDeployer]EncountereddeploymentAbstractVFSDeploymentContext@19213615{vfsfile:/usr/local/jboss/server/default/deploy/profileservice-secured.jar/}01:59:05,927INFO[Ejb3DependenciesDeployer]EncountereddeploymentAbstractVFSDeploymentContext@19213615{vfsfile:/usr/local/jboss/server/default/deploy/profileservice-secured.jar/}01:59:13,087INFO[JMXConnectorServerService]JMXConnectorserver:service:jmx:rmi://10.0.0.133/jndi/rmi://10.0.0.133:1090/jmxconnector01:59:15,053INFO[MailService]MailServiceboundtojava:/Mail01:59:41,437WARN[JBossASSecurityMetadataStore]WARNING!POTENTIALSECURITYRISK.IthasbeendetectedthattheMessageSuckercomponentwhichsucksmessagesfromonenodetoanotherhasnothaditspasswordchangedfromtheinstallationdefault.PleaseseetheJBossMessaginguserguideforinstructionsonhowtodothis.01:59:41,508WARN[AnnotationCreator]NoClassLoaderprovided,usingTCCL:org.jboss.managed.api.annotation.ManagementComponent01:59:41,673WARN[AnnotationCreator]NoClassLoaderprovided,usingTCCL:org.jboss.managed.api.annotation.ManagementComponent01:59:41,797INFO[TransactionManagerService]JBossTSTransactionService(JTAversion-tag:JBOSSTS_4_6_1_GA)-JBossInc.01:59:41,802INFO[TransactionManagerService]SettinguppropertymanagerMBeanandJMXlayer01:59:42,339INFO[TransactionManagerService]Initializingrecoverymanager01:59:43,127INFO[TransactionManagerService]Recoverymanagerconfigured01:59:43,131INFO[TransactionManagerService]BindingTransactionManagerJNDIReference01:59:44,517INFO[TransactionManagerService]Startingtransactionrecoverymanager01:59:45,893INFO[AprLifecycleListener]TheApacheTomcatNativelibrarywhichallowsoptimalperformanceinproductionenvironmentswasnotfoundonthejava.library.path:/usr/local/jdk/jdk1.6.0_17/jre/lib/i386/server:/usr/local/jdk/jdk1.6.0_17/jre/lib/i386:/usr/local/jdk/jdk1.6.0_17/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib01:59:46,259INFO[Http11Protocol]InitializingCoyoteHTTP/1.1onhttp-10.0.0.133-808001:59:46,266INFO[AjpProtocol]InitializingCoyoteAJP/1.3onajp-10.0.0.133-800901:59:46,375INFO[StandardService]Startingservicejboss.web01:59:46,389INFO[StandardEngine]StartingServletEngine:JBossWeb/2.1.3.GA01:59:46,482INFO[Catalina]Serverstartupin214ms01:59:46,554INFO[TomcatDeployment]deploy,ctxPath=/jbossws01:59:47,951INFO[TomcatDeployment]deploy,ctxPath=/web-console01:59:48,849INFO[TomcatDeployment]deploy,ctxPath=/invoker01:59:49,346INFO[RARDeployment]Requiredlicensetermsexist,viewvfszip:/usr/local/jboss/server/default/deploy/jboss-local-jdbc.rar/META-INF/ra.xml01:59:49,997INFO[RARDeployment]Requiredlicensetermsexist,viewvfszip:/usr/local/jboss/server/default/deploy/jboss-xa-jdbc.rar/META-INF/ra.xml01:59:50,087INFO[RARDeployment]Requiredlicensetermsexist,viewvfszip:/usr/local/jboss/server/default/deploy/jms-ra.rar/META-INF/ra.xml01:59:50,134INFO[RARDeployment]Requiredlicensetermsexist,viewvfszip:/usr/local/jboss/server/default/deploy/mail-ra.rar/META-INF/ra.xml01:59:50,221INFO[RARDeployment]Requiredlicensetermsexist,viewvfszip:/usr/local/jboss/server/default/deploy/quartz-ra.rar/META-INF/ra.xml01:59:50,456INFO[SimpleThreadPool]Jobexecutionthreadswilluseclassloaderofthread:main01:59:51,545INFO[QuartzScheduler]QuartzSchedulerv.1.5.2created.01:59:51,559INFO[RAMJobStore]RAMJobStoreinitialized.01:59:51,561INFO[StdSchedulerFactory]QuartzschedulerDefaultQuartzSchedulerinitializedfromdefaultresourcefileinQuartzpackage:quartz.properties01:59:51,563INFO[StdSchedulerFactory]Quartzschedulerversion:1.5.201:59:51,566INFO[QuartzScheduler]SchedulerDefaultQuartzScheduler_$_NON_CLUSTEREDstarted.01:59:53,273INFO[ConnectionFactoryBindingService]BoundConnectionManagerjboss.jca:service=DataSourceBinding,name=DefaultDStoJNDInamejava:DefaultDS01:59:55,170INFO[ServerPeer]JBossMessaging1.4.3.GAserver[0]started01:59:55,735INFO[ConnectionFactory]Connectorbisocket://10.0.0.133:4457hasleasingenabled,leaseperiod10000milliseconds01:59:55,739INFO[ConnectionFactory]org.jboss.jms.server.connectionfactory.ConnectionFactory@1e88eastarted01:59:55,795INFO[QueueService]Queue[/queue/DLQ]started,fullSize=200000,pageSize=2000,downCacheSize=200001:59:55,801INFO[ConnectionFactoryJNDIMapper]supportsFailoverattributeistrueonconnectionfactory:jboss.messaging.connectionfactory:service=ClusteredConnectionFactorybutpostofficeisnonclustered.Soconnectionfactorywill*not*supportfailover01:59:55,813INFO[ConnectionFactoryJNDIMapper]supportsLoadBalancingattributeistrueonconnectionfactory:jboss.messaging.connectionfactory:service=ClusteredConnectionFactorybutpostofficeisnonclustered.Soconnectionfactorywill*not*supportloadbalancing01:59:55,835INFO[ConnectionFactory]Connectorbisocket://10.0.0.133:4457hasleasingenabled,leaseperiod10000milliseconds01:59:55,845INFO[ConnectionFactory]org.jboss.jms.server.connectionfactory.ConnectionFactory@17503ebstarted01:59:55,850INFO[ConnectionFactory]Connectorbisocket://10.0.0.133:4457hasleasingenabled,leaseperiod10000milliseconds01:59:55,852INFO[ConnectionFactory]org.jboss.jms.server.connectionfactory.ConnectionFactory@956f01started01:59:55,881INFO[QueueService]Queue[/queue/ExpiryQueue]started,fullSize=200000,pageSize=2000,downCacheSize=200001:59:56,199INFO[ConnectionFactoryBindingService]BoundConnectionManagerjboss.jca:service=ConnectionFactoryBinding,name=JmsXAtoJNDInamejava:JmsXA02:00:09,338INFO[JBossASKernel]CreatedKernelDeploymentfor:profileservice-secured.jar02:00:09,384INFO[JBossASKernel]installingbean:jboss.j2ee:jar=profileservice-secured.jar,name=SecureProfileService,service=EJB302:00:09,385INFO[JBossASKernel]withdependencies:02:00:09,388INFO[JBossASKernel]anddemands:02:00:09,400INFO[JBossASKernel]jndi:SecureManagementView/remote-org.jboss.deployers.spi.management.ManagementView02:00:09,402INFO[JBossASKernel]jboss.ejb:service=EJBTimerService02:00:09,404INFO[JBossASKernel]andsupplies:02:00:09,406INFO[JBossASKernel]Class:org.jboss.profileservice.spi.ProfileService02:00:09,408INFO[JBossASKernel]jndi:SecureProfileService/remote02:00:09,410INFO[JBossASKernel]jndi:SecureProfileService/remote-org.jboss.profileservice.spi.ProfileService02:00:09,414INFO[JBossASKernel]Addedbean(jboss.j2ee:jar=profileservice-secured.jar,name=SecureProfileService,service=EJB3)toKernelDeploymentof:profileservice-secured.jar02:00:09,422INFO[JBossASKernel]installingbean:jboss.j2ee:jar=profileservice-secured.jar,name=SecureDeploymentManager,service=EJB302:00:09,424INFO[JBossASKernel]withdependencies:02:00:09,426INFO[JBossASKernel]anddemands:02:00:09,430INFO[JBossASKernel]jboss.ejb:service=EJBTimerService02:00:09,432INFO[JBossASKernel]andsupplies:02:00:09,435INFO[JBossASKernel]jndi:SecureDeploymentManager/remote-org.jboss.deployers.spi.management.deploy.DeploymentManager02:00:09,437INFO[JBossASKernel]Class:org.jboss.deployers.spi.management.deploy.DeploymentManager02:00:09,443INFO[JBossASKernel]jndi:SecureDeploymentManager/remote02:00:09,450INFO[JBossASKernel]Addedbean(jboss.j2ee:jar=profileservice-secured.jar,name=SecureDeploymentManager,service=EJB3)toKernelDeploymentof:profileservice-secured.jar02:00:09,452INFO[JBossASKernel]installingbean:jboss.j2ee:jar=profileservice-secured.jar,name=SecureManagementView,service=EJB302:00:09,454INFO[JBossASKernel]withdependencies:02:00:09,459INFO[JBossASKernel]anddemands:02:00:09,461INFO[JBossASKernel]jboss.ejb:service=EJBTimerService02:00:09,462INFO[JBossASKernel]andsupplies:02:00:09,464INFO[JBossASKernel]jndi:SecureManagementView/remote-org.jboss.deployers.spi.management.ManagementView02:00:09,466INFO[JBossASKernel]Class:org.jboss.deployers.spi.management.ManagementView02:00:09,468INFO[JBossASKernel]jndi:SecureManagementView/remote02:00:09,470INFO[JBossASKernel]Addedbean(jboss.j2ee:jar=profileservice-secured.jar,name=SecureManagementView,service=EJB3)toKernelDeploymentof:profileservice-secured.jar02:00:09,505INFO[EJB3EndpointDeployer]DeployAbstractBeanMetaData@1431022{name=jboss.j2ee:jar=profileservice-secured.jar,name=SecureProfileService,service=EJB3_endpointbean=org.jboss.ejb3.endpoint.deployers.impl.EndpointImplproperties=[container]constructor=nullautowireCandidate=true}02:00:09,522INFO[EJB3EndpointDeployer]DeployAbstractBeanMetaData@14534db{name=jboss.j2ee:jar=profileservice-secured.jar,name=SecureDeploymentManager,service=EJB3_endpointbean=org.jboss.ejb3.endpoint.deployers.impl.EndpointImplproperties=[container]constructor=nullautowireCandidate=true}02:00:09,523INFO[EJB3EndpointDeployer]DeployAbstractBeanMetaData@7787ee{name=jboss.j2ee:jar=profileservice-secured.jar,name=SecureManagementView,service=EJB3_endpointbean=org.jboss.ejb3.endpoint.deployers.impl.EndpointImplproperties=[container]constructor=nullautowireCandidate=true}02:00:10,269INFO[SessionSpecContainer]Startingjboss.j2ee:jar=profileservice-secured.jar,name=SecureDeploymentManager,service=EJB302:00:10,447INFO[EJBContainer]STARTEDEJB:org.jboss.profileservice.ejb.SecureDeploymentManagerejbName:SecureDeploymentManager02:00:10,817INFO[JndiSessionRegistrarBase]BindingthefollowingEntriesinGlobalJNDI:SecureDeploymentManager/remote-EJB3.xDefaultRemoteBusinessInterfaceSecureDeploymentManager/remote-org.jboss.deployers.spi.management.deploy.DeploymentManager-EJB3.xRemoteBusinessInterface02:00:10,940INFO[SessionSpecContainer]Startingjboss.j2ee:jar=profileservice-secured.jar,name=SecureManagementView,service=EJB302:00:10,945INFO[EJBContainer]STARTEDEJB:org.jboss.profileservice.ejb.SecureManagementViewejbName:SecureManagementView02:00:11,059INFO[JndiSessionRegistrarBase]BindingthefollowingEntriesinGlobalJNDI:SecureManagementView/remote-EJB3.xDefaultRemoteBusinessInterfaceSecureManagementView/remote-org.jboss.deployers.spi.management.ManagementView-EJB3.xRemoteBusinessInterface02:00:11,217INFO[SessionSpecContainer]Startingjboss.j2ee:jar=profileservice-secured.jar,name=SecureProfileService,service=EJB302:00:11,226INFO[EJBContainer]STARTEDEJB:org.jboss.profileservice.ejb.SecureProfileServiceBeanejbName:SecureProfileService02:00:11,254INFO[JndiSessionRegistrarBase]BindingthefollowingEntriesinGlobalJNDI:SecureProfileService/remote-EJB3.xDefaultRemoteBusinessInterfaceSecureProfileService/remote-org.jboss.profileservice.spi.ProfileService-EJB3.xRemoteBusinessInterface02:00:11,982INFO[TomcatDeployment]deploy,ctxPath=/admin-console02:00:12,321INFO[config]InitializingMojarra(1.2_12-b01-FCS)forcontext/admin-console02:00:20,855INFO[TomcatDeployment]deploy,ctxPath=/02:00:20,988INFO[TomcatDeployment]deploy,ctxPath=/jmx-console02:00:21,378INFO[Http11Protocol]StartingCoyoteHTTP/1.1onhttp-10.0.0.133-808002:00:21,436INFO[AjpProtocol]StartingCoyoteAJP/1.3onajp-10.0.0.133-800902:00:21,475INFO[ServerImpl]JBoss(Microcontainer)[5.1.0.GA(build:SVNTag=JBoss_5_1_0_GAdate=200905221634)]Startedin2m:30s:582ms
复制代码 7、测试
http://10.0.0.133:8080
web-console
8、封闭办事器
#/usr/local/jboss/bin//shutdown.sh-S
或找到它的pid号,然后kill失落。- [root@linuxbin]#ps-ef|grepjbossroot377537542601:57pts/000:02:38/usr/local/jdk/jdk1.6.0_17/bin/java-Dprogram.name=run.sh-server-Xms128m-Xmx512m-XX:MaxPermSize=256m-Dorg.jboss.resolver.warning=true-Dsun.rmi.dgc.client.gcInterval=3600000-Dsun.rmi.dgc.server.gcInterval=3600000-Djava.net.preferIPv4Stack=true-Djava.endorsed.dirs=/usr/local/jboss/lib/endorsed-classpath/usr/local/jboss/bin/run.jar:/usr/local/jdk/jdk1.6.0_17/lib/tools.jarorg.jboss.Main-b10.0.0.133root39193464002:07pts/100:00:00grepjboss[root@linuxbin]#kill-93775[root@linuxbin]#
复制代码
小知识:CentOS商业化干掉红帽才是出路? |
|