Thứ Năm, 5 tháng 3, 2026

Cài đặt Oracle Database 26ai trên Oracle Linux 9

Dưới đây là hướng dẫn cài đặt Oracle Database 26ai (phiên bản AI-enhanced, thường là 23.26.x) trên Red Hat Enterprise Linux 9 (hoặc tương thích CentOS Stream 9 / Rocky 9 / AlmaLinux 9), được viết lại theo kiểu Notepad++ – từng bước rõ ràng, có thể copy-paste từng khối lệnh một cách an toàn.

Lưu ý quan trọng trước khi bắt đầu (2026):
• Oracle 26ai chưa chính thức hỗ trợ RHEL 9 đầy đủ như Oracle Linux → bạn cần dùng oracle-ai-database-preinstall-26ai và có thể phải thêm một số workaround nhỏ.
• Nên dùng Oracle AI Database Free (RPM cách dễ nhất) nếu chỉ test/lab.
• Nếu muốn full Enterprise → tải zip từ edelivery.oracle.com (cần CSI/support).
Các phiên bản 26ai:
  • 23.26.0 – October 2025 
  • 23.26.1 – January 2026
  • 23.26.2 – April 2026
  • 23.26.3 – July 2026
  • 23.26.4 – October 2026
  • 23.27.1 – January 2027

Cách 1 – Dễ nhất: Cài bằng RPM Free (khuyên dùng cho lab/test)
Bash
# =====================================================================
# 1. Cập nhật hệ thống & bật repository cần thiết (root)
# =====================================================================
sudo dnf update -y
sudo dnf install -y dnf-plugins-core epel-release
sudo dnf config-manager --set-enabled crb

# =====================================================================
# 2. Cài oracle preinstall package cho 26ai (tự động cấu hình user, kernel, limits, packages...)
#     Lấy từ yum.oracle.com hoặc download trực tiếp
# =====================================================================
# Cách A: Từ internet (nếu máy có mạng và oracle yum repo ok)
sudo dnf install -y oracle-ai-database-preinstall-26ai
# Cách B: Download thủ công rồi cài (thường ổn định hơn trên RHEL)
# Link thường gặp: https://yum.oracle.com/repo/OracleLinux/OL9/appstream/x86_64/getPackage/oracle-ai-database-preinstall-26ai-...
# Hoặc search "oracle-ai-database-preinstall-26ai rpm download"
wget https://download.oracle.com/otn-pub/otn_software/db-free/oracle-ai-database-preinstall-26ai-....rpm   # thay link thật
sudo dnf -y localinstall oracle-ai-database-preinstall-26ai-*.rpm

# =====================================================================
# 3. Đặt password cho user oracle (đã được tạo bởi preinstall)
# =====================================================================
sudo passwd oracle

# =====================================================================
# 4. Tải Oracle AI Database Free 26ai RPM (cho RHEL9 / OL9)
# =====================================================================
wget https://download.oracle.com/otn-pub/otn_software/db-free/oracle-ai-database-free-26ai-23.26.1-1.el9.x86_64.rpm

# =====================================================================
# 5. Cài đặt Oracle 26ai Free bằng RPM (chỉ 1 lệnh)
# =====================================================================
sudo dnf -y localinstall oracle-ai-database-free-26ai-*.rpm

# =====================================================================
# 6. Chạy root script (nếu được yêu cầu – thường RPM tự chạy)
# =====================================================================
# Nếu thấy thông báo → chạy với root:
/u01/app/oracle/product/23.26.0/dbhomeFree/root.sh   # đường dẫn có thể khác nhẹ, kiểm tra log

# =====================================================================
# 7. Login oracle và thử kết nối (XE hoặc Free instance thường tự tạo)
# =====================================================================
su - oracle
sqlplus / as sysdba
SQL> show pdbs;
SQL> alter session set container = XEPDB1;   -- nếu có pdb
SQL> connect system/oracle@//localhost:1521/XEPDB1
   -- password mặc định thường là 'oracle' hoặc được set lúc cài

