Installing WebLogic Server on Mac OS X

Introduction

One of the exciting new features in WebLogic Server 11g is support for Mac OS X.  In this post, I review steps to install WLS 11g on Mac OS X.

Main Article

The new ‘ZIP Distribution’ of WebLogic Server allows developers to run WebLogic Server on Mac OS X.  The download file is much smaller and the install is much faster than downloading JDeveloper, which also includes WebLogic Server that can be used on the Mac.

To install Weblogic Server on your Mac, follow these steps.

First, you need to download WebLogic Server 11g (10.3.4) ZIP Distribution from OTN.

Unzip this into new directory, which we will call MW_HOME.  I created a directory called WebLogic/Middleware in my home directory.

# mkdir ~/WebLogic
# cd ~/WebLogic
# mkdir Middleware
# cd Middleware
# unzip ../Downloads/wls1034_dev.zip

Run the configuration script to setup WebLogic Server.

# export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home
# export MW_HOME=/Users/mark/WebLogic/Middleware
# ./configure.sh
# export USER_MEM_ARGS="-Xmx1024m -XX:MaxPermSize=256m"
# . wlserver/server/bin/setWLSenv.sh

Start WebLogic Server for the first time and create a domain.

# cd ~/WebLogic
# mkdir domain
# cd domain
# java –Xmx1024m –XX:MaxPermSize=256m weblogic.Server

WebLogic will notice this is the first time it has been started and will ask you if you want to create a domain.  Answer ‘y’ to this question, and then provide a username and password when requested.

Would you like the server to create a default configuration and boot? (y/n): y
Enter username to boot WebLogic server: weblogic
Enter password to boot WebLogic server: password
For confirmation, please re-enter password required to boot WebLogic server: password

WebLogic Server will start up.  When it is up you will see a message indicating that the server was started in RUNNING mode.  Once you see this, you can shut it down (type Ctrl-C).

You can now use the startup scripts in your newly created domain.  When you want to start WebLogic Server, enter the following commands (you might want to create a script to do this):

# export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home
# export MW_HOME=/Users/mark/WebLogic/Middleware
# export USER_MEM_ARGS="-Xmx1024m -XX:MaxPermSize=256m"
# . /Users/mark/WebLogic/Middleware/wlserver/server/bin/setWLSenv.sh
# /Users/mark/WebLogic/domain/startWebLogic.sh

Note:  If you copy and paste this, you may need to make sure that characters like “ and – are correct – when I pasted into terminal I got some incorrect characters.  You may also want to adjust the memory settings to suit your machine, and you might want to consider some of the other recommended JVM settings here.

You can now log on to the WebLogic Server console at http://yourmac:7001/console

Enjoy!

Add Your Comment