Run Oracle Database on Oracle Linux for Arm
Introduction
Oracle Database 19c Enterprise Edition, the current long-term support release of Oracle Database, is now certified and available on the popular Arm architecture for cloud and on-premises deployments.
The Oracle Cloud Infrastructure (OCI) Ampere A1 compute platform provides deterministic performance, linear scalability, and an energy-efficient, sustainable, eco-friendly design for Oracle Database customers. Building applications is free to try, easy to learn, and fast to explore.
This tutorial uses the container method to install Oracle Database 19c on Oracle Linux on an OCI Ampere A1 compute instance.
For help outside of this lab environment, see the Oracle Database server Release 19c documentation .
Objectives
In this lab, you'll learn how to:
- Install Oracle Database 19c using Podman
- Connect to Oracle Database 19c using SQL*Plus
Prerequisites
- A system running Oracle Linux
Accept the Oracle Standard Terms and Restrictions
Use of the Oracle Database image requires the acceptance of the Oracle Standard Terms and Restrictions.
Open a browser and go to https://container-registry.oracle.com .
Click the Sign In button in the upper right corner of the site.
Authenticate using your Oracle Single Sign On credentials.
Click the Database tile to access the various Oracle Database images.
Under the Repository column, click the enterprise link.
Select your language in the informational tile on the right and click the Continue button.
Read and scroll through the Oracle Standard Terms and Restrictions pop-up window.
Click the Accept button at the bottom of the pop-up window.
Verify the acceptance of the Oracle Standard Terms and Restrictions.
The informational tile should now display a green circle with a white check and the date and time of your last acceptance.
Setup Lab Environment
Note: When using the free lab environment, see Oracle Linux Lab Basics for connection and other usage instructions.
If not already connected, open a terminal and connect via ssh to the ol-node01 instance.
ssh oracle@<ip_address_of_instance>
Confirm the version of Oracle Linux.
cat /etc/oracle-release
Check the platform architecture.
uname -i
The
aarch64
indicates the hardware platform as the Arm architecture.Install Podman and the container-tools packages.
sudo dnf module install -y container-tools:ol8
Install Oracle Database 19c Server Using Podman
Create a data volume.
The data volume allows the database to persist during container recreation.
podman volume create oradata
Create a secret.
The secret is a utility to pass secure text strings to the container, such as ssh-keys or passwords.
echo "Welcome1" | podman secret create oracle_pwd -
The
SYS
,SYSTEM
, andPDBADMIN
administrative user accounts all use the same password. Oracle recommends that your password be at least 8 characters in length, containing at least 1 upper case character, 1 lower case character, and 1 digit [0-9].Log in to the Oracle Container Registry.
podman login container-registry.oracle.com
Enter your Oracle Single Sign On username and password at the given prompts.
Start the Oracle Database container image.
podman run -d --name oracle-db --secret=oracle_pwd -p 1521:1521 -v oradata:/opt/oracle/oradata container-registry.oracle.com/database/enterprise:19.19.0.0
Warning: While pulling the image, the process appears to freeze when writing the manifest and storing signatures. After several minutes, the command will complete and present the running container id.
Verify the Oracle Database image is running.
podman ps
The
status
reports the container is running and(starting)
. Repeat this command usingwatch podman ps
until the status shows as(healthy)
, which takes around 10 minutes. UseCtrl-C
to exit out of thewatch
command.
Connect to the Oracle Database 19c Server Container
Get the mapped database port.
podman port oracle-db
Get the Oracle Database Service name.
While the Oracle SID is the unique name that identifies your instance/database, the Service name is the TNS alias you give when remotely connecting to your database.
podman exec -it oracle-db lsnrctl status
The Service name for the image defaults to
ORCLCDB
.Run SQL*Plus using the same image you used to start the database.
podman run --rm -ti container-registry.oracle.com/database/enterprise:19.19.0.0 sqlplus sys/Welcome1@//10.0.0.150:1521/ORCLCDB as sysdba
Select from the
DUAL
table.select * from dual;
Example Output:
[oracle@ol-node-01 ~]$ podman run --rm -ti container-registry.oracle.com/database/enterprise:19.19.0.0 sqlplus sys/Welcome1@//10.0.0.150:1521/ORCLCDB as sysdba SQL*Plus: Release 19.0.0.0.0 - Production on Fri Jul 28 01:21:39 2023 Version 19.19.0.0.0 Copyright (c) 1982, 2023, Oracle. All rights reserved. Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.19.0.0.0 SQL> select * from dual; D - X
Select the system date.
select sysdate from dual;
Example Output:
SQL> select sysdate from dual; SYSDATE --------- 28-JUL-23
Exit SQL*Plus.
quit
Stop and Remove the Oracle Database 19c Server Container
Stop the container.
podman stop oracle-db
Note: When stopping the container, ignore the expected warning regarding
StopSignal SIGTERM
.Remove the container.
podman rm oracle-db
The
oradata
volume remains after removing the container, thus preserving any data added or configuration changes made to the database.
For More Information
See other related resources: