Thursday, October 3, 2013

Running JBoss AS 7

Installing JBoss AS 7.2

JBoss AS 7.2 binary is not available for download. You need to checkout the source and build it. It is not complicated; as easy as building a java project using maven. All the instructions given below are for Linux environment (Ubuntu in particular). Nevertheless you can figure out similar commands for Windows.

You can download the source directly from here or checkout as follows.
  1. Open your terminal
  2. Install git, if you haven't installed already
    •   sudo apt-get install git 
  3. Checkout the source code
    •  git clone https://github.com/wildfly/wildfly.git 
  4. You will see the following in the output when checkout is successful
  5. Switch to the project folder
    •  cd wildfly 
  6. Checkout the 7.2.0.Final tag
    •  git checkout 7.2.0.Final 
  7. Create a temp branch
    •  git checkout -b temp-7.2 
Now you have the source code. Try to build it as follows
  1. Install maven, if you haven't installed already
    •  sudo apt-get install mvn 
  2. Build
    •  ./build.sh clean install -DskipTests 
  3. Go to build/target/ directory and copy the directory jboss-as-7.2.0.Final to any location of your choice. This is your JBoss AS 7.2 binary.

Starting JBoss AS 7.2

Let's refer to the location where you have copied the jboss-as-7.2.0.Final folder, as jboss installation directory.
  1. Go to <jboss_installation_dir>/bin directory
  2. Run  ./standalone.sh -b 0.0.0.0 

Stopping JBoss AS 7.2 

To stop the server, press Ctrl + C, or use the admin console as follows
  1. Go to <jboss_installation_dir>/bin directory
  2. Run  ./jboss-cli.sh --connect command=:shutdown 

You can also refer to JBoss page for configuring with Eclipse or Windows