Step by Step instructions to download, install Oracle WebLogic Server 11gR1 10.3.5, and create a sample domain are described in this article. Well, What is WebLogic? WebLogic Server is a powerful Application Server to run J2EE Applications. This is pretty much equivalent to Oracle 10gAS OC4J server, but WebLogic is known for its rich features and great functionality. Since Oracle has acquired BEA, there has been a strategic shift in the Application Server technologies from OC4J to Weblogic Server. Oracle has moved most of the OC4J Applications to Weblogic in Fusion Middleware releases. If you see the tag, Fusion, you can guess that it is Weblogic Application. Other than directory structures, installation procedure, here are few key differences between OC4J and WebLogic Server.
OC4J uses AJP protocol between OHS and OC4J. OHS in front of OC4J is a must (as OC4J itself does not have a HTTP listener, so it cannot answer HTTP requests). This is quite different in WebLogic, as WebLogic has got a HTTP listener, users can directly access WebLogic port from the browser. Of course, it is recommended to front end WebLogic by a web server but it is not mandatory. Web Server is mandatory for OC4J.
OC4J is completely managed by OPMN. A couple of interesting features by OPMN, such as increasing no# of JVMs (numprocs in opmn.xml) for the OC4J are available. WebLogic is not managed by OPMN. So, WebLogic always runs out of only one JVM.
OC4J runs on wide range of ports whereas WebLogic runs everything on a single port by default, i.e. 7001. Here is an example of OC4J Port ranges:
Here is a quick installation of 10.3.5 WebLogic Server. I would create a quick Domain to demonstrate the config.sh:
Download Oracle WebLogic Server: http://www.oracle.com/technetwork/middleware/ias/downloads/wls-main-097127.html
Download 64bit JDK: http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u29-download-513648.html
wls1035_generic.jar: This is a generic file that can be used on any platform. It includes WebLogic Server and Coherence but NOT JDK. In most of the 64bit WebLogic Installations, I had to use this one instead of direct executable.
wls1035_linux32.bin: Linux x86 32-bit executable. It includes WebLogic Server, Coherence, Sun SDK 1.6.0, and Oracle JRockit 1.6.0.
wls1035_linux64.bin: Linux x86 64-bit executable, it includes WebLogic Server, Coherence, and Oracle JRockit 1.6.0. If you prefer to use Sun JDK for development servers, you got to install JDK first and then run wls1035_generic.jar instead.
If it’s a executable, you can simply execute as:
But if you need to run with different JDK, run:
$JAVA_HOME/bin/java -jar wls1035_generic.jar
There is no straight 64bit JDK on HP-PA, HPIA, and Solaris64 platforms and rather it’s a Hybrid JDK. In this case:
$JAVA_HOME/bin/java -d64 -jar wls1035_generic.jar
We need to make a choice for JRockit or Sun JDK. JRockit is more meant to be for Production usage. It takes longer to start, needs more memory and runs faster during the runtime. Sun JDK starts faster, needs less memory heap, and is little slow during the run time. If you have a cap on Memory, better go with Sun JDK. I would prefer Sun JDK in non-production environments. I have already installed 64bit JDK on this Linux Server and called wls1035_generic.jar. Coherence is another new component that is supposed to speed things up using the cache. It’s an optional component.
Here are basic requirements to install the WebLogic Server.
- Processor: 1-GHz CPU
- Memory : A minimum of 1 GB RAM, although recommends 2 GB is recommended.
- Lot of temp space is required as the installer extracts first and then starts the installation.
- JDK is shipped with a few 32bit WebLogic installers but we have to manually install the JDK for 64bit.
Create a new WebLogic domain using the Configuration Wizard:
Development Mode: Weblogic User and passwords are stored in boot.properties in Development Mode. Again, I have selected SUN JDK for Development mode.
Production Mode: It does not store the user name and passwords in boot.properties by default. You can manually create boot.properties after the Domain Creation. You may want to select JRockit for Production. The user name and password will be read and encrypted by WebLogic Server during the startup.
$ cat /oracle/middleware/user_projects/domains/IDMDomain/servers/AdminServer/security/boot.properties username=weblogic password=mypassword $
This is a place to change the default Admin Server Port from 7001 to something else. If you have got multiple domains, you would need to change this port for all domains after the first domain. Unlike Oracle Installers, Configuration Wizard does not check for the Active Port. So we got to check that ourselves.
Config.sh does not start the services. Start the Admin Server manually.
Problem: WebLogic server does not start as the port is occupied by other WebLogic Server.
Solution: If you did not change the port during the installation, there is a way to change the port from Admin Console. However, this does not even start the server to go to the Console. So, we need to change $DOMAIN_NAME/config/config.xml
<server> <name>AdminServer</name> <listen-port>7002</listen-port> <listen-address></listen-address> </server>
setDomainEnv.sh sets up all the environment variables and Java options for the entire domain including AdminServer and all Managed Servers. If you need to change JVM Heap Size, setDomainEnv.sh is the right place for you.