Ow
Application Servers AWS

Oracle WebLogic Server 15.1.1 on Oracle Linux 9 on AWS User Guide

| Product: Oracle WebLogic Server 15.1.1 on Oracle Linux 9 on AWS

Overview

This guide covers launching and using the Oracle WebLogic Server 15.1.1 on Oracle Linux 9 AMI from cloudimg on Amazon EC2. It is sold on AWS Marketplace as the listing Oracle WebLogic Server 15c | cloudimg, which sells one product, Oracle WebLogic Server 15c (release 15.1.1.0.0) on Oracle Linux 9.

Oracle WebLogic Server is Oracle's Jakarta EE application server: it runs enterprise Java applications, web services and messaging workloads with clustering, JDBC connection pools, JMS and a full security realm. Release 15.1.1.0.0 is a full Jakarta EE 9.1 platform (the jakarta.* namespace: applications built for the javax.* namespace must be migrated), supports Java SE 17 and 21, and is administered with the WebLogic Remote Console (the in-server Administration Console is no longer part of WebLogic Server).

The cloudimg image adds:

  • A domain made on your instance, not on ours. The image contains the WebLogic Server installation only. On the first boot of every instance, a one-time service creates base_domain from Oracle's own domain template with an administrator password generated on that instance. The domain's encryption salt (SerializedSystemIni.dat), its embedded LDAP store and its boot identity are therefore unique to your instance, and no two instances share a credential. The password never appears on a command line or in a log; it is written to /root/weblogic-credentials.txt (readable by root only).
  • Fail closed. WebLogic and the HTTPS front end refuse to start until first boot has finished. If first boot ever fails, the partial domain is removed and nothing listens.
  • The AdminServer on loopback, behind HTTPS. The AdminServer listens on 127.0.0.1:7001 only. nginx 1.26 serves it on the instance over HTTPS with a certificate generated on your instance; port 80 redirects to HTTPS. Requests for a host name the instance does not serve get no answer, and WebLogic's internal servlets are not published.
  • Administration through an SSH tunnel. The security group the listing suggests opens SSH only. You reach the welcome page, WebLogic Remote Console and the REST management API through an SSH tunnel to the instance (Step 5), so no WebLogic sign-in is exposed to the internet.
  • Locked-down defaults. SSH by key only (no passwords, no root login, no X11 forwarding); root has no password at all. Production mode, IIOP off, anonymous T3/IIOP RMI off and WebLogic's default internal servlets (HTTP tunnelling) off; WebLogic takes the client address from the connection, never from a header a client can forge; nginx limits the request rate on /management/. WebLogic and nginx are blocked from the instance metadata service and the AMI requires IMDSv2. SELinux stays enforcing, the oracle account has no password, and the server runs under a locked down systemd unit. The Derby demo database is never started.
  • Base media only. WebLogic Server is installed from Oracle's 15.1.1.0.0 release media (verified by its SHA-256 checksum and by Oracle's code signature on the installer) with no PSU or other Oracle patch applied: you apply Oracle's patches under your own Oracle agreement (see Step 11).
  • A Java runtime that dnf keeps patched. WebLogic runs on Oracle Linux's own OpenJDK 21 (the java-21-openjdk-headless package from the Oracle Linux 9 AppStream), reached through the alternatives path /usr/lib/jvm/jre-21-openjdk, so OpenJDK security updates install with dnf like any other package and need no WebLogic configuration change. No Oracle JDK is included (see Licensing).
  • Fully patched Oracle Linux 9 at build time, with dnf-automatic applying Oracle Linux security updates (OpenJDK included) every day.

What is on the image: Oracle WebLogic Server 15.1.1.0.0 (WebLogic Server and Coherence) in /u01/app/oracle/product, Oracle Linux OpenJDK 21 (java-21-openjdk-headless, JAVA_HOME /usr/lib/jvm/jre-21-openjdk), nginx, Oracle Linux 9 with the Unbreakable Enterprise Kernel, cloud-init and the AWS Systems Manager agent.

Build facts: Oracle Linux 9.9, kernel 6.12.0-208.112.5.2.el9uek.x86_64, 384 packages with no update pending at capture, OpenJDK java-21-openjdk-headless-21.0.12.1.1-2.1.0.1.el9.x86_64.

Default user: ec2-user · Architecture: x86_64 · Recommended instance type: m5.large

Licensing

Bring your own licence. Oracle WebLogic Server is a commercial Oracle product. Using WebLogic Server requires your own Oracle WebLogic Server licence covering the instance under Oracle's cloud licensing policy; no Oracle licence is included.

