- Create Swap Space
[ec2-user@hostname ~] sudo su -
[root@hostname ~] dd if=/dev/zero of=/swapfile bs=1M count=1024
[root@hostname ~] chmod 600 /swapfile
[root@hostname ~] mkswap /swapfile
[root@hostname ~] swapon /swapfile
[root@hostname ~] echo "/swapfile swap swap defaults 0 0" >> /etc/fstab
# Check swap space
[root@hostname ~] swapon --show
[root@hostname ~] free -m
- Create Oracle user and group
[root@hostname ~] /usr/sbin/groupadd oinstall
[root@hostname ~] /usr/sbin/useradd -g oinstall -G oinstall oracle
# Set password for oracle user
[root@hostname ~] passwd oracle
# Check if nobody user exists
[root@hostname ~] id nobody
# If nobody user does not exist, create it
[root@hostname ~] /usr/sbin/useradd nobody
- Create directories for Oracle software
[root@hostname ~] mkdir -p /u01/app/oracle
[root@hostname ~] chown oracle:oinstall /u01/app /u01/app/oracle
- Create the inventory pointer file
[root@hostname ~] vi /etc/oraInst.loc
inventory_loc=/u01/app/oraInventory
inst_group=oinstall
- Download Oracle WebLogic Server 14c and JDK 11
-
WebLogic Server 14c (https://download.oracle.com/otn/nt/middleware/14c/14110/fmw_14.1.1.0.0_wls_lite_Disk1_1of1.zip)
Note: Copy the downloaded files to /tmp directory
- Install required packages
[root@hostname ~] dnf install -y unzip
- Install JDK 11
[root@hostname ~] su - oracle
[oracle@hostname ~] cd /u01/app/oracle
[oracle@hostname ~] tar -xvf /tmp/jdk-11.0.13_linux-x64_bin.tar.gz
[oracle@hostname ~] vi .bash_profile #Optional
# Add the following lines to .bash_profile
export JAVA_HOME=/u01/app/oracle/jdk-11.0.13
export PATH=$JAVA_HOME/bin:$PATH
[oracle@hostname ~] source .bash_profile
[oracle@hostname ~] java -version
- Install WebLogic Server 14c
[oracle@hostname ~] cd /tmp
[oracle@hostname ~] unzip fmw_14.1.1.0.0_wls_lite_Disk1_1of1.zip
Archive: fmw_14.1.1.0.0_wls_lite_Disk1_1of1.zip
inflating: fmw_14.1.1.0.0_wls_lite_generic.jar
# Perform a silent installation of Oracle Weblogic 14c
[oracle@hostname ~] /u01/app/oracle/jdk-11.0.13/bin/java -jar /tmp/fmw_14.1.1.0.0_wls_lite_generic.jar ORACLE_BASE=/u01/app/oracle ORACLE_HOME=/u01/app/oracle/fmw JAVA_HOME=/u01/app/oracle/jdk-11.0.13 INVENTORY_LOCATION=/u01/app/oraInventory INSTALL_TYPE="Complete with Examples" -silent
#output
Launcher log file is /tmp/OraInstall2024-02-29_08-21-24AM/launcher2024-02-29_08-21-24AM.log.
Extracting the installer . . . . . Done
Checking if CPU speed is above 300 MHz. Actual 2199.990 MHz Passed
Checking swap space: must be greater than 512 MB. Actual 1023 MB Passed
Checking temp space: must be greater than 300 MB. Actual 14821 MB Passed
Preparing to launch the Oracle Universal Installer from /tmp/OraInstall2024-02-29_08-21-24AM
Log: /tmp/OraInstall2024-02-29_08-21-24AM/install2024-02-29_08-21-24AM.log
Setting ORACLE_BASE...
Setting ORACLE_HOME...
Setting JAVA_HOME...
Setting INVENTORY_LOCATION...
Setting INSTALL_TYPE...
Copyright (c) 1996, 2020, Oracle and/or its affiliates. All rights reserved.
Skipping Software Updates
Starting check : CertifiedVersions
Expected result: One of oracle-6, oracle-7, redhat-7, redhat-6, SuSE-11, SuSE-12, SuSE-15
Actual Result: redhat-9.3
Check complete. The overall result of this check is: Passed
CertifiedVersions Check: Success.
Starting check : CheckJDKVersion
Expected result: 1.8.0_191
Actual Result: 11.0.13
Check complete. The overall result of this check is: Passed
CheckJDKVersion Check: Success.
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 14.1.1 WebLogic Server and Coherence 14.1.1.0.0 completed successfully.
Logs successfully copied to /u01/app/oraInventory/logs.
- Configure Admin Server using WLST script
[oracle@hostname ~] export _JAVA_OPTIONS=-Djava.io.tmpdir=/tmp
[oracle@hostname ~] cd /u01/app/oracle/fmw/oracle_common/common/bin/
[oracle@hostname ~] export MW_HOME=/u01/app/oracle/fmw
[oracle@hostname ~] ./commEnv.sh
[oracle@hostname ~] ./wlst.sh
Picked up _JAVA_OPTIONS: -Djava.io.tmpdir=/tmp
Initializing WebLogic Scripting Tool (WLST) ...
Jython scans all the jar files it can find at first startup. Depending on the system, this process may take a few minutes to complete, and WLST may not return a prompt right away.
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
wls:/offline> readTemplate('/u01/app/oracle/fmw/wlserver/common/templates/wls/wls.jar')
WARNING: The readTemplate is deprecated. Use selectTemplate followed by loadTemplates in place of readTemplate.
wls:/offline/base_domain>cd ('Server/AdminServer')
wls:/offline/base_domain/Server/AdminServer>set('ListenAddress','<your-host-ip-address>') # Meant to be the private IP address of the EC2 instance
wls:/offline/base_domain/Server/AdminServer>set('ListenPort',7001)
wls:/offline/base_domain/Server/AdminServer>create('AdminServer','SSL')
Proxy for AdminServer: Name=AdminServer, Type=SSL
wls:/offline/base_domain/Server/AdminServer>cd('SSL/AdminServer')
wls:/offline/base_domain/Server/AdminServer/SSL/AdminServer>set('Enabled','True')
wls:/offline/base_domain/Server/AdminServer/SSL/AdminServer>set('ListenPort', 7002)
wls:/offline/base_domain/Server/AdminServer/SSL/AdminServer>cd ('/')
wls:/offline/base_domain>cd('Security/base_domain/User/weblogic')
wls:/offline/base_domain/Security/base_domain/User/weblogic>cmo.setPassword('W3bl0g!c') # Set the password for weblogic user
wls:/offline/base_domain/Security/base_domain/User/weblogic>setOption('OverwriteDomain','true')
wls:/offline/base_domain/Security/base_domain/User/weblogic>writeDomain('/u01/app/oracle/domains/Base_Domain') #Base_Domain is the name of the domain
wls:/offline/Base_Domain/Security/Base_Domain/User/weblogic>closeTemplate()
wls:/offline>exit ()
- Start the Admin Server and Node Manager
[oracle@hostname ~] cd /u01/app/oracle/domains/Base_Domain/bin
[oracle@hostname ~] ./startWebLogic.sh #enable production mode: ./startWebLogic.sh production
# Start the Admin Server in the background
# nohup ./startWebLogic.sh &
# nohup ./startWebLogic.sh > admin_server.out 2>&1 &
# Start the Node Manager
[oracle@hostname ~] ./startNodeManager.sh
# Start the Node Manager in the background
# nohup ./startNodeManager.sh &
# nohup ./startNodeManager.sh > node_manager.out 2>&1 &
Warning
If you are using the AMI remember change the IP (private) on /u01/app/oracle/domains/Base_Domain/config/config.xml
Tip
If you are using a public IP address, make sure to open the required ports in the security group.