How To Install JBoss Application Webserver Windows

What is JBoss Application server

JBoss Application Server is the #1 most widely used Java application server on the market.
A J2EE certified platform for developing and deploying enterprise Java applications,
Web applications, and Portals, JBoss Application Server provides the full range of J2EE 1.4
features as well as extended enterprise services including clustering, caching, and persistence.

Here is the tutorial how to install jboss application server and configure it as windows services.

Login as Administrator into your server via remote desktop connection 

Download JBoss from this url :
[code]http://heanet.dl.sourceforge.net/sourceforge/jboss/jboss-4.0.0.zip[/code]

Download JDK5 from Sun's Website
[code]http://java.sun.com/javase/downloads/index_jdk5.jsp[/code]

Choose JDK5 Update <x>.
p.s : <x> is latest update number.

Create JAVA_HOME environtment variable and pointing it to JDK installation directory
Example JAVA_HOME c:\j2sdk1.4.2_16

In order to run java in a command line add the jre\bin into your directory path
Example c:\j2sdk1.4.2_16

To do this. Click Start > Control Panel > Open system control panel applet, select the advance tab, and
click on environtment variable button

Extract JBoss into c:\jboss-4.0.0 with zip / winzip
Change directory to c:\jboss-4.0.0\bin\

Run Jboss Webserver
Click run.bat in c:\jboss-4.0.0\bin directory example : c:\jboss-4.0.0\bin\run.bat

To check JBoss server is up and running.
Just open an explorer and akses it from this example url : http://wowtutorial.org:8080.
Please kindly to see the following picture.

Next Steps is to Configure JBoss Webserver running as Windows Services

Download Java Service Wrapper from this URL :
[code]http://nchc.dl.sourceforge.net/sourceforge/wrapper/wrapper-windows-x86-32-3.2.3.zip[/code]

Extract Wrapper into c:\java-wrapper

We will need to copy few files into jboss bin directory.
[code]c:\java-wrapper\bin\Wrapper.exe
c:\java-wrapper\src\bin\App.bat.in   <-- rename it to JBoss.bat
c:\java-wrapper\src\bin\InstallApp-NT.bat.in
c:\java-wrapper\src\bin\UninstallApp-NT.bat.in[/code]

Rename the three batch files as follows. Be sure to remove the .in extensions so that the files all end in .bat.
Depending on how your file explorer is configured, you may not be able to see the extensions

[code]c:\jboss-4.0.0\bin\JBoss.bat
c:\jboss-4.0.0\bin\InstallApp-NT.bat
c:\jboss-4.0.0\bin\UninstallApp-NT.bat[/code]

The Wrapper.exe file is the actual Wrapper executable.
The three batch files are used to run JBoss in a console, and to install and remove it as an NT Service.
These scripts should not require any modification. They do assume that the wrapper.conf file will be
located within a conf directory one level up, c:\jboss-4.0.0\conf\wrapper.conf.

Next, Copy the following two files into the JBoss lib directory c:\jboss-4.0.0\lib\

[code]c:\java-wrapper\lib\Wrapper.DLL
c:\java-wrapper\lib\wrapper.jar[/code]

The Wrapper.DLL file is a native library required by the portion of the Wrapper which runs within the JVM.
The wrapper.jar file contains all of the Wrapper classes.

The Wrapper requires a configuration file.
The standard location for this file is in a conf directory in the application's home directory.
JBoss does not have such a directory by default, so we will need to create one.
Please do so and copy the template wrapper.conf file to that location c:\jboss-4.0.0\conf\

[code]c:\java-wrapper\src\conf\wrapper.conf.in[/code]

And rename it like this [code]c:\jboss-4.0.0\conf\wrapper.conf[/code]

The default wrapper.conf file will place a wrapper.log file in a logs directory under the application home directory.
JBoss does not have such a directory by default, so we will need to create one.
Please do so. You should now have the following directory:

[code]c:\jboss-4.0.0\logs[/code]

Next we will need to modify Wrapper.conf. Here is the sample working wrapper.conf

[code]#********************************************************************
# Wrapper Properties
#********************************************************************
# Java Application
wrapper.java.command=%JAVA_HOME%/bin/java[/code]

