Oracle Database Client 12c Release 1 on Oracle Linux 8
Overview
The Oracle Database Client gives an EC2 instance the tools and libraries to connect to Oracle databases that run somewhere else: on Amazon RDS for Oracle, on another EC2 instance, on premises over a VPN or AWS Direct Connect, or in Oracle Cloud.
This guide covers the Oracle Database Client 12c Release 1 on Oracle Linux 8 AMI from SecureAnyCloud on Amazon EC2. It is one version of the SecureAnyCloud Oracle Database Client listing on AWS Marketplace, and you pick it as the software version when you subscribe and launch.
Oracle Database Client 12c Release 1 is the client of Oracle Database 12c Release 1 (12.1). That release is past Oracle Premier Support and Extended Support. It is in Sustaining Support only, with no new Oracle patches.
Choose this version to connect to legacy databases, for example where an application has to stay on the 12.1 client or where your databases still run older releases. For new work, choose a current client release from the same listing.
The image is the Administrator install type.
Base release only. The client is installed from Oracle's 12c Release 1 base release media, version 12.1.0.2.0, with no Oracle patch applied. SecureAnyCloud checks the media against the size and checksum Oracle published for it before installing it.
Oracle provides client patches as support content to customers with an Oracle support contract, so you apply them yourself (step 10). The Oracle Linux 8 packages are fully patched when the image is built.
Oracle Linux 8. Oracle released 12c Release 1 before Oracle Linux 8 existed. Its installer does not recognise Oracle Linux 8, so it reports warning INS-13001 and skips its own prerequisite checks. SecureAnyCloud changes no installer setting and adds no compatibility package.
The 12.1 client links its programs during installation with the Oracle Linux 8 toolchain. The compilers are needed for that link only. The C++ compiler gcc-c++, on Oracle's 12.1 prerequisite list, builds the OCCI library. The build installs gcc, gcc-c++ and make for the installation and removes them right after the link, so no compiler ships in the image.
With the compilers installed, the link runs cleanly, and so does Oracle's relink, which Oracle patches run. Install the compilers again before you relink (step 10). The client installs and runs on Oracle Linux 8, which the first boot check and the self-test (step 5) prove on your instance. If you need a combination Oracle has certified, check the certification matrix on My Oracle Support.
Bring your own licence. This image includes no Oracle licence. You use the Oracle Database Client under Oracle's license terms for it, and you need your own Oracle Database licence for every database you connect to.
What you get:
- Client tools: SQL*Plus, SQL*Loader (
sqlldr), tnsping, the Data Pump clients (expdp,impdp), the original export and import clients (exp,imp),adrci,orapkiandmkstore. - Client libraries for your own applications: the OCI client library (
libclntsh.so), the OCCI C++ library (libocci.so.12.1), the JDBC drivers (ojdbc7.jarandojdbc6.jar) and the ODBC driver (libsqora.so.12.1). - Oracle Net: configured through
sqlnet.oraandtnsnames.ora. - A verified Oracle home. When the image is built, SecureAnyCloud records the SHA-256 checksum of every file in the Oracle home's bin and lib directories. On the first boot of your instance, sac-oracle-client-firstboot.service checks every file against that record and checks that SQL*Plus is release 12.1.0.2.0. If anything differs, the unit fails and the instance reports a degraded boot. /root/oracle-client-FIRSTBOOT-FAILED.txt explains why.
- The environment set for you. Every login shell gets
ORACLE_HOME,TNS_ADMIN,PATHandNLS_LANGfrom/etc/profile.d/oracle-client.sh. Small wrappers in/usr/local/binmakesqlplus,sqlldrandtnspingwork from scripts and cron too. The Oracle programs find their own libraries through the library path Oracle links into them. The Oracle library directory is never added to the system library path or to a login shell'sLD_LIBRARY_PATH, so an Oracle library can never replace a system one (the home carries its own copy of the expat XML library, for example). - No listening service but SSH. The image runs no Oracle listener and no other network service. Only SSH listens, on port 22. The client only makes outbound connections to your databases.
- Hardened Oracle Linux 8. Key-only SSH, SELinux enforcing, a host firewall that allows SSH only, no password on any account (root is locked with no password hash at all), no compiler, the IMDSv2-only instance metadata service, and daily automatic Oracle Linux security updates.
- No shared identity. Each instance generates its own SSH host keys and machine identity on first boot, and no build credential, log or key is left in the image. The client needs no secret of its own, so the image creates none. Oracle wallets are yours to create (step 7).
This is a headless image with no web interface. You work over SSH.
Default user: ec2-user. Architecture: x86_64. Recommended instance type: m5.large.
Prerequisites
- An AWS account subscribed to the listing, an EC2 key pair and a VPC subnet.
- A security group that allows TCP 22 (SSH) from your own networks only. No other inbound port is needed.
- Outbound network access from the instance to each database's listener port (usually TCP 1521), through the security groups, network ACLs and routes between them.
- The host name or address, port and service name of each database you want to reach, and a database account.
- Your own Oracle Database licence for the databases you connect to.
Instance type: m5.large (2 vCPU, 8 GiB) suits interactive SQL*Plus work and most batch loads. Choose a larger type for heavy SQL*Loader or Data Pump work.
Launch from AWS Marketplace
Open the listing on AWS Marketplace, choose View purchase options and then Subscribe. When the subscription is active, choose Launch your software. In Version, pick Oracle Database Client 12c Release 1 on OL 8.
Choose your Region, an instance type (m5.large is recommended), your key pair and a security group that opens port 22 from your own networks only. Then launch the instance.
The instance is ready about two minutes after launch.
Launch from the AWS CLI
Replace <ami-id> with the AMI ID of this version in your Region, and replace the other angle-bracket values with your own. The command requires IMDSv2:
aws ec2 run-instances \
--image-id <ami-id> \
--instance-type m5.large \
--key-name <key-name> \
--subnet-id <subnet-id> \
--security-group-ids <security-group-id> \
--metadata-options HttpTokens=required,HttpEndpoint=enabled \
--tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=oracle-client-12-1}]'When the instance is running, retrieve its public address:
aws ec2 describe-instances --instance-ids <instance-id> --query "Reservations[].Instances[].PublicIpAddress" --output textConnect over SSH and Check First Boot
The SSH user for Oracle Database Client 12c Release 1 on Oracle Linux 8 is ec2-user. Connect with your key pair:
ssh -i <your-key.pem> ec2-user@<public-ip>Check that the first boot verification ran:
systemctl status sac-oracle-client-firstboot.service --no-pager | head -5 sudo cat /var/log/sac/oracle-client-firstboot.logThe unit is active (exited) with status=0/SUCCESS. The log records how many files of the Oracle home were checked:
● sac-oracle-client-firstboot.service - sac: verify the Oracle Database Client home on first boot Loaded: loaded (/etc/systemd/system/sac-oracle-client-firstboot.service; enabled; vendor preset: disabled) Active: active (exited) since Sat 2026-10-24 01:54:37 EDT; 1min 15s ago Process: 6961 ExecStart=/usr/local/sbin/sac-oracle-client-firstboot (code=exited, status=0/SUCCESS) Main PID: 6961 (code=exited, status=0/SUCCESS) 2026-10-24T05:54:35Z first boot verification started 2026-10-24T05:54:37Z verified 443 files of the Oracle home; SQL*Plus 12.1.0.2.0If the unit failed, read /root/oracle-client-FIRSTBOOT-FAILED.txt and contact support.
Confirm the Client Release and Tools
Your login shell already has the Oracle environment. The command blocks in this guide also source /etc/profile.d/oracle-client.sh first, so they work the same in a non-login shell:
. /etc/profile.d/oracle-client.sh echo "ORACLE_HOME=$ORACLE_HOME" echo "TNS_ADMIN=$TNS_ADMIN" sqlplus -V ls "$ORACLE_HOME/bin" | grep -xE 'sqlplus|sqlldr|tnsping|exp|imp|expdp|impdp|adrci|orapki|mkstore' | tr '\n' ' '; echoORACLE_HOME=/u01/app/oracle/product/12.1.0/client_1 TNS_ADMIN=/u01/app/oracle/product/12.1.0/client_1/network/admin SQL*Plus: Release 12.1.0.2.0 Production adrci exp expdp imp impdp mkstore orapki sqlldr sqlplus tnspingThe release line shows the exact release. 12.1.0.2.0 is the 12c Release 1 base release (Oracle's full installation media for 12c Release 1), with no Oracle patch applied.
These are the key paths on the image:
- /u01/app/oracle/product/12.1.0/client_1: ORACLE_HOME
- /u01/app/oracle: ORACLE_BASE
- $ORACLE_HOME/network/admin: TNS_ADMIN, which holds sqlnet.ora and tnsnames.ora
- $ORACLE_HOME/jdbc/lib/ojdbc7.jar: JDBC Thin driver for Java 7 and 8 (ojdbc6.jar for Java 6)
- $ORACLE_HOME/lib/libclntsh.so: OCI client library (C, C++, Python python-oracledb thick mode, Perl, PHP OCI8)
- $ORACLE_HOME/lib/libocci.so.12.1: OCCI C++ client library
- $ORACLE_HOME/lib/libsqora.so.12.1: ODBC driver
- /u01/app/oraInventory: Oracle central inventory
- /usr/share/doc/sac/oracle-client-12-1/README.txt: a summary of this image
Run the Self-Test
The image carries a self-test that repeats the first boot checks and proves the client works end to end without a database. It covers Oracle Net name resolution, a connection attempt that reaches the network layer, the exact listening ports, SELinux, every SSH setting, a root login shell that keeps the system libraries, the accounts and the absence of a compiler. Run it:
sudo /usr/local/sbin/sac-oracle-client-selftestPASS: first-boot verification marker present PASS: no first-boot failure note PASS: Oracle home matches the build manifest (443 files) PASS: login shell: sqlplus -V = 12.1.0.2.0 PASS: wrapper (non-login): sqlplus -V = 12.1.0.2.0 PASS: tnsping: unknown alias refused (TNS-03505) PASS: sqlplus: no listener on this instance (ORA-12541) PASS: only TCP 22 listens PASS: no Oracle listener process PASS: SELinux enforcing PASS: sshd -T passwordauthentication no PASS: sshd -T permitrootlogin no PASS: sshd -T pubkeyauthentication yes PASS: sshd -T x11forwarding no PASS: sshd -T kbdinteractiveauthentication no PASS: sshd -T challengeresponseauthentication no PASS: sshd -T permitemptypasswords no PASS: sshd -T allowtcpforwarding yes PASS: sshd -T maxauthtries 4 PASS: sshd -T clientaliveinterval 300 PASS: sshd -T clientalivecountmax 3 PASS: sshd -T logingracetime 60 PASS: root login shell: no LD_LIBRARY_PATH, system libraries not shadowed (python XML parser loads) PASS: no account carries a password hash, locked or not PASS: no compiler (gcc, cc, c++, g++, make) on the PATH PASS: no core dump or crash report ORACLE_CLIENT_SELFTEST_OKTNS-03505 and ORA-12541 are the expected answers. The self-test asks for an alias that does not exist, and it connects to port 1521 on the instance itself, where no listener runs.
Add Your Databases to tnsnames.ora
sqlnet.ora resolves names through tnsnames.ora first and then EZCONNECT (host:port/service), so you can connect without any configuration, or give each database a short alias. Review the shipped files:
. /etc/profile.d/oracle-client.sh grep -v '^#' "$TNS_ADMIN/sqlnet.ora" cat "$TNS_ADMIN/tnsnames.ora"NAMES.DIRECTORY_PATH = (TNSNAMES, EZCONNECT) SQLNET.EXPIRE_TIME = 10 SQLNET.OUTBOUND_CONNECT_TIMEOUT = 60
# sac Oracle Database Client 12c Release 1 - Oracle Net service names.
# Add one entry per database, for example:
#
# MYDB =
# (DESCRIPTION =
# (ADDRESS = (PROTOCOL = TCP)(HOST = db.example.com)(PORT = 1521))
# (CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = ORCLPDB1))
# )The oracle software owner owns these files, so edit them with sudo. To add an alias, append an entry with your database's host, port and service name:
sudo tee -a /u01/app/oracle/product/12.1.0/client_1/network/admin/tnsnames.ora > /dev/null <<'TNS' MYDB = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = <db-host>)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = <service-name>)) ) TNS tnsping MYDBtnsping resolves the alias and contacts the database listener. It ends with OK (<n> msec) when the listener answers. If it reports TNS-12535 or times out, the network path to the database (security groups, network ACLs, routes) does not allow the connection.
To keep your own tnsnames.ora elsewhere, set TNS_ADMIN to that directory in your shell profile.
Connect with SQL*Plus
Connect with the alias, or connect directly with EZCONNECT. SQL*Plus prompts for the password, which keeps it out of your shell history and the process list:
sqlplus <db-user>@MYDB sqlplus <db-user>@//<db-host>:1521/<service-name>For Amazon RDS for Oracle, <db-host> is the DB instance endpoint shown in the RDS console, and <service-name> is the database name (ORCL by default). After you connect, run:
SELECT banner_full FROM v$version; SELECT sys_context('USERENV', 'SERVICE_NAME') FROM dual;Never put a password on the command line (sqlplus user/password@db). Every user of the instance can see it in the process list.
For unattended scripts, use an Oracle wallet (a secure external password store) instead. Create it with mkstore in a directory only your account can read. Add WALLET_LOCATION and SQLNET.WALLET_OVERRIDE = TRUE to your own sqlnet.ora, and connect with sqlplus /@MYDB. The image ships no wallet, so every wallet you create is your instance's own.
Encrypt the Connection to the Database
Oracle Net traffic is not encrypted unless the client and the server agree to encrypt it. sqlnet.ora carries commented settings for both methods:
- Oracle Native Network Encryption. Uncomment the
SQLNET.ENCRYPTION_CLIENTandSQLNET.CRYPTO_CHECKSUM_CLIENTlines (REQUIRED, AES256 and SHA256) to refuse any unencrypted session. The database must accept encryption. Amazon RDS for Oracle enables it with theNATIVE_NETWORK_ENCRYPTIONoption. - TLS (TCPS). Create a wallet holding your database's CA certificate with
orapki, pointWALLET_LOCATIONat it, and use(PROTOCOL = TCPS)and the database's TLS port in the alias. Amazon RDS for Oracle provides TLS with itsSSLoption and publishes its CA certificates.
List the commented settings:
. /etc/profile.d/oracle-client.sh grep -n 'ENCRYPTION\|CRYPTO\|WALLET' "$TNS_ADMIN/sqlnet.ora"9:# SQLNET.ENCRYPTION_CLIENT = REQUIRED 10:# SQLNET.ENCRYPTION_TYPES_CLIENT = (AES256) 11:# SQLNET.CRYPTO_CHECKSUM_CLIENT = REQUIRED 12:# SQLNET.CRYPTO_CHECKSUM_TYPES_CLIENT = (SHA256) 14:# WALLET_LOCATION = (SOURCE = (METHOD = FILE) (METHOD_DATA = (DIRECTORY = /path/to/your/wallet)))Edit sqlnet.ora with sudo, as in step 6.
If the database is reachable only through a bastion, an SSH tunnel also works. Open the tunnel with ssh -N -L 1521:<db-host>:1521 ec2-user@<bastion>, then connect to //localhost:1521/<service-name>.
Use the Client from Scripts, Cron and Applications
A login shell has the environment from /etc/profile.d/oracle-client.sh. Scripts and cron jobs do not read it. For that reason, sqlplus, sqlldr and tnsping are also installed as wrappers in /usr/local/bin that set the environment for that one command:
cat /usr/local/bin/sqlplus env -i PATH=/usr/local/bin:/usr/bin:/bin sqlplus -V#!/bin/bash
# sac Oracle Database Client 12c Release 1 wrapper: sqlplus from any shell (scripts, cron), environment scoped to this call export ORACLE_BASE=/u01/app/oracle export ORACLE_HOME=/u01/app/oracle/product/12.1.0/client_1 export TNS_ADMIN=${TNS_ADMIN:-/u01/app/oracle/product/12.1.0/client_1/network/admin} export NLS_LANG=${NLS_LANG:-AMERICAN_AMERICA.AL32UTF8} export LD_LIBRARY_PATH=/u01/app/oracle/product/12.1.0/client_1/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} exec /u01/app/oracle/product/12.1.0/client_1/bin/sqlplus "$@" SQL*Plus: Release 12.1.0.2.0 ProductionFor other Oracle tools in a script, source the profile first (. /etc/profile.d/oracle-client.sh). Applications use the libraries directly:
- Java: add
$ORACLE_HOME/jdbc/lib/ojdbc7.jar(Java 7 and 8) to the classpath. Connect withjdbc:oracle:thin:@//<db-host>:1521/<service-name>, or withjdbc:oracle:thin:@MYDBand-Doracle.net.tns_admin=$TNS_ADMIN. - OCI and OCCI (C, C++, python-oracledb thick mode, PHP OCI8, Perl DBD::Oracle): set
ORACLE_HOMEandLD_LIBRARY_PATH=$ORACLE_HOME/libfor the application, as the wrappers do. Do not add the directory to the system library path. - ODBC: register
$ORACLE_HOME/lib/libsqora.so.12.1as the driver in your unixODBCodbcinst.ini. InstallunixODBCwithsudo dnf install unixODBC.
Patching
This image ships the 12.1.0.2.0 base release. Under Oracle's Lifetime Support Policy, Oracle Database 12c Release 1 is past Premier and Extended Support. It is in Sustaining Support only, with no new Oracle patches, so check what Oracle still provides for it under your support contract.
SecureAnyCloud does not apply or redistribute Oracle patches. They are available to customers with an Oracle support contract through My Oracle Support. Apply the current client patches with your own Oracle support entitlement before you run the client in production. These resources help:
- Oracle's Critical Patch Update advisories, which list the security fixes in each quarterly update:
https://www.oracle.com/security-alerts/ - The Oracle Database 12c Release 1 documentation, including patching and upgrading:
https://docs.oracle.com/database/121/
Oracle's relink, which Oracle patches run, needs the C and C++ compilers and make, which the image does not ship. Install them first with sudo dnf install gcc gcc-c++ make, from the Oracle Linux 8 repositories. With them, the install-time link and relink all ran cleanly when SecureAnyCloud tested this release on Oracle Linux 8. Afterwards, you can remove them with sudo dnf remove gcc gcc-c++ make.
The Oracle home includes Oracle's own Java runtime (Java 6 update 75, from the 12.1 media) and Perl 5.14 ($ORACLE_HOME/jdk and $ORACLE_HOME/perl), which the Oracle installer and tools use. Oracle's patches update them, not dnf. Use your own current Java runtime for your applications rather than the Oracle home's.
The Oracle Linux packages update themselves: dnf-automatic applies Oracle Linux security errata every day. Check it and the pending updates with:
grep -E '^(upgrade_type|apply_updates)' /etc/dnf/automatic.conf systemctl is-enabled dnf-automatic.timerupgrade_type = security apply_updates = yes enabledTo apply every available update now, run sudo dnf upgrade. Reboot if a new kernel was installed.
Security Defaults
sudo ss -tlnp sudo firewall-cmd --list-services getenforce
sudo sshd -T | grep -E '^(passwordauthentication|permitrootlogin|x11forwarding|pubkeyauthentication) 'State Recv-Q Send-Q Local Address:Port Peer Address:PortProcess LISTEN 0 128 0.0.0.0:22 0.0.0.0:* users:(("sshd",pid=966,fd=3)) LISTEN 0 128 [::]:22 [::]:* users:(("sshd",pid=966,fd=4)) dhcpv6-client ssh Enforcing permitrootlogin no pubkeyauthentication yes passwordauthentication no x11forwarding no- Only SSH listens. The image never needs an inbound port beyond 22, so keep port 1521 closed on this instance.
- The SSH settings live in
/etc/ssh/sshd_config.d/00-sac.conf, whichsshd_configreads first. Your EC2 key pair is the only way in. Root login and passwords are refused. - SELinux is enforcing, and the host firewall (
firewalld) allows SSH only, alongside your security group. - The instance metadata service accepts IMDSv2 requests only (the AMI requires a session token).
Support and licensing
This image is bring your own licence and includes no Oracle licence. You use the Oracle Database Client under Oracle's license terms. You need your own Oracle Database licence for every database you connect to, and Oracle support for Oracle patches. The AMI price covers SecureAnyCloud's hardening, first boot verification and support for the image.
- Email: sales@secureanycloud.com
- Website: https://secureanycloud.com
- Support: 24/7, with a 24 hour response SLA
- Every version in this listing: Oracle Database Client on AWS
For the client tools, see the Oracle Database 12c Release 1 documentation at https://docs.oracle.com/database/121/, in particular the SQL*Plus User's Guide, the Database Utilities guide (SQL*Loader and Data Pump) and the Net Services Administrator's Guide.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. SecureAnyCloud is not affiliated with or endorsed by Oracle.
Deploy on AWS
Launch Oracle Database Client 12c Release 1 on Oracle Linux 8 on AWS with 24/7 support from SecureAnyCloud.
View on Marketplace
Need Help?
Our support team is available 24/7.
sales@secureanycloud.com