Friday 24 February 2012

Jboss Installation Steps in Linux

1. wget http://download.jboss.org/jbossas/6.1/jboss-as-distribution-6.1.0.Final.zip
2. unzip jboss-as-distribution-6.1.0.Final.zip
3. cd /usr/local
4. mv jboss-6.1.0 .
5. ln -s /usr/local/jboss-6.1.0 jboss
http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u30-download-1377139.html.
6.  chmod +x jdk-6u30-linux-i586.bin
7. ./jdk-6u30-linux-i586.bin
8. mv jdk1.6.0_30/ /usr/lib/
9. cd /usr/lib
10. ln -s jdk1.6.0_30/ jdk
11. JAVA_HOME="/usr/lib/jdk"
12. echo $JAVA_HOME
13. PATH=$JAVA_HOME/bin:$PATH
14. echo $PATH
15. cd /usr/local/jboss-6.1.0.Final/bin/
16. ./run.sh -b 0.0.0.0 &
17. ps -ef | grep jboss


How to Set JAVA_HOME / PATH variables Under Linux Bash Profile

Set JAVA_HOME / PATH for single user

Login to your account and open .bash_profile file
$ vi ~/.bash_profile
Set JAVA_HOME as follows using syntax export JAVA_HOME=<path-to-java>. If your path is set to /usr/java/jdk1.5.0_07/bin/java, set it as follows:
export JAVA_HOME=/usr/java/jdk1.5.0_07/bin/java
Set PATH as follows:
export PATH=$PATH:/usr/java/jdk1.5.0_07/bin
Save and close the file. Just logout and login back to see new changes:
$ echo $JAVA_HOME
$ echo $PATH

Tip: Use the following command to find out exact path to which java executable under UNIX / Linux:
$ which java

 

Set JAVA_HOME / PATH for all user

You need to setup global config in /etc/profile OR /etc/bash.bashrc file for all users:
# vi /etc/profile
Next setup PATH / JAVA_PATH variables as follows:
export PATH=$PATH:/usr/java/jdk1.5.0_07/bin
export PATH=$PATH:/usr/java/jdk1.5.0_07/bin