JBoss on CentOS
From DTO Labs Knowledge Base
Since http://www.jboss.org [JBoss] is not packaged as an RPM or included in any of the standard Yum repositories, the easiest way to get it installed on CentOS is using the Zip distribution.
Setup
- Create a user (and group) for the installation:
[root@ip-10-176-57-29 ~]# useradd jboss [root@ip-10-176-57-29 ~]# su - jboss [jboss@ip-10-176-57-29 ~]$ cd /home/jboss
- Download the required version:
[jboss@ip-10-176-57-29 ~]$ wget -q http://sourceforge.net/projects/jboss/files/JBoss/JBoss-4.0.3SP1/jboss-4.0.3SP1.zip/download
- Unzip the distribution:
[jboss@ip-10-176-57-29 ~]$ unzip jboss-4.0.3SP1.zip . . . inflating: jboss-4.0.3SP1/server/minimal/lib/jboss-management.jar inflating: jboss-4.0.3SP1/server/minimal/lib/jboss-minimal.jar inflating: jboss-4.0.3SP1/server/minimal/lib/jnpserver.jar inflating: jboss-4.0.3SP1/server/minimal/lib/log4j.jar
Test
- Start JBoss from the command-line: (Note: If you're following the Duke's Bank tutorial, this will fail if Jenkins is running,due to port 8080 being in use)
[jboss@ip-10-176-57-29 ~]$ sh jboss-4.0.3SP1/bin/run.sh ========================================================================= JBoss Bootstrap Environment JBOSS_HOME: /home/jboss/jboss-4.0.3SP1 JAVA: /usr/java/default/bin/java JAVA_OPTS: -server -Xms128m -Xmx128m -Dprogram.name=run.sh CLASSPATH: /home/jboss/jboss-4.0.3SP1/bin/run.jar:/usr/java/default/lib/tools.jar ========================================================================= 13:06:08,828 INFO [Server] Starting JBoss (MX MicroKernel)... 13:06:08,840 INFO [Server] Release ID: JBoss [Zion] 4.0.3SP1 (build: CVSTag=JBoss_4_0_3_SP1 date=200510231054) 13:06:08,841 INFO [Server] Home Dir: /home/jboss/jboss-4.0.3SP1 . . . 13:06:33,333 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8080 13:06:33,374 INFO [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009 13:06:33,394 INFO [JkMain] Jk running ID=0 time=0/29 config=null 13:06:33,402 INFO [Server] JBoss (MX MicroKernel) [4.0.3SP1 (build: CVSTag=JBoss_4_0_3_SP1 date=200510231054)] Started in 24s:558ms
- Navigate to the home page. e.g: http://app.dukesbank.dtolabs.com:8080
- Interrupt (^C) the running process to stop JBoss:
. . . 13:09:06,796 INFO [HypersonicDatabase] Database standalone closed clean 13:09:06,834 INFO [MailService] Mail service 'java:/Mail' removed from JNDI 13:09:06,840 INFO [TomcatDeployer] undeploy, ctxPath=/web-console, warUrl=.../deploy/management/console-mgr.sar/web-console.war/ 13:09:07,040 INFO [TomcatDeployer] undeploy, ctxPath=/jbossmq-httpil, warUrl=.../deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/ 13:09:07,046 INFO [TomcatDeployer] undeploy, ctxPath=/, warUrl=.../deploy/jbossweb-tomcat55.sar/ROOT.war/ 13:09:07,066 INFO [Http11Protocol] Pausing Coyote HTTP/1.1 on http-0.0.0.0-8080 13:09:08,068 INFO [StandardService] Stopping service jboss.web 13:09:08,075 INFO [Http11Protocol] Stopping Coyote HTTP/1.1 on http-0.0.0.0-8080 13:09:08,080 INFO [TomcatDeployer] undeploy, ctxPath=/invoker, warUrl=.../deploy/http-invoker.sar/invoker.war/ 13:09:08,081 INFO [TomcatDeployer] undeploy, ctxPath=/ws4ee, warUrl=.../tmp/deploy/tmp2119299583701350648jboss-ws4ee.war/ Shutting down 13:09:08,180 INFO [Server] Shutdown complete Shutdown complete Halting VM