
Deploy WebLogic 12c on OSX in less then 10 minutes!
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 guide.
Prerequisites
- 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
Installation
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
2
3
4
5
6
7
8
9
10
11
Next, kick off the installation itself:
# Kick-off the installation
$ (cd $MW_HOME && java -jar /path/to/fmw_12.2.1.3.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 : 12.2.1.3.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 : 100
The installation of Oracle Fusion Middleware 12c WebLogic and Coherence Developer 12.2.1.3.0 completed successfully.
Logs successfully copied to /Users/robin/Opt/wls12213/cfgtoollogs/oui.
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Configuration
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
2
3
4
5
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
2
3
4
5
6
7
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: ******
For confirmation, please re-enter password required to boot WebLogic server: ******
2
3
4
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
2
3
4
5
Console
You can now log on to the WebLogic Server console at http://localhost:7001/console.
Conclusion
Is should not take more then 10 minutes to have WebLogic running on your Mac… enjoy your J2EE application development!