Cách 2 – Cài classic (zip + runInstaller) – dành cho Enterprise / custom

Bash
# =====================================================================
# 1. Đã cài preinstall ở trên rồi thì bỏ qua bước này
# =====================================================================

# =====================================================================
# 2. Tạo cấu trúc thư mục (oracle user)
# =====================================================================
su - oracle
mkdir -p /u01/app/oracle/product/26.0.0/dbhome_1
mkdir -p /u02/oradata
mkdir -p /backup

# =====================================================================
# 3. Copy file cài đặt vào (giả sử đã unzip LINUX.X64_264bit_DB26AI.zip)
# =====================================================================
# Ví dụ: unzip V999999-01.zip -d /tmp/db26ai
cd /tmp/db26ai

# =====================================================================
# 4. Chạy cài đặt (cách tương tác – GUI hoặc VNC)
# =====================================================================
./runInstaller

# =====================================================================
# 5. Hoặc silent install (khuyên dùng trên server không GUI)
#    Tạo file response trước
# =====================================================================
vi db_install.rsp
# Nội dung tối thiểu (chỉnh sửa theo nhu cầu)
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v26
oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=$(hostname)
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/u01/app/oraInventory
ORACLE_HOME=/u01/app/oracle/product/26.0.0/dbhome_1
ORACLE_BASE=/u01/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.OSDBA_GROUP=dba
oracle.install.db.OSOPER_GROUP=oper
oracle.install.db.OSBACKUPDBA_GROUP=backupdba
oracle.install.db.OSDGDBA_GROUP=dgdba
oracle.install.db.OSKMDBA_GROUP=kmdba
oracle.install.db.OSRACDBA_GROUP=racdba
oracle.install.IsBuiltInAccount=false
oracle.install.OracleHomeUserName=oracle
oracle.install.OracleHomeUserPassword=YourPass123
oracle.install.db.config.starterdb.type=GENERAL_PURPOSE
oracle.install.db.config.starterdb.globalDBName=orcl
oracle.install.db.config.starterdb.SID=orcl
oracle.install.db.ConfigureListener=LISTENER
oracle.install.db.listenerName=LISTENER
oracle.install.db.listenerPort=1521

# Chạy silent
./runInstaller -silent -responseFile /home/oracle/db_install.rsp -waitforcompletion

# =====================================================================
# 6. Chạy root script khi được yêu cầu
# =====================================================================
sudo /u01/app/oraInventory/orainstRoot.sh
sudo /u01/app/oracle/product/26.0.0/dbhome_1/root.sh

# =====================================================================
# 7. Tạo database bằng dbca (silent)
# =====================================================================
dbca -silent -createDatabase \
  -templateName General_Purpose.dbc \
  -gdbName orcl \
  -sid orcl \
  -sysPassword YourPass123 \
  -systemPassword YourPass123 \
  -characterSet AL32UTF8 \
  -nationalCharacterSet AL16UTF16 \
  -emConfiguration NONE \
  -storageType FS \
  -datafileDestination /u02/oradata \
  -redoLogFileSize 100 \
  -initParams db_create_file_dest=/u02/oradata



Chọn Cách 1 (RPM Free) nếu bạn chỉ cần test nhanh AI features của 26ai. 
Chọn Cách 2 nếu cần full tùy chỉnh hoặc Enterprise Edition.
=============================
TƯ VẤN: Click Here hoặc Hotline/Zalo 090.29.12.888
=============================
Website không chứa bất kỳ quảng cáo nào, mọi đóng góp để duy trì phát triển cho website (donation) xin vui lòng gửi về STK 90.2142.8888 - Ngân hàng Vietcombank Thăng Long - TRAN VAN BINH
=============================
Nếu bạn không muốn bị AI thay thế và tiết kiệm 3-5 NĂM trên con đường trở thành DBA chuyên nghiệp hay làm chủ Database thì hãy đăng ký ngay KHOÁ HỌC ORACLE DATABASE A-Z ENTERPRISE, được Coaching trực tiếp từ tôi với toàn bộ bí kíp thực chiến, thủ tục, quy trình của gần 20 năm kinh nghiệm (mà bạn sẽ KHÔNG THỂ tìm kiếm trên Internet/Google) từ đó giúp bạn dễ dàng quản trị mọi hệ thống Core tại Việt Nam và trên thế giới, đỗ OCP.
- CÁCH ĐĂNG KÝ: Gõ (.) hoặc để lại số điện thoại hoặc inbox https://m.me/tranvanbinh.vn hoặc Hotline/Zalo 090.29.12.888
- Chi tiết tham khảo:
https://bit.ly/oaz_w
=============================
2 khóa học online qua video giúp bạn nhanh chóng có những kiến thức nền tảng về Linux, Oracle, học mọi nơi, chỉ cần có Internet/4G:
- Oracle cơ bản: https://bit.ly/admin_1200
- Linux: https://bit.ly/linux_1200
=============================
KẾT NỐI VỚI CHUYÊN GIA TRẦN VĂN BÌNH:
📧 Mail: binhoracle@gmail.com
☎️ Mobile/Zalo: 0902912888
👨 Facebook: https://www.facebook.com/BinhOracleMaster
👨 Inbox Messenger: https://m.me/101036604657441 (profile)
👨 Fanpage: https://www.facebook.com/tranvanbinh.vn
👨 Inbox Fanpage: https://m.me/tranvanbinh.vn
👨👩 Group FB: https://www.facebook.com/groups/DBAVietNam
👨 Website: https://www.tranvanbinh.vn
👨 Blogger: https://tranvanbinhmaster.blogspot.com
🎬 Youtube: https://www.youtube.com/@binhguru
👨 Tiktok: https://www.tiktok.com/@binhguru
👨 Linkin: https://www.linkedin.com/in/binhoracle
👨 Twitter: https://twitter.com/binhguru
👨 Podcast: https://www.podbean.com/pu/pbblog-eskre-5f82d6
👨 Địa chỉ: Tòa nhà Sun Square - 21 Lê Đức Thọ - Phường Mỹ Đình 1 - Quận Nam Từ Liêm - TP.Hà Nội

=============================
cơ sở dữ liệu, cơ sở dữ liệu quốc gia, database, AI, trí tuệ nhân tạo, artificial intelligence, machine learning, deep learning, LLM, ChatGPT, DeepSeek, Grok, oracle tutorial, học oracle database, Tự học Oracle, Tài liệu Oracle 12c tiếng Việt, Hướng dẫn sử dụng Oracle Database, Oracle SQL cơ bản, Oracle SQL là gì, Khóa học Oracle Hà Nội, Học chứng chỉ Oracle ở đầu, Khóa học Oracle online,sql tutorial, khóa học pl/sql tutorial, học dba, học dba ở việt nam, khóa học dba, khóa học dba sql, tài liệu học dba oracle, Khóa học Oracle online, học oracle sql, học oracle ở đâu tphcm, học oracle bắt đầu từ đâu, học oracle ở hà nội, oracle database tutorial, oracle database 12c, oracle database là gì, oracle database 11g, oracle download, oracle database 19c/21c/23c/23ai, oracle dba tutorial, oracle tunning, sql tunning , oracle 12c, oracle multitenant, Container Databases (CDB), Pluggable Databases (PDB), oracle cloud, oracle security, oracle fga, audit_trail,oracle RAC, ASM, oracle dataguard, oracle goldengate, mview, oracle exadata, oracle oca, oracle ocp, oracle ocm , oracle weblogic, postgresql tutorial, mysql tutorial, mariadb tutorial, ms sql server tutorial, nosql, mongodb tutorial, oci, cloud, middleware tutorial, docker, k8s, micro service, hoc solaris tutorial, hoc linux tutorial, hoc aix tutorial, unix tutorial, securecrt, xshell, mobaxterm, putty

ĐỌC NHIỀU

Trần Văn Bình - Oracle Database Master