Friday, February 6, 2009

Simple Weblogic Setup

Weblogic is a powerful Oracle delivered application server. Maybe you want to learn about it, or start implementing it. These instructions may or may not fit your needs and is for a simple setup, you may want to consider revising your production install of weblogic, but I promise this setup is easy!

The procedure works for both Weblogic 10 and 9.2 (maybe others). I am going to give instructions from 10 (on linux), if you are installing 9.2 you may have some small differences in the procedure, but you can figure it out.

First you gotta get the file: http://www.oracle.com/technology/products/weblogic/index.html It is a free download, you do need an account (It would appear you need a seperate account from oracles main site in order to download 9.2) Please observe the licensing policies.

Note: If you are trying to figure out which build of 9.2 to download (they are distribution specific for linux) I recommend downloading the build that most closely matches your distribitution. I was able to get a Suse built to work just fine on Ubuntu.

Keep in mind that you may or may not want to install this under a root or Administrative account. For testing purposes however, a non Admin account should work just fine.

Install
  1. Execute the binary in a terminal ./server103_linux32.bin
  2. The GUI installer will startup, click next to move to the "Choose BEA Home Directory"
  3. Make sure "Create a new BEA Home" is selected.
  4. In the BEA Home Directory field make sure you give a location you have permissions to access and write, and remember the location you choose. Click Next.
  5. For this example we are going to do a "Complete" Install. Click Next.
  6. On the "Choose Product Installation Directories" Leave everything as is and Click Next.
  7. On the "Installation Summary" Leave everything as is and Click Next.
  8. The application will install, when finished, un-check "Run Quickstart" (or not if you want to see the handy menu) and click Done.
Weblogic is installed, but we need to do an initial setup, these directions, well, I wouldn't take them to the bank, make sure you study up and know what you are doing when preparing a production server.

Configure
  1. We need to doing some configuring; execute beahome/wlserver_10.3/common/bin/config_builder (EX. sh /home/user/bea/wlserver_10.3/common/bin/config_builder.sh)
  2. Make sure "Create a Domain Template" is selected. Click Next.
  3. Browse for the installed sample domain beahome/wlserver_10.3/samples/domains/wl_server you don't need to expand the wl_server, just select it. Click Next.
  4. Give your Template a name, doesn't matter. Click Next.
  5. On the "Add or Omit Applications" screen, just Click Next.
  6. On the "Add Files" screen, just Click Next.
  7. On the "Add SQL Scripts" You can probably leave blank, or pick a Database type and version. I add Mysql. On the Type drop down select Mysql, on the Version drop down select "using com.mysql.jdbc.Driver". Click Next.
  8. Change "examplesServer" to another name... if you want. Don't change anything else. Click Next
  9. Make sure the User name and password are set to weblogic. The password looks as though it is set to weblogic, but to be safe, I would retype the password in.Click Next. (Don't worry about Configuring additional users, groups .....)
  10. On the "Specify Start Menu Entries" Screen, just Click Next.
  11. On the "Prepare Scripts and Files with Replacement Variables" screen. Click Next.
  12. On the "Review WebLogic Domain Template" screen. Click Next.
  13. On the "Create a Template" screen. Click Create.
  14. Click Done.
Start it up!
  1. From Console run sh beahome/wlserver_10.3/samples/domains/wl_server/bin/startWebLogic.sh
  2. It may take a little bit of time to start up, just wait for it. (it may or may not start a browser up depending on your system, if it fails, its fine)
  3. After it is up all the way, go here! http://localhost:7001/console login with username: weblogic password: weblogic
  4. Your Weblogic server is up and running!
  5. Want to test your app?
Installing an application to run on Weblogic (These are basic instructions, your app may need furthing configuring)
  1. Follow the Start it up! instructions first.
  2. If you have any other servers that need to be running for your app (EX. Mysql) start it now.
  3. Click "Configure Applications"
  4. Click the "Install Button"
  5. Navigate to the location of your application (be sure to read the notes on this page as they can be helpful) When you find your app, it should appear differently than the other folders/directories do, and should have a radio button next to it, select the radio button and Click Next.
  6. Select to deploy either as an application (if you know your app must deploy as a library select that, if you aren't sure select as an application) Click Next.
  7. On the next screen, leave everything as a default unless you are sure about a change that needs to be made (make sure their is a name given for the app).Click Finish.
  8. You will be taken to the Summary of Deployments page when the setup finishes.
  9. If everything went well. you should see your app name in the list, its status should be active and its health should be okay. If the status is not active. check the box next to the app name and click start. If it doesn't start and the health is not okay, their may be something wrong with you app.
  10. Everything looks good, try to hit your app at http://localhost:7001/nameofapphere
You should be good to go for testing and learning about weblogic!

let me know if you have questions by leaving a comment on this blog

I credit some of these instructions to David B.

No comments: