Вы находитесь на странице: 1из 8

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.

Tags: Win2k | Win2k3, Windows 2008, Windows Servers, Windows Tutorials, JBoss

Comments
jBoss in windows 7
Submitted by tamal (not verified) on Mon, 07/04/2011 - 22:40. how to run j boss in windows 7???? what will be the environment variab;les???? plz help me.... reply

i think it's the same as the


Submitted by sentono on Thu, 07/28/2011 - 05:25. i think it's the same as the above example. if it's not working feel free to contact me via contact us form, i can help you if you can provide me your credential login info another options is try to search google for jbos in win 7 reply

Good Post
Submitted by thangaraj (not verified) on Thu, 05/26/2011 - 05:10. Hi, it is really very informative post which helped me to setup up jboss up an running. Thank you, keep up the good job. reply

Results of reading
Submitted by Robi robson (not verified) on Thu, 05/27/2010 - 18:48. All of the information in this article help me tremendously. I changed the files manually by viewing the documentation here. That helped me get a fresh start on learning what I can do with the [code]wrapper.conf[/code] Also a great suggestion from sentono to read the documentation carefully speeded up things a great deal. I am new to Java and JBoss. I received error messages in my log files but that lead to the suggestion of sentono to change to a 32 bit system. I am using a 64bit system also. Thanks for the help. Now off to Eclipse and ObjectF. Next step is to model something. Maybe after a while, I can be able to help others like these threads! reply

hei robi thanks for your


Submitted by sentono on Tue, 06/01/2010 - 20:33. hei robi thanks for your great comment :) i really appreciate it. actually my tutorial is old enough and i remember i installed it on the 32 bit o/s. may be i need sometimes to revise this tutorial so it will keep up 2 date :) reply

Hi, i have done everzthing


Submitted by Anonymous (not verified) on Tue, 05/04/2010 - 08:19. Hi, i have done everzthing like in zou tutorial, but i want to run C:\jboss-5.1.0.GA\bin\InstallAppNT.bat. In CMD is -> Access denied. I have tried to set Full Control to Everyone on folder C:\java-wrapper. Thx for advice ..

Tomas reply

may be this is related to


Submitted by sentono on Wed, 05/05/2010 - 01:08.

may be this is related to your access. you need administrator access and make sure your permission all set. reply

wrapper 32bit problem ...


Submitted by Toams (not verified) on Thu, 05/06/2010 - 03:48. Hi previous problem solved. Iam able to run service without any errors etc. But, when i tried to test service with "wrapper.exe -c %JBOSS_HOME%\server\default\conf\wrapper.conf" i have got a lot of info and error messages in cmd .. In log i found, that problem is in wrapeer. Wrapeer is 32bit, but iam tring to run jboss with wrapper on Win Server 2008 64bit ... any advice? :) THX! Tomas reply

hei i believe win 2008 server


Submitted by sentono on Sun, 05/09/2010 - 19:56. hei i believe win 2008 server have a compatibility software so you can choose to using win2003 sp2 or winxp sp3 this should help you fixed the issue. reply

Hi, My applications are in


Submitted by Venkat (not verified) on Sun, 01/24/2010 - 05:52. Hi, My applications are in the "all" directory of the jboss folder, how and where to modify settings and install as a service in windows. Regards, Venkat reply

please read the doc more


Submitted by sentono on Wed, 01/27/2010 - 02:33. please read the doc more carefully. reply

Hi, My applications are in


Submitted by Venkat (not verified) on Sun, 01/24/2010 - 05:50.

Hi, My applications are in the "all" directory of the jboss folder, how and where to modify settings and install as a service in windows. Regards, Venkat reply

How to run JBoss as service from "all" directory


Submitted by Venkat (not verified) on Sun, 01/24/2010 - 05:49. Hi, My applications are in the "all" directory of the jboss folder, how and where to modify settings and install as a service in windows. Regards, Venkat reply

How to run JBoss as service from "all" directory


Submitted by Irfan (not verified) on Sun, 10/10/2010 - 04:29. Hi, Yes same issue with me, how to run JBoss as Service considering the cluster set up where application will run from "all" directory. Regards Irfan reply

Great Document
Submitted by Venkatesan (not verified) on Mon, 01/04/2010 - 09:23. Hi, This kind of document i am looking for a long time for jboss, thanks very much buddy. reply

run jsp
Submitted by pen sophoan (not verified) on Mon, 10/26/2009 - 22:27. Dear my friend. first of all , thank you very much for your time to share with us on how to set jboss as window services. i got it work, but could you tell me how to run jsp file? i follow this link and i can run jsp file. http://www.centerkey.com/jboss/ but when i follow your tutorial, i don know how to run it. please help me. thank you in advance. Pen reply

from the link that you post


Submitted by sentono on Tue, 10/27/2009 - 01:28. from the link that you post previously, i think it's describe detail how to running jsp. Anyway.. since i don't have any jboss / windows server so i can't testing out. but if you follow the url that you gave me.. it's should be working smoothly

Вам также может понравиться