Installing JBOSS 5.0.0 and JDK

Links to download

JBOSS ==> http://www.jboss.org/jbossas/downloads/

JDK ==> http://java.sun.com/javase/downloads/index_jdk5.jsp

Installing JDK

1. Download JDK rpm (the file would be with rpm.bin extension on the provided link)

2. Give the bin file executable permission --

Code:
# chown u+x jdk.xxx.xxx.rpm.bin



3. Execute the bin file, it will install the jdk rpm in one go

Code:
# ./jdk.xxx.xxx.rpm.bin

4. JDK by default intalls itself in /usr/java directory

5. Now need to unlink older java and link new java for that

Code:
# unlink /usr/bin/java
# ln -s /usr/java/jdk.version/bin/java /usr/bin/java


6. Now check java version

Code:
# java -version

7. Export the java path in bashrc file

Code:
export JAVA_HOME=/usr/java/jdk1.5.0_22/
export PATH=$PATH:$JAVA_HOME/bin




Installating JBOSS 5


1. We will take example of jboss-5.0.0

2. Download JBOSS source code and Extarct it to a specific directory

3. The extracted folder is just the source code, we need to build the orignal files from this source code
For that there is a tool "ant" in jboss source code folder. First we need to export its path.

4. Open .bashrc file and add the following line in it

Code:
export ANT_HOME=/usr/local/jboss-5.0.0.GA-src/tools/
export PATH=$PATH:$ANT_HOME/bin


5. Go to the directory ==> jboss-5.0.0.GA-src/build/

6. Run the ant tool in this directory

Code:
# ant

7. It will start building, it will download file from maven repository to build it. On an average it takes 30 min to build.

8. You should get a "Build Succesful" note at the end without any errors.

9. After that you will get a directory named output in build directory.

Code:
# cd jboss-5.0.0.GA-src/build/output
# ls
jboss-5.0.0.GA


10. The above directory contains the actual jboss files to run jboss.

11. Put this directory into /usr/local

12. Now create a jboss user

13. Give jboss ownership to jboss-5.0.0.GA directory.

14. Export java paths to jboss home directory.

Code:
# vi /home/jboss/.bashrc

15. Enter the following line in .bashrc file

Code:
export JAVA_HOME=/usr/java/jdk1.5.0_22/
export PATH=$PATH:$JAVA_HOME/bin

export ANT_HOME=/usr/local/jboss-5.0.0.GA-src/tools/
export PATH=$PATH:$JAVA_HOME/bin


16. Now we need to make start and stop script for jboss

Code:
# vi start_jboss_5.0.0.sh

17. Add the following line to this file

Code:
export JAVA_HOME=/usr/java/jdk1.5.0_22/
export PATH=$PATH:$JAVA_HOME/bin

export ANT_HOME=/usr/local/jboss-5.0.0.GA-src/tools/
export PATH=$PATH:$ANT_HOME/bin

export JBOSS_HOME=/usr/local/jboss-5.0.0.GA
export PATH=$PATH:$JBOSS_HOME/bin

sh /usr/local/jboss-5.0.0.GA/bin/run.sh -b 0.0.0.0 &

18. Save and exit

Code:
# vi stop_jboss_5.0.sh

-- Add the following line

Code:
export PATH=$PATH:$JAVA_HOME/bin

export ANT_HOME=/usr/local/jboss-5.0.0.GA-src/tools/
export PATH=$PATH:$ANT_HOME/bin

export JBOSS_HOME=/usr/local/jboss-5.0.0.GA
export PATH=$PATH:$JBOSS_HOME/bin


sh /usr/local/jboss-5.0.0.GA/bin/shutdown.sh --shutdown

19. Put these scripts in jboss users home directory and give ownership of jboss user.

20. Now login as jboss user and run the start script

Code:
# sudo su – jboss
# ./start_jboss_5.0.0.sh

21. It will give a long output and will take a while to start.

22. To check jboss is running or not opne the webbrowser and enter

http://localhost:8080

23. To check from other machines enter the IP of the machine with 8080 port

24As we are starting jboss with option "-b 0.0.0.0"(as mentioned in the start script) it can be accesed over the network.

25. To stop jboss run the stop script

Code:
# ./stop_jboss_5.0.sh


Note: This process of installing jboss is for jboss version 5 or higher i:e Building through source code. For older version jboss dump is available and we can directly start jboss from that.Can directly jump to step 10 if you have the dump of jboss.

Comments

Popular posts from this blog

28 Names of Srimati Radha Rani (Hindi/Odia/English)