Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Chapter 2. Getting Started

2.1. Pre-Requisites

You must have adequate disk space to install JDK and JBoss Enterprise Application Platform while also allowing enough space for your applications. Before installing JBoss Enterprise Application Platform you must have a working installation of Java. Since JBoss is 100% pure Java you can have it working on any Operating System / Platform that supports Java. However there are a few Operating System-specific issues that you must be aware of. Refer to https://wiki.jboss.org/wiki/Wiki.jsp?page=JBossOperatingSystemSpecificIssues for more information.

2.1.1. Hardware and Operating System Requirements

For the latest information on supported Operating System / JVM combinations and supported Database platforms, please refer to https://www.jboss.com/products/platforms/application/testedconfigurations.

2.1.2. Configuring Your Java Environment

You must have a working installation of JDK 1.5 before you install JBoss Enterprise Application Platform. You can install the 32-bit or 64-bit JVM as per your requirements. In this guide we will show you how to install a 32-bit Sun JDK 5.0 using RHN, on a generic Linux Platform and Microsoft Windows Platform But before we do that let's take a look at some of the benefits of using a 64-bit JVM.
Benefits of 64-bit JVM on 64-bit OS and Hardware:
  • Wider datapath: The pipe between RAM and CPU is doubled, which improves the performance of memory-bound applications.
  • 64-bit memory addressing gives virtually unlimited (1 exabyte) heap allocation. However large heaps affect garbage collection.
  • Applications that run with more than 1.5GB of RAM (including free space for garbage collection optimization) should utilize the 64-bit JVM.
  • Applications that run on 32-bit JVM and do not require more than minimal heap sizes will gain nothing from a 64-bit JVM. Barring memory issues, 64-bit hardware with the same relative clock speed and architecture is not likely to run Java applications faster than their 32-bit cousin.
Installing and Configuring 32-bit Sun JDK 5.0 using RHN
  • Java SDKs are provided by the Red Hat Enterprise Linux 5 Supplementary channel for your Linux variant and architecture. Depending on the architecture, the channel names are:
    rhel-i386-server-supplementary-5 and rhel-x86_64-server-supplementary-5
    The java-1.5.0-bea, java-1.5.0-ibm and java-1.5.0-sun SDKs are available from these channels. Make sure you also install the -devel subpackages.
  • Selecting alternatives for java, javac and java_sdk_1.5.0 (setting java_sdk_1.5.0 is optional).
    This is only needed if you want to use the SysV service script and/or want this installed SDK to be the default java and javac in the system. This choice can often be overridden by setting the JAVA_HOME environment variable.
    The alternatives system allows different versions of Java, from different sources to co-exist on your system. You should make sure the desired one is selected so that the service script uses the one you want.
    As root, issue the following command:
    							/usr/sbin/alternatives --config java
    
    and make sure the desired one is selected (marked with a '+'), or select it by entering its number as prompted.
    Make sure you do the same for javac and java_sdk_1.5.0. We recommend that all point to the same manufacturer and version.
Installing and Configuring 32-bit Sun JDK 5.0 on a generic Linux platform
  • Download the Sun JDK 5.0 (Java 2 Development Kit) from Sun's website: https://java.sun.com/javase/downloads/index_jdk5.jsp. Choose "JDK 5.0 Update <x>" (where x is the latest update number) for download and then select "RPM in self-extracting" file for Linux[1]. Read the instructions on Sun's website for installing the JDK.
  • If you don't want to use SysV service scripts you can install the "self-extracting file" for Linux instead of choosing the "RPM in self-extracting" file. In that case you can skip the next step mentioned here. But it is recommended to use the SysV service scripts for production servers.
  • Download and install the appropriate -compat RPM from JPackage here. Please ensure you choose a matching version of the -compat package to the JDK you installed.
  • Create an environment variable that points to the JDK installation directory and call it JAVA_HOME. Add $JAVA_HOME/bin to the system path to be able to run java from the command line. You can do this by adding the following lines to the .bashrc file in your home directory.
    #In this example /usr/java/jdk1.5.0_11 is the JDK installation directory.
    export JAVA_HOME=/usr/java/jdk1.5.0_11
    export PATH=$PATH:$JAVA_HOME/bin
    
    Set this variable for the user account doing the installation and also for the user account that will run the server.
  • If you have more than one version of JVM installed in your machine, make sure you are using the JDK1.5 installation as the default java and javac. You can do this using the alternatives system. The alternatives system allows different versions of Java, from different sources to co-exist on your system.
    Select alternatives for java, javac and java_sdk_1.5.0
    • As root, type the following command at the shell prompt and you should see something like this:
      [root@vsr ~]$ /usr/sbin/alternatives --config java
      There are 2 programs which provide 'java'.
      Selection    Command
      -----------------------------------------------
         1           /usr/lib/jvm/jre-1.4.2-gcj/bin/java
      *+ 2           /usr/lib/jvm/jre-1.5.0-sun/bin/java
      Enter to keep the current selection[+], or type selection number:
      
      Make sure the Sun version [jre-1.5.0-sun in this case] is selected (marked with a '+' in the output), or select it by entering its number as prompted.
    • Repeat the same for javac and java_sdk_1.5.0.
      [root@vsr ~]$ /usr/sbin/alternatives --config javac
      There are 1 programs which provide 'javac'.
      	Selection   Command
      -----------------------------------------------
      *+ 1           /usr/lib/jvm/java-1.5.0-sun/bin/javac
      Enter to keep the current selection[+], or type selection number:
      
      [root@vsr ~]$ /usr/sbin/alternatives --config java_sdk_1.5.0
      There are 1 programs which provide 'java_sdk_1.5.0'.
      	Selection   Command
      -----------------------------------------------
      *+ 1           /usr/lib/jvm/java-1.5.0-sun
      Enter to keep the current selection[+], or type selection number:
      
      You should verify that java, javac and java_sdk_1.5.0 all point to the same manufacturer and version.

    Note

    You can always override this step by setting the JAVA_HOME environment variable as explained in the previous step.
  • Make sure that the java executable is in your path and that you are using an appropriate version. To verify your Java environment, type java -version at the shell prompt and you should see something like this:
    [root@vsr ~]$ java -version
    java version "1.5.0_11"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
    Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode, sharing)
    
Installing and Configuring 32-bit Sun JDK 5.0 on Microsoft Windows
  • Download the Sun JDK 5.0 (Java 2 Development Kit) from Sun's website: https://java.sun.com/javase/downloads/index_jdk5.jsp. Choose "JDK 5.0 Update <x>" (where x is the latest update number) for download and then select your Windows Platform options to perform the installation.
  • Create an environment variable called JAVA_HOME that points to the JDK installation directory, for example: C:\Program Files\Java\jdk1.5.0_11\. In order to run java from the command line add the jre\bin directory to your path, for example: C:\Program Files\Java\jdk1.5.0_11\jre\bin. To do this, open the Control Panel from the Start Menu, switch to Classic View if necessary, open the System Control Panel applet, select the Advanced Tab, and click on the Environment Variables button.


[1] Make sure you choose the appropriate file for your platform.


 
 
  Published under the terms of the Open Publication License Design by Interspire