Monday, November 26, 2012

Setting Up JBoss

Hello There,

Hope everyone is doing great, me too.!!

Been in new assignment from few days, so thought could give some work for my brain.. to refurbish my JBoss ideas..!!

Started with JBoss Installation and Starting Up..!!

You will find this very simple though, thought of sharing with you in case if you find this challenging.;)

Step 1. Download JBoss Package (.zip) file from http://www.jboss.org/jbossas/downloads/

I downloaded : http://download.jboss.org/jbossas/7.1/jboss-as-7.1.1.Final/jboss-as-7.1.1.Final.zip as it is latest.

Step 2 : Copy the file to desired location and Unzip it.

Step 3 : Installation is Completed.

Step 4 : To Sample Start up, go to Unzipped JBoss Directory and Open the Gates of bin Directory.

Step 5 : Copy the PATH till here and navigate to bin directory from Command Prompt ( => Start-> Run-> CMD) by command cd <PATH to bin directory)

Step 6 : Once in bin directory, execute standalone.bat or standalone.sh in case if you do not have Windows Box.

Step 7 : Hold On..!!, You Should Have JAVA Installed Before You Introduce Yourself with JBoss.

Step 8 : After you execute standalone.bat file, your eyes will witness following output.

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\shailesh.dyade>cd C:\SandBox\AppServers\jboss-as-7.1.1.Final\bin


C:\SandBox\AppServers\jboss-as-7.1.1.Final\bin>standalone

Calling "C:\SandBox\AppServers\jboss-as-7.1.1.Final\bin\standalone.conf.bat"
===============================================================================

  JBoss Bootstrap Environment


  JBOSS_HOME: C:\SandBox\AppServers\jboss-as-7.1.1.Final


  JAVA: C:\Program Files\Java\jdk1.7.0_09\bin\java


  JAVA_OPTS: -XX:+TieredCompilation -Dprogram.name=standalone.bat -Xms64M -Xmx51

2M -XX:MaxPermSize=256M -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.se
rver.gcInterval=3600000 -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.war
ning=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djboss.server.default.c
onfig=standalone.xml

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


15:09:26,732 INFO  [org.jboss.modules] JBoss Modules version 1.1.1.GA

15:09:30,059 INFO  [org.jboss.msc] JBoss MSC version 1.0.2.GA
15:09:30,139 INFO  [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" sta
rting
15:09:45,406 INFO  [org.xnio] XNIO Version 3.0.3.GA
15:09:45,406 INFO  [org.jboss.as.server] JBAS015888: Creating http management se
rvice using socket-binding (management-http)
15:09:45,440 INFO  [org.xnio.nio] XNIO NIO Implementation Version 3.0.3.GA
15:09:45,546 INFO  [org.jboss.remoting] JBoss Remoting version 3.2.3.GA
15:09:45,658 INFO  [org.jboss.as.configadmin] JBAS016200: Activating ConfigAdmin
 Subsystem
15:09:45,665 INFO  [org.jboss.as.clustering.infinispan] JBAS010280: Activating I
nfinispan subsystem.
15:09:45,674 INFO  [org.jboss.as.osgi] JBAS011940: Activating OSGi Subsystem
15:09:45,676 INFO  [org.jboss.as.naming] JBAS011800: Activating Naming Subsystem

15:09:45,693 INFO  [org.jboss.as.security] JBAS013101: Activating Security Subsy

stem
15:09:45,694 INFO  [org.jboss.as.webservices] JBAS015537: Activating WebServices
 Extension
15:09:45,733 INFO  [org.jboss.as.logging] JBAS011502: Removing bootstrap log han
dlers
15:09:45,844 INFO  [org.jboss.as.security] (MSC service thread 1-4) JBAS013100:
Current PicketBox version=4.0.7.Final
15:09:45,880 INFO  [org.jboss.as.connector] (MSC service thread 1-7) JBAS010408:
 Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final)
15:09:47,481 INFO  [org.jboss.as.naming] (MSC service thread 1-6) JBAS011802: St
arting Naming Service
15:09:47,485 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-6) JBAS01
5400: Bound mail session [java:jboss/mail/Default]
15:09:48,981 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread
 1-3) Starting Coyote HTTP/1.1 on http--127.0.0.1-8080
15:09:49,160 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerServic
e Thread Pool -- 39) JBAS010403: Deploying JDBC-compliant driver class org.h2.Dr
iver (version 1.3)
15:09:49,699 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service
thread 1-7) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
15:09:51,878 INFO  [org.jboss.ws.common.management.AbstractServerConfig] (MSC se
rvice thread 1-5) JBoss Web Services - Stack CXF Server 4.0.2.GA
15:09:53,160 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread
1-5) JBAS015012: Started FileSystemDeploymentService for directory C:\SandBox\Ap
pServers\jboss-as-7.1.1.Final\standalone\deployments
15:09:53,199 INFO  [org.jboss.as.remoting] (MSC service thread 1-4) JBAS017100:
Listening on /127.0.0.1:9999
15:09:53,199 INFO  [org.jboss.as.remoting] (MSC service thread 1-2) JBAS017100:
Listening on /127.0.0.1:4447
15:09:53,810 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin con
sole listening on http://127.0.0.1:9990
15:09:53,813 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss AS
7.1.1.Final "Brontes" started in 30795ms - Started 133 of 208 services (74 servi
ces are passive or on-demand)

Step 9 : As it says, Admin console Listening on http://127.0.0.1:9990/ go to this URL on your browser, do not try to click this URL right away, you have not installed the JBoss yet.!!


Here you can see the console of JBoss Application Server, which says to add user first then you will be able to see the complete console.

And to Add user we need to execute the add-user.bat script in bin directory, lets try that..!!

After you add, there will be a link to refresh the configuration - you got to click that.





C:\SandBox\AppServers\jboss-as-7.1.1.Final\bin>add-user.bat

What type of user do you wish to add?
 a) Management User (mgmt-users.properties)
 b) Application User (application-users.properties)

(a): a

Enter the details of the new user to add.
Realm (ManagementRealm) :
Username : shailesh
Password :
Re-enter Password :
About to add user 'shailesh' for realm 'ManagementRealm'
Is this correct yes/no? yes
Added user 'shailesh' to file 'C:\SandBox\AppServers\jboss-as-7.1.1.Final\standa
lone\configuration\mgmt-users.properties'
Added user 'shailesh' to file 'C:\SandBox\AppServers\jboss-as-7.1.1.Final\domain
\configuration\mgmt-users.properties'
Press any key to continue . . .




Enter your username and password created in above step, you can make your machine to remember the same till you brainwash him.

Once you login, you will be able to see the page, little familiar from last versions I have worked but very much different in looks, RedHat has changed the Application Server in whole, time to explore it..


Try dropping an application in the deployment folder of standalone profile and try to access.

Its your homework too, explore the same, do it and share your ideas here, you are very welcome to post comments, feedback's about the post and suggestions are very much welcome.

I will end the session here now, and will come back with more goodies of tips and technologies with all that tricks very soon in blog pages.

Take Care, 
Shailesh Dyade.



No comments: