附註:

在 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 Roving Edge Infrastructure 管理員、開發人員和使用者。

目標

必要條件

在 Oracle Roving Edge Infrastructure 上安裝 Oracle Autonomous Database 免費容器映像檔

作業 1:更新 Oracle Linux 執行處理

  1. 確認 Oracle Linux 執行處理為最新狀態。使用 ssh 存取執行處理,並執行下列命令以更新執行處理。

    sudo dnf -y update
    
  2. 重新啟動執行處理。

    sudo reboot
    
  3. 使用 ssh 重新連線。

    ssh oracle@<ip_address_of_ol_node>
    

工作 2:安裝 container-tools 模組

  1. 請執行下列命令,將 container-tools 模組安裝在 Oracle Linux 執行處理上。

    sudo dnf module install -y container-tools:ol8
    

工作 3:使用 Podman 安裝 Oracle Database Free Server

  1. 建立資料磁碟區。資料量允許資料庫在容器重新建立期間持續存在。

    podman volume create oradata
    
  2. 建立加密密碼。secret (秘密) 是將安全文字字串傳送至容器的公用程式,例如 ssh-keys 或密碼。

    echo "Welcome1" | podman secret create oracle_pwd -
    

    注意:SYSSYSTEMPDBADMIN 管理使用者帳戶都使用相同的密碼。Oracle 建議您的密碼長度至少應為 8 個字元,且至少包含 1 個大寫字元、1 個小寫字元以及 0 到 9 個數字。

  3. 啟動 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 伺服器容器

  1. 取得對應的資料庫連接埠。

    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
    
  2. 安裝 SQL*Plus。

    sudo dnf install -y oracle-instantclient-release-el8
    sudo dnf install -y oracle-instantclient-sqlplus
    
  3. 使用 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 執行處理

  1. 確認 Oracle Linux 執行處理為最新狀態。使用 ssh 存取執行處理,並執行下列命令以更新執行處理。

    sudo dnf -y update
    
  2. 重新啟動執行處理。

    sudo reboot
    
  3. 透過 ssh 重新連線。

    ssh oracle@<ip_address_of_ol_node>
    

工作 2:安裝 Oracle Database Free RPM

  1. 安裝安裝前 RPM。

    sudo dnf install -y oracle-database-preinstall-23ai-1.0-2.el8.x86_64
    

    Oracle Database 預先安裝 RPM 會自動建立 Oracle 安裝擁有者和群組,並且會視安裝 Oracle Database 的需要設定其他核心組態設定值。如果您打算使用工作角色區隔,請根據需求建立一組擴充的資料庫使用者和群組。

  2. 下載 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 軟體下載詳細資訊

  3. 安裝資料庫軟體。

    sudo dnf localinstall -y  oracle-database-free-23ai-1.0-1.el8.x86_64.rpm
    

工作 3:建立和設定 Oracle Database

  1. 複查組態參數。

    vi /etc/sysconfig/oracle-free–23ai.conf
    

    組態命令檔會使用一個可插拔資料庫 (FREEPDB1) 建立容器資料庫 (FREE),並在預設連接埠 (1521) 設定監聽器。

  2. 使用預設值建立資料庫。

    sudo /etc/init.d/oracle-free-23ai configure
    

    注意:在命令提示字元中,指定 SYSSYSTEMPDBADMIN 管理使用者帳戶的密碼。Oracle 建議您的密碼長度至少應為 8 個字元,其中至少包含 1 個大寫字元、1 個小寫字元以及 1 個數字 [0-9]。

工作 4:連線至 Oracle Database Free

  1. 設定資料庫的環境。

    export ORACLE_SID=FREE
    export ORAENV_ASK=NO
    . /opt/oracle/product/23ai/dbhomeFree/bin/oraenv
    
  2. 連線至該資料庫。

    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
    

認可

其他學習資源

瀏覽 docs.oracle.com/learn 的其他實驗室,或前往 Oracle Learning YouTube 頻道存取更多免費學習內容。此外,請造訪 education.oracle.com/learning-explorer 以成為 Oracle Learning Explorer。

如需產品文件,請造訪 Oracle Help Center