Pricing: the cloudimg software charge depends on the instance size, plus AWS infrastructure charges: $0.04 an hour on micro, small and medium types (for example t3.medium), $0.08 an hour on large types (for example the recommended m5.large), $0.12 an hour on xlarge types and $0.24 an hour on 2xlarge and larger types, metal included; nano types carry no software charge. The listing also offers an annual subscription per instance type, at $245, $490, $735 and $1,470 a year for the same four sizes. The charge is for what cloudimg adds to Oracle's base media: the domain created on each instance at first boot with its own administrator password and encryption salt, the per-instance TLS certificate, the AdminServer on the loopback address behind nginx HTTPS, SSH by key pair only, WebLogic and nginx blocked from the instance metadata service, and OpenJDK 21 kept patched through dnf; it does not include an Oracle licence.

The Java runtime is Oracle Linux's OpenJDK 21, open source (GPLv2 with the Classpath Exception) and patched through dnf; the image includes no Oracle JDK. Oracle's WebLogic Server certification names Oracle JDK (17 and 21 for 15.1.1.0.0), so if your Oracle agreement requires it, install Oracle JDK under your own Oracle entitlement and point WebLogic at it (Step 11 shows how). The notices are in /usr/share/doc/cloudimg/licenses/ and the OpenJDK licence in /usr/lib/jvm/jre-21-openjdk/legal/java.base/.

Prerequisites

  • An AWS account subscribed to the listing, an EC2 key pair and a VPC subnet with a route to the internet (or a private route you use for management).
  • A security group that allows TCP 22 (SSH) from your own IP address only. The security group the listing suggests opens TCP 22 to 0.0.0.0/0: keep that rule and change its source to your own IP (or your administration network). No other port is needed: the welcome page, WebLogic Remote Console and the REST management API are reached through an SSH tunnel, and port 7001 is never needed in the security group.

Step 1: Launch the instance

Open the listing Oracle WebLogic Server 15c | cloudimg on AWS Marketplace, choose View purchase options and Subscribe. When the subscription is active choose Launch your software, then choose the software version whose title starts Oracle WebLogic Server 15.1.1 on Oracle Linux 9 - and your Region. The version list may also show older versions this listing carried before (WebLogic Server 15c and 14c images with other titles); they are not this image. Choose m5.large (or larger for production application workloads), your key pair and a security group as above. The root volume holds the WebLogic installation, your domain and its logs; give it room for your applications (for example 30 GiB). The root file system grows to fill the volume on first boot.

With the AWS CLI (replace the values in angle brackets):

aws ec2 run-instances --region <region> --image-id <ami-id-from-the-listing> \
  --instance-type m5.large --key-name <your-key-pair> \
  --security-group-ids <your-security-group> --subnet-id <your-subnet> \
  --metadata-options HttpTokens=required,HttpEndpoint=enabled \
  --block-device-mappings 'DeviceName=/dev/sda1,Ebs={VolumeSize=30,VolumeType=gp3}' \
  --tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=weblogic}]'

Step 2: Connect to your instance

Version SSH user
Oracle WebLogic Server 15.1.1 on Oracle Linux 9 ec2-user
ssh -i <your-key.pem> ec2-user@<public-ip>

Confirm the operating system release:

cat /etc/oracle-release
Oracle Linux Server release 9.9

Step 3: Check the services

On a newly launched instance, first boot creates the domain in about two minutes (the instance is still loading its disk from the AMI snapshot, which makes the first Java start slow), then the AdminServer reaches RUNNING about 17 seconds later: WebLogic is ready about three minutes after launch (measured on the kept build on nine fresh 2 vCPU, 8 GiB instances: 2 min 26 s to 3 min 43 s from boot to RUNNING). Until then nginx is not started and port 443 refuses connections. Check the three units:

sudo systemctl is-active weblogic-firstboot.service weblogic.service nginx.service
active
active
active

weblogic-firstboot.service reports active because it is a one-time unit that has finished; on later boots it sees its marker and does nothing. The first boot log shows the host name the instance was configured for and how long the domain took (this example comes from a newly launched instance; on a warm disk the domain takes about 40 seconds):

sudo cat /var/log/weblogic-firstboot.log
[2026-10-20T22:55:12Z] weblogic-firstboot: configured host: ec2-35-175-233-6.compute-1.amazonaws.com
[2026-10-20T22:55:12Z] weblogic-firstboot: creating base_domain (WLST offline from Oracle's wls.jar template)
[2026-10-20T22:57:16Z] weblogic-firstboot: TLS certificate + nginx host for ec2-35-175-233-6.compute-1.amazonaws.com
[2026-10-20T22:57:17Z] weblogic-firstboot: done in 125s; starting WebLogic and nginx

If weblogic.service shows activating, wait a few seconds and run the command again.

Step 4: Get your password

The values generated for this instance are in a root-only file. This shows the file with the password hidden:

sudo sed -E 's/^(WEBLOGIC_PASSWORD=).*/\1<hidden>/' /root/weblogic-credentials.txt
# Oracle WebLogic Server 15.1.1.0.0 - this instance's own credentials (generated on its first boot)
# Generated: 2026-10-20T22:57:17Z
WEBLOGIC_USER=weblogic
WEBLOGIC_PASSWORD=<hidden>
WEBLOGIC_ADMIN_URL=https://ec2-35-175-233-6.compute-1.amazonaws.com/
WEBLOGIC_REST_URL=https://ec2-35-175-233-6.compute-1.amazonaws.com/management/weblogic/latest
WEBLOGIC_WELCOME_URL=https://ec2-35-175-233-6.compute-1.amazonaws.com/console/welcome/
DOMAIN_HOME=/u01/app/oracle/product/user_projects/domains/base_domain
TLS_CERT_SHA256_FINGERPRINT=BC:CB:32:30:71:0E:5B:21:A7:B9:7A:7E:CF:58:E8:3D:70:3A:B6:CA:E6:AD:66:6A:98:6C:D1:D9:A4:10:82:68

Print the password itself when you need it (and store it in your secret manager):

sudo sed -n 's/^WEBLOGIC_PASSWORD=//p' /root/weblogic-credentials.txt

The URLs in the file use the instance's configured host name (its public DNS name, or its public or private address when it has no public name). With the security group open to SSH only, those URLs do not answer from your workstation: use the SSH tunnel in Step 5. To serve WebLogic on your own DNS name, see Step 9.

Step 5: Open WebLogic over HTTPS through an SSH tunnel

The certificate is self-signed and generated on your instance. Check it, and note its SHA-256 fingerprint (TLS_CERT_SHA256_FINGERPRINT above) to compare before you trust it in a browser or in Remote Console:

sudo openssl x509 -in /etc/nginx/ssl/weblogic.crt -noout -subject -enddate -ext subjectAltName
subject=CN=ec2-35-175-233-6.compute-1.amazonaws.com
notAfter=Jan 22 22:57:17 2029 GMT
X509v3 Subject Alternative Name: 
    DNS:ec2-35-175-233-6.compute-1.amazonaws.com, IP Address:35.175.233.6, DNS:ip-172-31-95-72.ec2.internal, IP Address:172.31.95.72, DNS:localhost, IP Address:127.0.0.1

The certificate names localhost and 127.0.0.1, and nginx serves those names, so a tunnel to the instance's own port 443 works with no change. From the instance, the welcome page answers over HTTPS with that certificate, and port 80 redirects to HTTPS:

H=$(sudo cat /etc/cloudimg/weblogic-host)
curl -s -o /dev/null -w "%{http_code}\n" --cacert <(sudo cat /etc/nginx/ssl/weblogic.crt) --resolve "$H:443:127.0.0.1" "https://$H/console/welcome/"
curl -s -o /dev/null -w "%{http_code} %{redirect_url}\n" --resolve "$H:80:127.0.0.1" "http://$H/"
200
301 https://ec2-35-175-233-6.compute-1.amazonaws.com/

The certificate file is readable only by root and nginx, so these commands hand it to curl with sudo cat (it is a public certificate, not a secret).

From your workstation, open an SSH tunnel that forwards local port 8443 to the instance's HTTPS port, and leave it running while you work:

ssh -L 8443:127.0.0.1:443 -N -i <your-key.pem> ec2-user@<public-ip>
# in a second terminal on your workstation:
curl -sk -o /dev/null -w "%{http_code}\n" https://localhost:8443/console/welcome/
200

Then open https://localhost:8443/console/welcome/ in your browser (accept the self-signed certificate after checking its fingerprint). WebLogic Server 15.1.1 serves this welcome page: the original Administration Console is no longer part of WebLogic Server, and the page links to the WebLogic Remote Console download and mentions the Hosted WebLogic Remote Console (see Step 6):

The WebLogic Server 15.1.1 welcome page served over HTTPS, explaining that administration uses the WebLogic Remote Console, with a Download WebLogic Remote Console button

WebLogic writes the redirects it sends with its configured host name (the one in WEBLOGIC_ADMIN_URL) on port 443. Through the tunnel, open full paths such as the ones in this guide; if your browser is sent to the instance's public name, replace that part of the address with localhost:8443.

Step 6: Administer the domain with WebLogic Remote Console

Desktop Remote Console. Install WebLogic Remote Console on your workstation from the welcome page link. With the tunnel from Step 5 running, add an Admin Server Connection with:

  • URL: https://localhost:8443/
  • Username: weblogic
  • Password: the password from Step 4

Remote Console talks to the AdminServer's REST management API through the tunnel. Because the certificate is self-signed, either import /etc/nginx/ssl/weblogic.crt into Remote Console's trust store or tick Make Insecure Connection after you have compared the fingerprint. Remote Console covers deployments, data sources, JMS, security realms, users and groups, and monitoring.

Hosted Remote Console in your browser (optional). WebLogic Server 15.1.1 also ships the Remote Console as a web application (wlserver/server/lib/wls-remote-console.war, Remote Console 2.4.18) that you can deploy on the AdminServer and use from a browser, with no desktop install. It is not deployed in the image, so nothing extra is exposed until you choose to. Deploy it with WLST as the oracle user (the password is handed over in a file readable only by oracle, as in Step 8; this takes about 30 seconds):

PWF=$(sudo mktemp /run/wlst-pw.XXXXXX)
sudo sed -n 's/^WEBLOGIC_PASSWORD=//p' /root/weblogic-credentials.txt | sudo tee "$PWF" >/dev/null
sudo chown oracle:oinstall "$PWF"
cat > /tmp/wlst-rconsole.py <<'PY'
import os
f = open(os.environ['PWF']); pw = f.read().strip(); f.close()
connect('weblogic', pw, 't3://127.0.0.1:7001')
deploy('wls-remote-console', '/u01/app/oracle/product/wlserver/server/lib/wls-remote-console.war', targets='AdminServer', upload='false')
print('Deployed: ' + str(cmo.lookupAppDeployment('wls-remote-console').getName()))
disconnect()
PY
chmod 0644 /tmp/wlst-rconsole.py
sudo setpriv --reuid=oracle --regid=oinstall --init-groups env HOME=/home/oracle PWF="$PWF" \
  /u01/app/oracle/product/oracle_common/common/bin/wlst.sh /tmp/wlst-rconsole.py 2>&1 | grep -E 'Deployment State|Deployed:'
sudo rm -f "$PWF" /tmp/wlst-rconsole.py
H=$(sudo cat /etc/cloudimg/weblogic-host)
curl -s -o /dev/null -w "%{http_code} %{redirect_url}\n" --cacert <(sudo cat /etc/nginx/ssl/weblogic.crt) --resolve "$H:443:127.0.0.1" "https://$H/rconsole/"
Deployment State : completed
Deployed: wls-remote-console
302 https://ec2-35-175-233-6.compute-1.amazonaws.com/rconsole/signin/index.html

With the tunnel running, open https://localhost:8443/rconsole/signin/index.html and sign in as weblogic with the password from Step 4:

The Hosted WebLogic Remote Console sign-in page of WebLogic Server 15.1.1, served by the instance over HTTPS

Choose This Server under Providers, then a tree: Edit Tree to change the configuration, Monitoring Tree for runtime state, Security Data Tree for users, groups and policies:

The Hosted WebLogic Remote Console 2.4.18 Monitoring Tree showing the AdminServer of base_domain in the Running state

The red Security warnings detected banner is WebLogic's own configuration check; on this image it lists two items that follow from the design (HTTPS is terminated by nginx and the AdminServer has no SSL listener), explained in Step 12. The hosted console signs you out after 10 minutes of inactivity. Use it through the tunnel only, and remove it when you no longer need it with WLST undeploy('wls-remote-console').

Step 7: Use the REST management API

The REST management API uses the same administrator credentials. This reads the password from the credentials file and hands it to curl in a configuration stream, so it never appears on a command line:

H=$(sudo cat /etc/cloudimg/weblogic-host)
PW=$(sudo sed -n 's/^WEBLOGIC_PASSWORD=//p' /root/weblogic-credentials.txt)
curl -s --cacert <(sudo cat /etc/nginx/ssl/weblogic.crt) --resolve "$H:443:127.0.0.1" -K <(printf 'user = "weblogic:%s"\n' "$PW") \
  "https://$H/management/weblogic/latest/serverRuntime?links=none&fields=name,state,weblogicVersion"
unset PW
{
    "weblogicVersion": "WebLogic Server 15.1.1.0.0  Wed Oct 01 23:34:34 GMT 2025 2196592",
    "state": "RUNNING",
    "name": "AdminServer"
}

The domain itself:

H=$(sudo cat /etc/cloudimg/weblogic-host)
PW=$(sudo sed -n 's/^WEBLOGIC_PASSWORD=//p' /root/weblogic-credentials.txt)
curl -s --cacert <(sudo cat /etc/nginx/ssl/weblogic.crt) --resolve "$H:443:127.0.0.1" -K <(printf 'user = "weblogic:%s"\n' "$PW") \
  "https://$H/management/weblogic/latest/domainConfig?links=none&fields=name,domainVersion,productionModeEnabled"
unset PW
{
    "productionModeEnabled": true,
    "domainVersion": "15.1.1.0.0",
    "name": "base_domain"
}

From your workstation, the same requests go through the tunnel to https://localhost:8443/management/weblogic/latest/...; in a browser signed in as weblogic the server runtime looks like this:

The REST management API in a browser showing the AdminServer RUNNING on WebLogic Server 15.1.1.0.0

A request without credentials is refused (401), and the instance carries a self-test that proves the password, the anonymous refusal and a wrong-password refusal in one go:

H=$(sudo cat /etc/cloudimg/weblogic-host)
curl -s -o /dev/null -w "%{http_code}\n" --cacert <(sudo cat /etc/nginx/ssl/weblogic.crt) --resolve "$H:443:127.0.0.1" "https://$H/management/weblogic/latest/serverRuntime"
sudo /usr/local/sbin/weblogic-selftest
401
per-instance admin password: AdminServer RUNNING over https://ec2-35-175-233-6.compute-1.amazonaws.com/ (instance certificate verified); anonymous HTTP 401; wrong password HTTP 401
WLS_ROUNDTRIP_OK

State-changing REST requests also need the X-Requested-By header (WebLogic's own protection against cross-site requests).

Step 8: Script administration with WLST

The WebLogic Scripting Tool (WLST) runs as the oracle user and connects to the AdminServer over T3 on the loopback address. This example hands the password to WLST in a file readable only by oracle (never on a command line or in an environment variable), prints the domain and server state, and removes the file:

PWF=$(sudo mktemp /run/wlst-pw.XXXXXX)
sudo sed -n 's/^WEBLOGIC_PASSWORD=//p' /root/weblogic-credentials.txt | sudo tee "$PWF" >/dev/null
sudo chown oracle:oinstall "$PWF"
cat > /tmp/wlst-check.py <<'PY'
import os
f = open(os.environ['PWF']); pw = f.read().strip(); f.close()
connect('weblogic', pw, 't3://127.0.0.1:7001')
print('Connected to domain: ' + cmo.getName())
serverRuntime()
print('AdminServer state: ' + cmo.getState())
disconnect()
PY
chmod 0644 /tmp/wlst-check.py
sudo setpriv --reuid=oracle --regid=oinstall --init-groups env HOME=/home/oracle PWF="$PWF" \
  /u01/app/oracle/product/oracle_common/common/bin/wlst.sh /tmp/wlst-check.py 2>&1 | grep -E 'Connected to domain|AdminServer state'
sudo rm -f "$PWF" /tmp/wlst-check.py
Connected to domain: base_domain
AdminServer state: RUNNING

For an interactive session run sudo -u oracle /u01/app/oracle/product/oracle_common/common/bin/wlst.sh, then connect('weblogic', '<password>', 't3://127.0.0.1:7001'), edit(), startEdit(), your changes, save() and activate().

Step 9: Your own DNS name and certificate

Point your DNS name at the instance, then run (replace the name):

sudo weblogic-set-host weblogic.example.com

This generates a new self-signed certificate for the name (the instance's own names, localhost and 127.0.0.1 stay in it, so the tunnel keeps working), adds it to nginx, sets it as WebLogic's front-end host, updates the URLs in /root/weblogic-credentials.txt and restarts the AdminServer (about a minute). To use a certificate from your own certificate authority instead, replace /etc/nginx/ssl/weblogic.crt and /etc/nginx/ssl/weblogic.key (key owned by root:nginx, mode 0640) after running the command, then sudo systemctl reload nginx.

Step 10: Change the administrator password

To replace the generated password with one of your own, reset it online with WLST (as in Step 8, reading the current password from a file), then write the new password into boot.properties so the AdminServer can still start unattended (WebLogic encrypts the file on its next start), update the credentials file and restart:

sudo -u oracle /u01/app/oracle/product/oracle_common/common/bin/wlst.sh
connect('weblogic', '<current-password>', 't3://127.0.0.1:7001')
cd('/SecurityConfiguration/base_domain/Realms/myrealm/AuthenticationProviders/DefaultAuthenticator')
cmo.resetUserPassword('weblogic', '<new-password>')
disconnect()
exit()

sudo -u oracle sh -c 'umask 077; cat > /u01/app/oracle/product/user_projects/domains/base_domain/servers/AdminServer/security/boot.properties'
username=weblogic
password=<new-password>
(press Ctrl-D)

sudo sed -i 's/^WEBLOGIC_PASSWORD=.*/WEBLOGIC_PASSWORD=<new-password>/' /root/weblogic-credentials.txt
sudo systemctl restart weblogic.service

Typing the password into the interactive WLST prompt and cat keeps it off the command line history of other users. WebLogic locks an account for 30 minutes after five wrong passwords in a row.

Step 11: Apply Oracle patches and Java updates

This image is built from Oracle's WebLogic Server 15.1.1.0.0 base release with no Patch Set Update (PSU) or other Oracle patch applied, because Oracle distributes WebLogic patches through My Oracle Support to licensed customers. Apply the current WebLogic PSU and security patches under your own Oracle agreement, following Oracle's patching documentation for Oracle Fusion Middleware (Patching with OPatch) and the quarterly Oracle Critical Patch Update advisories. Stop the AdminServer first (sudo systemctl stop weblogic.service), apply the patch as the oracle user, then start it again.

Java updates come from Oracle Linux. WebLogic runs on Oracle Linux's OpenJDK 21 through the alternatives path /usr/lib/jvm/jre-21-openjdk, which points at the installed java-21-openjdk-headless package. dnf-automatic installs its security updates with the other Oracle Linux errata every day, or update by hand with sudo dnf -y update java-21-openjdk-headless. Nothing in WebLogic names the versioned JDK directory, so no WebLogic file changes; restart the AdminServer so it runs on the new JDK:

sudo systemctl restart weblogic.service

Oracle Linux packages, including nginx, are updated the same way (dnf-automatic daily, or sudo dnf -y update).

Check the installed versions, and the JDK the running AdminServer uses:

sudo setpriv --reuid=oracle --regid=oinstall --init-groups /usr/lib/jvm/jre-21-openjdk/bin/java -cp /u01/app/oracle/product/wlserver/server/lib/weblogic.jar weblogic.version | grep 'WebLogic Server'
rpm -q java-21-openjdk-headless
readlink -f /usr/lib/jvm/jre-21-openjdk
sudo /usr/local/sbin/weblogic-selftest | grep 'AdminServer JVM'
WebLogic Server 15.1.1.0.0  Wed Oct 01 23:34:34 GMT 2025 2196592
java-21-openjdk-headless-21.0.12.1.1-2.1.0.1.el9.x86_64
/usr/lib/jvm/java-21-openjdk-21.0.12.1.1-2.1.0.1.el9.x86_64
AdminServer JVM: java.home=/usr/lib/jvm/java-21-openjdk-21.0.12.1.1-2.1.0.1.el9.x86_64 (java-21-openjdk-headless-21.0.12.1.1-2.1.0.1.el9.x86_64) java.vendor=Red Hat, Inc. java.vm.name=OpenJDK 64-Bit Server VM java.runtime.version=21.0.12.1+1-LTS; JAVA_HOME=/usr/lib/jvm/jre-21-openjdk (alternatives)

The version numbers move on as Oracle Linux publishes OpenJDK updates. (java.vendor reads "Red Hat, Inc." because Oracle Linux rebuilds the same OpenJDK sources; the package itself is Oracle Linux's, vendor Oracle America.)

Running WebLogic on Oracle JDK instead. Oracle's WebLogic Server 15.1.1 certification names Oracle JDK 17 and 21. If your Oracle agreement requires a certified JDK, install Oracle JDK yourself under your own Oracle entitlement; cloudimg does not supply it:

  1. Sign in to Oracle with your account and download the Oracle JDK 21 RPM for Linux x64 (jdk-21_linux-x64_bin.rpm) under the terms your Oracle licence gives you, then copy it to the instance.
  2. Install it and find its directory:

bash sudo dnf -y install ./jdk-21_linux-x64_bin.rpm ORACLE_JDK=$(dirname "$(dirname "$(rpm -ql jdk-21 | grep '/bin/java$' | head -1)")"); echo "${ORACLE_JDK}"

  1. Point every place WebLogic reads JAVA_HOME at it (the systemd unit, the Oracle home, the domain scripts, the oracle user's profile and the cloudimg tools), then restart:

bash sudo grep -rlF /usr/lib/jvm/jre-21-openjdk /etc/systemd/system/weblogic.service /u01/app/oracle/product/oui \ /u01/app/oracle/product/user_projects/domains/base_domain/bin /home/oracle/.bash_profile \ /usr/local/lib/cloudimg/weblogic/common.sh | sudo xargs sed -i "s|/usr/lib/jvm/jre-21-openjdk|${ORACLE_JDK}|g" sudo systemctl daemon-reload sudo systemctl restart weblogic.service sudo /usr/local/sbin/weblogic-selftest | tail -2

weblogic-selftest first proves the login path as usual, then stops at its last check with a FAIL: AdminServer JVM ... line, because that check expects Oracle Linux's OpenJDK: the line shows the java.home and VM name of the Oracle JDK the AdminServer now runs on. From then on you update Oracle JDK under your Oracle entitlement; to go back, run the same sed with the two paths swapped.

Step 12: Check the security model

On the instance, SSH, HTTP (nginx) and HTTPS (nginx) listen on the network and the AdminServer listens on the loopback address only; the security group decides who can reach them, and the one the listing suggests lets in SSH only:

sudo ss -tlnH | awk '{print $4}' | sort -u
0.0.0.0:22
0.0.0.0:443
0.0.0.0:80
[::]:22
[::]:443
[::]:80
[::ffff:127.0.0.1]:7001

SSH accepts key logins only: password and keyboard-interactive logins, root logins and X11 forwarding are off. The settings live in /etc/ssh/sshd_config.d/00-cloudimg.conf, which sshd reads before any other file (sshd keeps the first value it reads), and sshd -T shows the values sshd actually uses:

sudo sshd -T | grep -E '^(passwordauthentication|kbdinteractiveauthentication|permitrootlogin|x11forwarding|pubkeyauthentication) '
permitrootlogin no
pubkeyauthentication yes
passwordauthentication no
kbdinteractiveauthentication no
x11forwarding no

A request for a host name the instance does not serve gets no answer (000 in curl):

curl -sk -o /dev/null -w "%{http_code}\n" -H "Host: attacker.example" https://127.0.0.1/ || echo "no answer, as intended"
000
no answer, as intended

Every process of the WebLogic and nginx services (the AdminServer, every application you deploy, the nginx master and workers) is blocked from the instance metadata service, while the rest of the instance can still use it (first boot uses it to find the host name). On Oracle Linux 9 this is enforced by systemd: both units carry IPAddressDeny= for the metadata addresses, which the kernel applies to everything in the unit's control group whatever user it runs as:

sudo systemctl show -p IPAddressDeny weblogic.service nginx.service
IPAddressDeny=168.63.129.16/32 fd00:ec2::254/128 169.254.169.254/32

IPAddressDeny=168.63.129.16/32 fd00:ec2::254/128 169.254.169.254/32

(systemd may list the three addresses in a different order.)

To see it, run a request from inside each service's control group and one from your own session (000 means no answer):

for u in weblogic nginx; do
  CG=$(systemctl show -p ControlGroup --value $u.service)
  sudo bash -c "echo \$\$ > /sys/fs/cgroup$CG/cgroup.procs && exec curl -s -m 5 -o /dev/null -w 'inside $u.service: %{http_code}\n' -X PUT -H 'X-aws-ec2-metadata-token-ttl-seconds: 60' http://169.254.169.254/latest/api/token"
done
sudo curl -s -m 5 -o /dev/null -w "outside the units: %{http_code}\n" -X PUT -H "X-aws-ec2-metadata-token-ttl-seconds: 60" http://169.254.169.254/latest/api/token
inside weblogic.service: 000
inside nginx.service: 000
outside the units: 200

If an application you deploy needs AWS credentials, give it its own credentials (for example AWS Secrets Manager or environment-specific access keys) rather than the instance role, or knowingly override the setting with sudo systemctl edit weblogic.service (an empty IPAddressDeny= line clears it). SELinux is enforcing:

getenforce
Enforcing

WebLogic's own security check is shown by Remote Console as a banner at the top of every page and is also available from the REST API. On this image the domain is created with WebLogic's default internal servlets disabled (DefaultInternalServletsDisabled, which turns off T3/IIOP tunnelling over HTTP and clears warning 091031), and nginx answers 404 for WebLogic's internal paths (/bea_wls_internal/, /bea_wls_deployment_internal/, /_async/, /wls-wsat/ and others). The report is computed on demand, so refresh it first, then read it:

H=$(sudo cat /etc/cloudimg/weblogic-host)
PW=$(sudo sed -n 's/^WEBLOGIC_PASSWORD=//p' /root/weblogic-credentials.txt)
curl -s -o /dev/null -w "refresh: %{http_code}\n" --cacert <(sudo cat /etc/nginx/ssl/weblogic.crt) --resolve "$H:443:127.0.0.1" -K <(printf 'user = "weblogic:%s"\n' "$PW") \
  -H "X-Requested-By: cloudimg" -H "Content-Type: application/json" -d '{}' -X POST \
  "https://$H/management/weblogic/latest/domainRuntime/domainSecurityRuntime/refreshCache"
curl -s --cacert <(sudo cat /etc/nginx/ssl/weblogic.crt) --resolve "$H:443:127.0.0.1" -K <(printf 'user = "weblogic:%s"\n' "$PW") \
  "https://$H/management/weblogic/latest/domainRuntime/domainSecurityRuntime?links=none&fields=securityValidationWarnings" | grep -E '"id"'
unset PW
refresh: 200
            "id": "091033"
            "id": "091032"

Two items remain, and both follow from the design:

  • 091033, no dedicated HTTPS network channel. HTTPS is terminated by nginx on port 443 and the AdminServer listens on 127.0.0.1:7001 only, so no WebLogic network channel is reachable from the network at all.
  • 091032, demo identity and trust keystores. The AdminServer has no SSL listener of its own, so these keystores are not used to serve traffic. WebLogic 15.1.1 generates them, with the rest of the domain, on your instance's first boot, so they are unique to your instance rather than a shared demo key. If you enable SSL on a WebLogic network channel, configure your own identity and trust keystores first (KeyStores = CustomIdentityAndJavaStandardTrust or CustomIdentityAndCustomTrust), which also clears this item.

Managing the WebLogic services

The AdminServer and nginx are ordinary systemd services:

sudo systemctl status weblogic.service --no-pager --lines=0 | head -4
● weblogic.service - Oracle WebLogic Server 15.1.1.0.0 AdminServer (base_domain, loopback 127.0.0.1:7001)
     Loaded: loaded (/etc/systemd/system/weblogic.service; enabled; preset: disabled)
    Drop-In: /etc/systemd/system/weblogic.service.d
             └─50-cloudimg-imds-deny.conf

Use sudo systemctl restart weblogic.service, stop or start as needed; the AdminServer is back in RUNNING about 30 seconds after a start. The server log is servers/AdminServer/logs/AdminServer.log under the domain, and the HTTP access log (with the real client address) is servers/AdminServer/logs/access.log. The AdminServer's Java heap is set in the unit (USER_MEM_ARGS=-Xms512m -Xmx2g); raise it with sudo systemctl edit weblogic.service for larger instance types.

NodeManager is not configured in this single-server domain. If you add managed servers on this host, configure NodeManager to listen on 127.0.0.1 with its own credential, and keep port 5556 out of the security group.

Filesystem layout

Path Purpose
/usr/lib/jvm/jre-21-openjdk Oracle Linux OpenJDK 21 (JAVA_HOME; alternatives link to the installed java-21-openjdk-headless)
/u01/app/oracle/product Oracle home (MW_HOME)
/u01/app/oracle/product/wlserver WebLogic Server (WL_HOME)
/u01/app/oracle/product/user_projects/domains/base_domain Your domain (DOMAIN_HOME), created on first boot
/u01/app/oraInventory Oracle inventory
/root/weblogic-credentials.txt This instance's credentials (root only)
/etc/nginx/ssl/weblogic.crt, weblogic.key This instance's TLS certificate and key
/etc/nginx/conf.d/weblogic-host.conf nginx site for the configured host (written by first boot and weblogic-set-host)
/usr/local/sbin/weblogic-set-host, weblogic-selftest Change the host name; prove the login path
/var/log/weblogic-firstboot.log First boot log
/usr/share/doc/cloudimg/licenses/ Oracle and Java notices

The oracle user's ~/.bash_profile exports JAVA_HOME, MW_HOME, ORACLE_HOME, WL_HOME and DOMAIN_HOME.

Troubleshooting

The AdminServer does not start. Check the unit and the server log:

sudo journalctl -u weblogic.service -n 20 --no-pager

weblogic.service and nginx.service only start after first boot has created /var/lib/cloudimg/weblogic-firstboot.done and the domain. If that file is missing, read /var/log/weblogic-firstboot.log.

The browser shows 502 Bad Gateway, or the tunnel's port refuses the connection. First boot or the AdminServer is still starting (about three minutes after launch); wait a minute and reload.

No answer at all on localhost:8443. Check that the SSH tunnel from Step 5 is still running and that the security group allows your address on port 22. Use localhost (or 127.0.0.1) as the host name in the address: nginx answers only the host names the instance serves.

Security recommendations

  • Keep the security group to TCP 22 from your own IP and administer WebLogic through the SSH tunnel.
  • If you open port 443 for your own applications, open it only to the addresses that use them. nginx serves the welcome page and the REST management API on the same port, so whoever can reach 443 also reaches the WebLogic sign-in: keep that list to your own networks, and keep administering through the tunnel.
  • Replace the self-signed certificate with one from your certificate authority for production (Step 9).
  • Create separate users and groups in the security realm for operators and deployers instead of sharing the weblogic account.
  • Apply Oracle's WebLogic PSUs and Critical Patch Updates under your Oracle agreement (Step 11).

Support

For help with this image, contact cloudimg:

Oracle WebLogic Server documentation is at docs.oracle.com. Oracle software support, Oracle patches and Oracle licences come from Oracle under your own agreement.

Licensing and price

This image is bring your own licence: using Oracle WebLogic Server requires your own Oracle WebLogic Server licence, and Oracle patches (PSUs and Critical Patch Updates) come from Oracle under your own agreement, as Step 11 describes. The Java runtime is Oracle Linux's OpenJDK 21 (GPLv2 with the Classpath Exception); no Oracle JDK is included. The cloudimg software charge, by instance size as set out under Licensing near the top of this guide (from $0.04 an hour on micro, small and medium types to $0.24 an hour on 2xlarge and larger types, or the annual subscription, plus AWS infrastructure charges), is for what cloudimg adds to the image: the domain created on each instance at first boot with its own administrator password and encryption salt, the per-instance TLS certificate, the AdminServer on the loopback address behind nginx HTTPS, SSH by key pair only, and WebLogic and nginx blocked from the instance metadata service. Your Oracle licence is not part of this charge; you obtain it from Oracle.

Oracle, Java and WebLogic are registered trademarks of Oracle and/or its affiliates. cloudimg is not affiliated with or endorsed by Oracle.