[code]# Java Main class.  This class must implement the WrapperListener interface
#  or guarantee that the WrapperManager class is initialized.  Helper
#  classes are provided to do this for you.  See the Integration section
#  of the documentation for details.
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp[/code]

[code]# Java Classpath (include wrapper.jar)  Add class path elements as
#  needed starting from 1
wrapper.java.classpath.1=../lib/wrapper.jar
wrapper.java.classpath.2=%JAVA_HOME%/lib/tools.jar
wrapper.java.classpath.3=./run.jar[/code]

[code]# Java Library Path (location of Wrapper.DLL or libwrapper.so)
wrapper.java.library.path.1=../lib[/code]

[code]# Java Additional Parameters
wrapper.java.additional.1=-Dprogram.name=run.bat
# wrapper.java.additional.1=-server[/code]

[code]# Initial Java Heap Size (in MB)
#wrapper.java.initmemory=3[/code]

[code]# Maximum Java Heap Size (in MB)
#wrapper.java.maxmemory=64[/code]

[code]# Application parameters.  Add parameters as needed starting from 1
wrapper.app.parameter.1=org.jboss.Main[/code]

[code]#********************************************************************
# Wrapper Logging Properties
#********************************************************************
# Format of output for the console.  (See docs for formats)
wrapper.console.format=PM[/code]

[code]# Log Level for console output.  (See docs for log levels)
wrapper.console.loglevel=INFO[/code]

[code]# Log file to use for wrapper output logging.
wrapper.logfile=%JBOSS_HOME%/server/default/log/wrapper.log[/code]

[code]# Format of output for the log file.  (See docs for formats)
wrapper.logfile.format=LPTM[/code]

[code]# Log Level for log file output.  (See docs for log levels)
wrapper.logfile.loglevel=INFO[/code]

[code]# Maximum size that the log file will be allowed to grow to before
#  the log is rolled. Size is specified in bytes.  The default value
#  of 0, disables log rolling.  May abbreviate with the 'k' (kb) or
#  'm' (mb) suffix.  For example: 10m = 10 megabytes.
wrapper.logfile.maxsize=0[/code]

[code]# Maximum number of rolled log files which will be allowed before old
#  files are deleted.  The default value of 0 implies no limit.
wrapper.logfile.maxfiles=0[/code]

[code]# Log Level for sys/event log output.  (See docs for log levels)
wrapper.syslog.loglevel=NONE[/code]

[code]#********************************************************************
# Wrapper Windows Properties
#********************************************************************
# Title to use when running as a console
wrapper.console.title=@app.long.name@[/code]

[code]#********************************************************************
# Wrapper Windows NT/2000/XP Service Properties
#********************************************************************
# WARNING - Do not modify any of these properties when an application
#  using this configuration file has been installed as a service.
#  Please uninstall the service before modifying this section.  The
#  service can then be reinstalled.[/code]

[code]# Name of the service
wrapper.ntservice.name=JBoss[/code]

[code]# Display name of the service
wrapper.ntservice.displayname=JBoss Application Server[/code]

[code]# Description of the service
wrapper.ntservice.description=JBoss Application Server[/code]

[code]# Service dependencies.  Add dependencies as needed starting from 1
wrapper.ntservice.dependency.1=[/code]

[code]# Mode in which the service is installed.  AUTO_START or DEMAND_START
wrapper.ntservice.starttype=AUTO_START[/code]

[code]# Allow the service to interact with the desktop.
wrapper.ntservice.interactive=false[/code]

###==== End Config ####

JBoss can now be run by simply executing the c:\jboss-4.0.0\bin\JBoss.bat script.
Because of the way the Wrapper sets its current directory, it is not necessary to run this script
from within the bin directory. Please try running the application once as a console application to verify
the configuration before attempting to run it as a service.

If you don't have any error and your JBoss server is up and running you can continue to
install JBoss Webserver as Windows Services
.

Just execute [code]c:\jboss-4.0.0\bin\InstallApp-NT.bat[/code]
This command will automatically add JBoss as Windows Services.

You can just verify it from Start > Administrative Tools > Services > JBoss Application Server.

Congratulations. Your application should now be up and running.  

 

Facebook Fans