Wednesday, February 27, 2008

Installing BEA WebLogic on Mac OS X

WebLogic Server is not supported on Mac OS X, but you can still run WebLogic on Mac OS X and here is how. (Of course I wouldn't doing this in production, but doing this in development should be fine.)

  1. Download WebLogic Server listed in the Package Installer section. In the Select OS drop-down, choose IBM AIX. This will give you the WebLogic generic package.
  2. From the command line, run: java -Dos.name=unix -jar server922_generic.jar. Follow the wizard to complete the installation.
  3. Edit the file ~/bea/weblogic92/samples/domains/wl_server/bin/setDomainEnv.sh look for the line where the MEM_ARGS environment variable is set. Add this declaration: -XX:MaxPermSize=128m.
  4. Start WebLogic: ~/bea/weblogic92/samples/domains/wl_server/bin/startWebLogic.sh. Once the server is started you will see the following message on the console: Server started in RUNNING mode.
  5. Access your instance of WebLogic at http://localhost:7001/. You should see the WebLogic "getting started" page.
To deploy a web application (war file):
  1. Uncompress the war file in the directory where you would like the application to be deployed.
  2. Go to the WebLogic Administration Console from http://localhost:7001/console/. The default login/password is weblogic/weblogic.
  3. Click the Lock & Edit button (top left).
  4. Under Deployments select Install.
  5. Select the directory you created in #1. Two screens later, under Source accessibility, make sure you select the radio button I will make the deployment accessible from the following location. This way WebLogic won't copy your web application to its own private directory but will instead use directly the files in the directory you mentioned.
  6. Finish the deployment, save. Under Deployments, start the application.
  7. Access your application from http://localhost:7001/orbeon/, if orbeon was the name the directory you choose in step #5.
Once your application is running, you might want to monitor the following log files:
  • ~bea/weblogic92/samples/domains/wl_server/servers/examplesServer/logs/examplesServer.log - The main WebLogic log file.
  • bea/weblogic92/samples/domains/logs/orbeon.log - If the application you are deploying is Orbeon Forms, then this will be the location of the Orbeon Forms log file.
References: