附註:
- 此教學課程需要存取 Oracle Cloud。若要註冊免費帳戶,請參閱開始使用 Oracle Cloud Infrastructure Free Tier 。
- 它使用 Oracle Cloud Infrastructure 憑證、租用戶及區間的範例值。完成實驗室時,請將這些值取代為您雲端環境特有的值。
在 Oracle Roving Edge Infrastructure 上部署 Oracle Autonomous Database
簡介
Oracle Roving Edge Infrastructure 讓客戶能夠在 Oracle Cloud Infrastructure (OCI) 租用戶之外分配雲端工作負載,以在零售、衛星和其他邊緣位置提供雲端服務及執行應用程式工作負載。因此,客戶可以更快、更接近使用者和資料擷取點地處理資料,從資料中產生及時洞察分析。
Oracle Autonomous Database 提供易於使用且完全自治的資料庫,可彈性調整規模並提供快速查詢效能。Oracle Autonomous Database 這項服務不需要資料庫管理。使用 Oracle Autonomous Database 時,您不需要設定或管理任何硬體,也不需要安裝任何軟體。Oracle Autonomous Database 會負責佈建、備份、修正並更新,以及增大或縮小資料庫。Oracle Autonomous Database 是一項完全靈活的服務。
Oracle Autonomous Database 也包含下列項目:
-
Oracle Application Express (Oracle APEX):這是一種低程式碼開發平台,可讓您以世界級功能建立可擴展的安全企業 App。
-
Oracle REST Data Services (ORDS):Jakarta Enterprise Edition (先前稱為 Java Enterprise Edition) 型資料服務,可讓您輕鬆開發關聯式資料和 JSON 文件存放區的現代化 REST 介面。
-
Oracle Database Actions:這是 Web 式介面,使用 Oracle REST Data Services 提供 Oracle Autonomous Database 開發、資料工具、管理以及監督功能。
-
Oracle Machine Learning Notebooks 早期採用者是增強的 Web 型筆記型電腦平台,適用於資料工程師、資料分析師、R 和 Python 使用者,以及資料科學家。您可以撰寫程式碼、文字、建立視覺化項目,以及執行包括機器學習在內的資料分析。在 Oracle Machine Learning Notebook 中,記事本可在工作區內的專案中使用,您可以在其中建立、編輯、刪除、複製、移動,甚至將記事本另存為樣板。
適用對象
Oracle Roving Edge Infrastructure 管理員、開發人員和使用者。
目標
-
在 Oracle Roving Edge Infrastructure 上安裝 Oracle Autonomous Database 免費容器映像檔。
-
在 Oracle Roving Edge Infrastructure 上安裝 Oracle Autonomous Database Free Red Hat Package Manager (RPM)。
必要條件
-
存取在 Oracle Roving Edge Infrastructure 節點上執行的 Oracle Linux 執行處理。
-
已安裝支援
ssh
的 macOS、Linux 或 Windows 電腦。 -
透過 macOS、Linux 或 Windows 電腦設定
ssh
金鑰認證,讓 SSH 存取 Oracle Linux 執行處理。 -
存取 Oracle Linux 執行處理上的
sudo
。 -
基本的 Linux 主機使用和工作知識,包括安裝軟體、建立和編輯檔案,以及使用服務。
在 Oracle Roving Edge Infrastructure 上安裝 Oracle Autonomous Database 免費容器映像檔
作業 1:更新 Oracle Linux 執行處理
-
確認 Oracle Linux 執行處理為最新狀態。使用
ssh
存取執行處理,並執行下列命令以更新執行處理。sudo dnf -y update
-
重新啟動執行處理。
sudo reboot
-
使用
ssh
重新連線。ssh oracle@<ip_address_of_ol_node>
工作 2:安裝 container-tools
模組
-
請執行下列命令,將
container-tools
模組安裝在 Oracle Linux 執行處理上。sudo dnf module install -y container-tools:ol8
工作 3:使用 Podman 安裝 Oracle Database Free Server
-
建立資料磁碟區。資料量允許資料庫在容器重新建立期間持續存在。
podman volume create oradata
-
建立加密密碼。secret (秘密) 是將安全文字字串傳送至容器的公用程式,例如 ssh-keys 或密碼。
echo "Welcome1" | podman secret create oracle_pwd -
注意:
SYS
、SYSTEM
和PDBADMIN
管理使用者帳戶都使用相同的密碼。Oracle 建議您的密碼長度至少應為 8 個字元,且至少包含 1 個大寫字元、1 個小寫字元以及 0 到 9 個數字。 -
啟動 Autonomous Transaction Processing (ATP) 工作負載的 Oracle Autonomous Database 免費容器映像檔。
podman run -d \ -p 1521:1521 \ -p 1522:1522 \ -p 8443:8443 \ -p 27017:27017 \ -e WORKLOAD_TYPE=ATP \ -e WALLET_PASSWORD=********* \ -e ADMIN_PASSWORD=********* \ --cap-add SYS_ADMIN \ --device /dev/fuse \ -v oradata:/opt/oracle/oradata \ --name adb-free \ container-registry.oracle.com/database/adb-free:latest-23ai
Oracle Autonomous Database Free Container Image 支援兩種類型的資料庫工作負載類型:Autonomous Data Warehouse (ADW) 和 ATP。這些類似於 Oracle Autonomous Database Serverless 雲端服務中的交易處理和資料倉儲工作負載類型資料庫。
第一次啟動容器映像檔時:
-
使用者必須強制變更管理員密碼。使用環境變數
ADMIN_PASSWORD
指定密碼。 -
Wallet 是使用公事包密碼
WALLET_PASSWORD
產生。
-
作業 4:連線至 Oracle Database Free 伺服器容器
-
取得對應的資料庫連接埠。
podman port adb-free
範例輸出:
1521/tcp -> 0.0.0.0:1521 1522/tcp -> 0.0.0.0:1522 8443/tcp -> 0.0.0.0:8443 27017/tcp -> 0.0.0.0:27017
-
安裝 SQL*Plus。
sudo dnf install -y oracle-instantclient-release-el8 sudo dnf install -y oracle-instantclient-sqlplus
-
使用 SQL*Plus 連線至 Oracle Database Free Server Container。
sqlplus admin/<myatp_admin_password>@myatp_low
範例輸出:
SQL*Plus: Release 21.0.0.0.0 - Production on Mon Jun 10 20:21:34 2024 Version 21.14.0.0.0 Copyright (c) 1982, 2022, Oracle. All rights reserved. Last Successful login time: Mon Jun 10 2024 20:16:49 +00:00 Connected to: Oracle Database 23ai Enterprise Edition Release 23.0.0.0.0 - Production Version 23.4.0.24.05 SQL>
在 Oracle Roving Edge Infrastructure 上安裝 Oracle Autonomous Database 免費 RPM
作業 1:更新 Oracle Linux 執行處理
-
確認 Oracle Linux 執行處理為最新狀態。使用
ssh
存取執行處理,並執行下列命令以更新執行處理。sudo dnf -y update
-
重新啟動執行處理。
sudo reboot
-
透過
ssh
重新連線。ssh oracle@<ip_address_of_ol_node>
工作 2:安裝 Oracle Database Free RPM
-
安裝安裝前 RPM。
sudo dnf install -y oracle-database-preinstall-23ai-1.0-2.el8.x86_64
Oracle Database 預先安裝 RPM 會自動建立 Oracle 安裝擁有者和群組,並且會視安裝 Oracle Database 的需要設定其他核心組態設定值。如果您打算使用工作角色區隔,請根據需求建立一組擴充的資料庫使用者和群組。
-
下載 Oracle Database Free 軟體。
curl -JLO https://download.oracle.com/otn-pub/otn_software/db-free/oracle-database-free-23ai-1.0-1.el8.x86_64.rpm
若要存取 Oracle Database Free 軟體下載詳細資訊,請參閱存取 Oracle Database Free 軟體下載詳細資訊。
-
安裝資料庫軟體。
sudo dnf localinstall -y oracle-database-free-23ai-1.0-1.el8.x86_64.rpm
工作 3:建立和設定 Oracle Database
-
複查組態參數。
vi /etc/sysconfig/oracle-free–23ai.conf
組態命令檔會使用一個可插拔資料庫 (
FREEPDB1
) 建立容器資料庫 (FREE
),並在預設連接埠 (1521
) 設定監聽器。 -
使用預設值建立資料庫。
sudo /etc/init.d/oracle-free-23ai configure
注意:在命令提示字元中,指定
SYS
、SYSTEM
和PDBADMIN
管理使用者帳戶的密碼。Oracle 建議您的密碼長度至少應為 8 個字元,其中至少包含 1 個大寫字元、1 個小寫字元以及 1 個數字 [0-9]。
工作 4:連線至 Oracle Database Free
-
設定資料庫的環境。
export ORACLE_SID=FREE export ORAENV_ASK=NO . /opt/oracle/product/23ai/dbhomeFree/bin/oraenv
-
連線至該資料庫。
sqlplus / as sysdba
範例輸出:
SQL*Plus: Release 23.0.0.0.0 - Production on Thu Jun 6 11:19:10 2024 Version 23.4.0.24.05 Copyright (c) 1982, 2024, Oracle. All rights reserved. Connected to: Oracle Database 23ai Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free Version 23.4.0.24.05
相關連結
認可
- 作者 - Jeevan Sreenivas (主要技術產品經理)
其他學習資源
瀏覽 docs.oracle.com/learn 的其他實驗室,或前往 Oracle Learning YouTube 頻道存取更多免費學習內容。此外,請造訪 education.oracle.com/learning-explorer 以成為 Oracle Learning Explorer。
如需產品文件,請造訪 Oracle Help Center 。
Deploy Oracle Autonomous Database on Oracle Roving Edge Infrastructure
G10588-01
June 2024