Before installing and running the server, you should check that your JDK installation is working. You will need the JDK binaries directory in your PATH (this is essential: see below) not just for the user account which is doing the installation, but also for the user account that will run the server. If you are running the server as root, you should check that the JDK binaries are in the PATH even for root (root and ordinary users normally have different PATH settings). You won't need to specify a CLASSPATH environment variable if you don't normally have to.
The next step will be to download, install and test the JBoss server. At the time of writing the most recent version of JBoss is 2.2.2. It doesn't matter where you install JBoss. There is no requirement for root access to run JBoss as none of the default ports are below the 1024 privaledged port range. You will need to define a JBOSS_DIST environment variable that points to the installation location of the JBoss installation directory. This is required to build and run all of the documentation examples you will download later.
JBoss is distributed as a ZIP file. You can download the binary distribution which contains the latest offical release (which was 2.2.2 at the time of writing) or a source snapshot with the latest version from CVS. This documentation mainly is written for the 2.2.2 version.
Download the binary package from http://sourceforge.net/projects/jboss/ under the Latest File Releases section. Place it in a temporary directory and use the JDK jar tool to decompress it to the place where you want JBoss installed. The toplevel JBoss directory of the unzipped binary will be referred to as the JBOSS_DIST directory.
Make sure, that this user has the JDK binaries in his command path and that he has write access to the JBoss directory (needed for log files and deployment). You are now ready to change to the bin directory, and run the JBoss server:
A proper installation should start without any error messages or exceptions being thrown. It will produce several pages of output on startup. The console output should look something like the following at the start and end for JBoss-2.2.2 on Linux:
Now that you have the JBoss server installed, set the JBOSS_DIST environment variable to the installation location.