[Next entry: "Boneheaded Adobe Flex"]
Home » Archives » June 2008 » Installing JBoss Application Server 4.2.2 on Ubuntu 8.04
[Previous entry: "Adobe Flex 3 Training from the Source Errata"]
Home » Archives » June 2008 » Installing JBoss Application Server 4.2.2 on Ubuntu 8.04
[Previous entry: "Adobe Flex 3 Training from the Source Errata"]
Installing JBoss Application Server 4.2.2 on Ubuntu 8.04
24 June 2008 @ 05:11 PM MST
24 June 2008 @ 05:11 PM MST
Current Music: Whatever
Current Mood: Frustrated
Current Mood: Frustrated
Ok, Since it took me about forever to get JBoss installed (because I couldn't find any helpful documents) I'll post what I needed to do here in hopes of helping someone else in the future.
First things first. Grab the BINARY distribution from the JBoss download site, not the SOURCE distribution. I didn't even read the file names and grabbed the .tar.gz file rather than the .zip figuring they were the same, big mistake. My fault on that one. The current stable release is 4.2.2.GA So on the JBoss Download Page click "download" for that package. This should load a SourceForge download page. Be sure to download a file that does not contain "src" in the filename. In this case we click on "jboss-4.2.2.GA.zip".
Once that's done downloading (my filesize was about 95 MB), I chose to extract it to the folder "/opt/jboss". Not for any particular reason, except I have eclipse installed at "/opt/eclipse" and so it starts to keep all of that related development stuff together.
So first create "/opt/jboss" by typing "sudo mkdir /opt/jboss" (assuming that "/opt" belongs to root, which is usually will). Then change the permissions on that directory so that they belong to you. In my case, my username is "kyle" and my group is "kyle" so I issue the following commands: "sudo chown kyle /opt/jboss" and "sudo chgrp kyle /opt/jboss".
Great, now you own the folder. So copy the zip file into it. If you downloaded it to your desktop the command would be "cp /usr/kyle/Desktop/jboss-4.2.2.GA.zip /opt/jboss/".
Now unzip it. I can't remember if the unzip utility is installed by default in Ubuntu so if you get a "command not found" error use "sudo apt-get install unzip" to install the unzip utility. To unzip the file first change your working directory to "/opt/jboss" by typing: "cd /opt/jboss". Then unzip the file using: "unzip jboss-4.2.2.GA.zip".
Once that finishes running feel free to delete the zip file: "rm jboss-4.2.2.GA.zip".
You will now have a new directory in there called "jboss-4.2.2.GA". This folder contains all the JBoss Application Server stuff. If you don't have a "bin" directory in the newly created "jboss-4.2.2.GA" directory then you probably did what I did and downloaded the source distribution. If you keep going then when you try to test your configuration you won't find "jboss-4.2.2.GA/bin/run.sh" but if you're just a little too clever, like I was, you WILL find a "run.sh" in a directory something like "system/src/run.sh" or something. If you do try to run that (which will require using chmod to make it executable) you will get an error saying that "run.jar" is not where it's supposed to be.
According to the JBoss Documentation you now need to update your bash profile to contain a couple of variables. This isn't as scary as it sounds.
Open up the file .bashrc located in your user directory: "gedit /usr/kyle/.bashrc". And add these lines:
"export JAVA_HOME=/usr/lib/jvm/java-6-sun
export PATH=$PATH:$JAVA_HOME/bin
export JBOSS_HOME=/opt/jboss/jboss-4.2.2.GA
export PATH=$PATH:$JBOSS_HOME/bin"
This is assuming you're using sun-java6-jdk. If you're using an earlier jdk (and you need to have a jdk installed, so if you don't have one be sure to do something like "sudo apt-get install sun-java6-jdk") then the directory will be something different. This was one of the things that took me a while to figure out. In the earlier jdk installs there is a directory containing the letters "jdk" that you point the JAVA_HOME variable to. With Java6 there is no "jdk" folder, it just lives in "/usr/lib/jvm/java-6-sun". Not knowing about this change I was getting very frustrated trying to find my jdk directory. I finally just tried the above, and it works.
After you save the ".bashrc" file you need to update your terminal using: "source /usr/kyle/.bashrc". If it gives you an error check to make sure you copied the lines correctly, that you do have a JDK installed (and are pointing at the correct location).
If the change was good, then you should be able to test your JBoss Application Server installation with the following:
"cd /opt/jboss/bin" and then
"./run.sh"
This will spit out many lines of text and eventually say something like: "16:43:13,547 INFO [Server] JBoss (MX MicroKernel) [4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)] Started in 30s:142ms"
Once it says that use a webrowser to go to "http://127.0.0.1:8080" to see if it worked.
If it didn't, well, I'm sorry, I am definitely not a JBoss expert and can't help you much past here. Head over to Google and do some searching, or try the JBoss Documentation.
Hope that helps somebody.
[This Entry]
First things first. Grab the BINARY distribution from the JBoss download site, not the SOURCE distribution. I didn't even read the file names and grabbed the .tar.gz file rather than the .zip figuring they were the same, big mistake. My fault on that one. The current stable release is 4.2.2.GA So on the JBoss Download Page click "download" for that package. This should load a SourceForge download page. Be sure to download a file that does not contain "src" in the filename. In this case we click on "jboss-4.2.2.GA.zip".
Once that's done downloading (my filesize was about 95 MB), I chose to extract it to the folder "/opt/jboss". Not for any particular reason, except I have eclipse installed at "/opt/eclipse" and so it starts to keep all of that related development stuff together.
So first create "/opt/jboss" by typing "sudo mkdir /opt/jboss" (assuming that "/opt" belongs to root, which is usually will). Then change the permissions on that directory so that they belong to you. In my case, my username is "kyle" and my group is "kyle" so I issue the following commands: "sudo chown kyle /opt/jboss" and "sudo chgrp kyle /opt/jboss".
Great, now you own the folder. So copy the zip file into it. If you downloaded it to your desktop the command would be "cp /usr/kyle/Desktop/jboss-4.2.2.GA.zip /opt/jboss/".
Now unzip it. I can't remember if the unzip utility is installed by default in Ubuntu so if you get a "command not found" error use "sudo apt-get install unzip" to install the unzip utility. To unzip the file first change your working directory to "/opt/jboss" by typing: "cd /opt/jboss". Then unzip the file using: "unzip jboss-4.2.2.GA.zip".
Once that finishes running feel free to delete the zip file: "rm jboss-4.2.2.GA.zip".
You will now have a new directory in there called "jboss-4.2.2.GA". This folder contains all the JBoss Application Server stuff. If you don't have a "bin" directory in the newly created "jboss-4.2.2.GA" directory then you probably did what I did and downloaded the source distribution. If you keep going then when you try to test your configuration you won't find "jboss-4.2.2.GA/bin/run.sh" but if you're just a little too clever, like I was, you WILL find a "run.sh" in a directory something like "system/src/run.sh" or something. If you do try to run that (which will require using chmod to make it executable) you will get an error saying that "run.jar" is not where it's supposed to be.
According to the JBoss Documentation you now need to update your bash profile to contain a couple of variables. This isn't as scary as it sounds.
Open up the file .bashrc located in your user directory: "gedit /usr/kyle/.bashrc". And add these lines:
"export JAVA_HOME=/usr/lib/jvm/java-6-sun
export PATH=$PATH:$JAVA_HOME/bin
export JBOSS_HOME=/opt/jboss/jboss-4.2.2.GA
export PATH=$PATH:$JBOSS_HOME/bin"
This is assuming you're using sun-java6-jdk. If you're using an earlier jdk (and you need to have a jdk installed, so if you don't have one be sure to do something like "sudo apt-get install sun-java6-jdk") then the directory will be something different. This was one of the things that took me a while to figure out. In the earlier jdk installs there is a directory containing the letters "jdk" that you point the JAVA_HOME variable to. With Java6 there is no "jdk" folder, it just lives in "/usr/lib/jvm/java-6-sun". Not knowing about this change I was getting very frustrated trying to find my jdk directory. I finally just tried the above, and it works.
After you save the ".bashrc" file you need to update your terminal using: "source /usr/kyle/.bashrc". If it gives you an error check to make sure you copied the lines correctly, that you do have a JDK installed (and are pointing at the correct location).
If the change was good, then you should be able to test your JBoss Application Server installation with the following:
"cd /opt/jboss/bin" and then
"./run.sh"
This will spit out many lines of text and eventually say something like: "16:43:13,547 INFO [Server] JBoss (MX MicroKernel) [4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)] Started in 30s:142ms"
Once it says that use a webrowser to go to "http://127.0.0.1:8080" to see if it worked.
If it didn't, well, I'm sorry, I am definitely not a JBoss expert and can't help you much past here. Head over to Google and do some searching, or try the JBoss Documentation.
Hope that helps somebody.
[This Entry]