« TCP, UDP, Unicast, Multicast? I thought this blog was supposed to be about portal. | Main | Web 2.0 and Org 2.0 »

Installing a managed WLS as a Windows Service

In Weblogic pre 9.x, there used to be an installSvc.cmd script which you could just double-click and your Weblogic Server would be installed as a Windows service. For a lazy hacker like me, this was very useful.

After Weblogic 9.x, I couldn't find the script and basically had to resort to command-line startup of the server for a while. Now, I generally don't like to have command-line startups cluttering my taskbar, especially when I'm using Windows and doing demoes.

So, with the help of my colleagues Ian and Devon, we wrote a script that would install a managed server as a Windows service and which you can quietly start in the background.

Here it is.Replace your paths as appropriate. If you use the script below, make sure that you also include the username and password in your boot.properties file (the username and password are required at startup of the server). Hang on, did I just say write a username and password in a file that can then be read by anyone? Nope. When you first start Weblogic server, the username and password values in boot.properties would be encrypted at the first run.

Naturally, all the usual disclaimers apply: i.e. I'm not responsible for anything etc etc.

================================================================
set DOMAIN_NAME=mydomain
set USERDOMAIN_HOME=D:\bea\user_projects\domains\mydomain
set SERVER_NAME=myserver
set PRODUCTION_MODE=true

set JAVA_OPTIONS=-Dweblogic.Stdout="D:\bea\user_projects\domains\mydomain\stdout.txt" -Dweblogic.Stderr="D:\bea\user_projects\domains\mydomain\stderr.txt" -Dweblogic.management.server="http://localhost:7001" -Dweblogic.management.discover=false


set MEM_ARGS=-Xms512m -Xmx1024m

call "D:\bea\wlserver_10.0\server\bin\installSvc.cmd"
================================================

Enjoy!

TrackBack

TrackBack URL for this entry:
http://blogs.oracle.com/mte1521/mt-tb.cgi/10711

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About This Entry

This page contains a single entry from the blog posted on March 19, 2009 9:54 PM.

The previous post in this blog was TCP, UDP, Unicast, Multicast? I thought this blog was supposed to be about portal..

The next post in this blog is Web 2.0 and Org 2.0.

Many more can be found on the main index page or by looking through the archives.

Top Tags

Powered by
Movable Type and Oracle