Introduction to the WebLogic Server 12c on OSX
Learn more about how to install WebLogic 12g locally on your system.
Join the DZone community and get the full member experience.Join For Free
In order to assess the work considering automation of configuration and deployment for one of our back-end applications, I needed to install WebLogic 12g locally. So, I decided to share this with the rest of the community. Hope you enjoy this quick demonstration.
- Download and unzip the Quick Installer for Mac OSX, Windows, and Linux from the Oracle Website.
- Assure you have installed the Oracle JDK 1.8
In this article, I will install the server under
~/Opt/Oracle/WebLogic/Middleware; make sure the root directory structure exists before moving to the following step.
# Which JREs have been installed? $ /usr/libexec/java_home -V Matching Java Virtual Machines (2): 1.8.0_192, x86_64: "Amazon Corretto 8" /Library/Java/JavaVirtualMachines/amazon-corretto-8.jdk/Contents/Home 1.8.0_181, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home # Set Java home to Java SE 8... $ export JAVA_HOME=`/usr/libexec/java_home -v 1.8.0_181` # Set WebLogic home $ export MW_HOME=~/Opt/Oracle/WebLogic/Middleware
Next, kick off the installation itself:
# Kick-off the installation $ (cd $MW_HOME && java -jar /path/to/fmw_220.127.116.11.0_wls_quick.jar) Launcher log file is /private/var/folders/w_/dymv42kx2gq3xh9s6wdf4k6w0000gn/T/OraInstall2019-05-17_04-24-14PM/launcher2019-05-17_04-24-14PM.log. Extracting the installer . . . . Done Checking if CPU speed is above 300 MHz. Actual 2662.4 MHz Passed Checking swap space: must be greater than 512 MB. Actual 157713 MB Passed Checking if this platform requires a 64-bit JVM. Actual 64 Passed Checking temp space: must be greater than 300 MB. Actual 157713 MB Passed Preparing to launch the Oracle Universal Installer from /private/var/folders/w_/dymv42kx2gq3xh9s6wdf4k6w0000gn/T/OraInstall2019-05-17_04-24-14PM Log: /private/var/folders/w_/dymv42kx2gq3xh9s6wdf4k6w0000gn/T/OraInstall2019-05-17_04-24-14PM/install2019-05-17_04-24-14PM.log ***************************************************** Distribution Name : Oracle Fusion Middleware 12c WebLogic and Coherence Developer Distribution Version : 18.104.22.168.0 Oracle Inventory : /Users/robin/oraInventory Oracle Home : /Users/robin/Opt/Oracle/WebLogic/Middleware/wls12213 Java Home : /Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home Note: Oracle Home not supplied (defaulted to <present working dir>/wls12213) ***************************************************** Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved. Skipping Software Updates Validations are enabled for this session. Verifying data Copying Files Percent Complete : 10 Percent Complete : 20 Percent Complete : 30 Percent Complete : 40 Percent Complete : 50 Percent Complete : 60 Percent Complete : 70 Percent Complete : 80 Percent Complete : 90 Percent Complete : 100 The installation of Oracle Fusion Middleware 12c WebLogic and Coherence Developer 22.214.171.124.0 completed successfully. Logs successfully copied to /Users/robin/Opt/wls12213/cfgtoollogs/oui.
Some minor configuration requires to be done after installation.
# Set memory of admin server export USER_MEM_ARGS="-Xmx1024m -XX:MaxPermSize=256m" # Read the Weblogic server path settings $ . $MW_HOME/wls12213/wlserver/server/bin/setWLSenv.sh
Startup Admin Server
Start WebLogic Server for the first time and create a domain.
# Create domain dir $ cd $MW_HOME/../ $ mkdir domain # Inside the domain dir start the Admin server $ 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: admin Enter password to boot WebLogic server: P@ssw0rd For confirmation, please re-enter password required to boot WebLogic server: P@ssw0rd
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=`/usr/libexec/java_home -v 1.8.0_181` export MW_HOME=~/Opt/Oracle/WebLogic/Middleware export USER_MEM_ARGS="-Xmx1024m -XX:MaxPermSize=256m" . $MW_HOME/wls12213/wlserver/server/bin/setWLSenv.sh $MW_HOME/../domain/startWebLogic.sh
You can now log on to the WebLogic Server console at http://localhost:7001/console.
Opinions expressed by DZone contributors are their own.