Wednesday, 31 August 2011

Installing Weblogic Server on Your Mac

Installing Weblogic Server on an Apple Mac doesn’t come naturally. The usual technique is to download and, with a bit of fiddling about, install the generic package installer aimed at Solaris.

Oracle seemed to have improved things, however, by bringing out a Weblogic Zip distribution for development purposes that can be easily installed on Windows, Linux and Mac. You can download this from the following link: ...assuming that you already have a developer account.

The installation comes in two parts: the main Weblogic server and an optional supplemental zip file that contains samples, the Derby database and the L10N console, which means that this wls install has limited functionality. This blog covers installing the main Weblogic server component and leaves the supplemental stuff for another day.

1) After downloading the zip file (which Mac OS will automatically unzip in your ~/Downloads directory), create a Weblogic installation directory, for example: /Users/<Your Name>/Weblogic and copy the extracted wls1035_dev directory here. This will give your a Weblogic Home directory path of:


2) Next, setup JAVA_HOME and MW_HOME variables in the current shell by typeing:

    $ export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home
    $ export MW_HOME=/Users/<Your Name>/Weblogic/wls1035_dev

Note here that you do need at least version 1.6 of the JDK although it’s a good idea to download and install the latest. Also note that the version I installed was 10.3.5, though that'll change as time goes on...

3) The third step is to run the Weblogic configuration script located in your MW_HOME directory as defined above. This only needs to be run once.

   $ ./ 

4) Setup the Weblogic server environment in the current shell by entering the following commands:

$ export USER_MEM_ARGS="-Xmx1024m -XX:PermSize=256m"
    $ . $MW_HOME/wlserver/server/bin/ 

You are now ready to create a domain and this is done by running the server. The first thing here is to create a domains directory into which you can add new domains when required:

   $ mkdir /Users/<Your Name>/Weblogic/domains/
    $ cd  /Users/<Your Name>/Weblogic/domains/
    $ $JAVA_HOME/bin/java -Xmx1024m -XX:MaxPermSize=256m weblogic.Server 

In this step, you’ll be asked to create the admin user and give a password, and remember that in Weblogic 10.3 the password will need to contain at least one uppercase letter and a number, which is quite tedious.

Having created the server, close it down before following the remaining steps.

Update the script adding in Log4J support, setting up debugging and making whatever changes you feel necessary.

  Note: You can also create the domain by invoking the GUI configuration
  wizard (Run MW_HOME/wlserver/common/bin/

7. Lastly, start a browser and open up url - http://localhost:7001/console to administer your server.

You can also run existing domains with this installation. All you need to do is to edit the DOMAIN_HOME/bin/ script and change the WL_HOME to point to the new installation - ${MW_HOME}/wlserver/; however, remember that this is a limited WLS installation with various bits missing as described above, which may cause problems on start-up when you choose this route.

No comments: