【備忘録】Oracle AI Database 26ai(23.26.1)のサイレント・インストールに挑戦

  • URLをコピーしました!
Oracle AI Database
僕の作業環境
  • OS:Oracle Linux 9.7
  • 導入製品:Oracle AI Database 26ai(23.26.1)

Oracle Linux9.7の仮想マシンを作成後、CUI環境だったためGUIベースのセットアップを行わず、これを機にサイレントモードでOracle AI Databaseの構築に挑戦してみました。

本記事は、Oracle AI Database 26aiのインストールからデータベース作成まで、サイレントモードの実行手順を備忘録としてまとめています。

この記事でわかること
  • OUI(Oracle Universal Installer)のサイレントインストール手順
  • DBCA(Database Configuration Assistant)のサイレントでのデータベース作成手順
目次

インストールからDB作成までの手順

  1. 事前準備
  2. レスポンスファイルの作成
  3. OUIのサイレントインストール
    • 【失敗時の対処法】アンインストール
  4. インストール後の実行
  5. レスポンスファイル作成
  6. DBCAのサイレント構築
  7. 環境変数の設定
  8. SQL*Plusで接続確認

事前準備

Oracle AI Database 26ai をサイレントモードでインストールする前に、あらかじめ標準的な事前準備を行います。

今回の事前準備は、GUI インストール時と同様に、Oracle AI Database Preinstallation RPM の導入oracle ユーザの確認インストール先ディレクトリの作成インストールメディアの配置・展開までを実施しています。

下記の記事に具体的な手順をまとめています。

あわせて読みたい
Oracle AI Database 26ai(23.26.1)オンプレ版をインストールしてDB作成までの手順 僕の作業環境 OS:Oracle Linux 9.7 Oracle AI Database 26ai(RU: 23.26.1.0.0)は、Linux x86-64オンプレミス向けに2026年1月の四半期リリース・アップデート(23.26....

レスポンスファイルの作成

Oracle AI Database 26aiをサイレントモードでインストールするために、OUI(Oracle Universal Installer)用のレスポンスファイルを作成します。

まずは、レスポンスファイルのフォルダに移動し、テンプレートのレスポンスファイルをバックアップしておきます。

[oracle@learnbytebybyte ~]$ cd /u01/app/oracle/product/26.0.0/dbhome_1/install/response/
[oracle@learnbytebybyte response]$ ls -la
total 24
drwxr-xr-x.  2 oracle oinstall    28 Jan 18 12:05 .
drwxrwx---. 11 oracle oinstall  4096 Jan 18 12:05 ..
-rw-r--r--.  1 oracle oinstall 19883 Dec 10 08:44 db_install.rsp
[oracle@learnbytebybyte response]$ cp db_install.rsp db_install.rsp_bk

バックアップ後、ソフトウェアの構成に合わせてレスポンスファイルに値を設定します。

今回は、ソフトウェアのみをインストールするようにレスポンスファイルを編集します。

[oracle@learnbytebybyte response]$ cat db_install.rsp
####################################################################
## Copyright(c) Oracle Corporation 1998,2025. All rights reserved.##
##                                                                ##
## Specify values for the variables listed below to customize     ##
## your installation.                                             ##
##                                                                ##
## Each variable is associated with a comment. The comment        ##
## can help to populate the variables with the appropriate        ##
## values.                                                        ##
##                                                                ##
## IMPORTANT NOTE: This file contains plain text passwords and    ##
## should be secured to have read permission only by oracle user  ##
## or db administrator who owns this installation.                ##
##                                                                ##
####################################################################

#------------------------------------------------------------------------------
# Do not change the following system generated value. 
#------------------------------------------------------------------------------
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v23.0.0

#-------------------------------------------------------------------------------
# Specify the installation option.
# It can be one of the following:
#   - INSTALL_DB_SWONLY
#   - INSTALL_DB_AND_CONFIG
#
# Deprecated: oracle.install.option
#-------------------------------------------------------------------------------
installOption=INSTALL_DB_SWONLY

#-------------------------------------------------------------------------------
# Specify the Unix group to be set for the inventory directory.  
#-------------------------------------------------------------------------------
UNIX_GROUP_NAME=oinstall

#-------------------------------------------------------------------------------
# Specify the location which holds the inventory files.
# This is an optional parameter if installing on
# Windows based Operating System.
#-------------------------------------------------------------------------------
INVENTORY_LOCATION=/u01/app/oraInventory

#-------------------------------------------------------------------------------
# Specify the complete path of the Oracle Home. 
#-------------------------------------------------------------------------------
ORACLE_HOME=/u01/app/oracle/product/26.0.0/dbhome_1

#-------------------------------------------------------------------------------
# Specify the complete path of the Oracle Base. 
#-------------------------------------------------------------------------------
ORACLE_BASE=/u01/app/oracle

#-------------------------------------------------------------------------------
# Specify the installation edition of the component.                     
#                                                             
# The value should contain only one of these choices.  
#   - EE     : Enterprise Edition 
#
# Deprecated: oracle.install.db.InstallEdition
#-------------------------------------------------------------------------------
installEdition=EE

###############################################################################
#                                                                             #
# PRIVILEGED OPERATING SYSTEM GROUPS                                          #
# ------------------------------------------                                  #
# Provide values for the OS groups to which SYSDBA and SYSOPER privileges     #
# needs to be granted. If the install is being performed as a member of the   #
# group "dba", then that will be used unless specified otherwise below.       #
#                                                                             #
# The value to be specified for OSDBA and OSOPER group is only for UNIX based #
# Operating System.                                                           #
#                                                                             #
###############################################################################
#------------------------------------------------------------------------------
# The OSDBA is the OS group which is to be granted SYSDBA privileges.
#
# Deprecated: oracle.install.db.OSDBA_GROUP
#-------------------------------------------------------------------------------
OSDBA=dba

#------------------------------------------------------------------------------
# The OSOPER is the OS group which is to be granted SYSOPER privileges.
# The value to be specified for OSOPER group is optional.
#
# Deprecated: oracle.install.db.OSOPER_GROUP
#------------------------------------------------------------------------------
OSOPER=oper

#------------------------------------------------------------------------------
# The OSBACKUPDBA is the OS group which is to be granted SYSBACKUP privileges.
#
# Deprecated: oracle.install.db.OSBACKUPDBA_GROUP
#------------------------------------------------------------------------------
OSBACKUPDBA=backupdba

#------------------------------------------------------------------------------
# The OSDGDBA is the OS group which is to be granted SYSDG privileges.
#
# Deprecated: oracle.install.db.OSDGDBA_GROUP
#------------------------------------------------------------------------------
OSDGDBA=dgdba

#------------------------------------------------------------------------------
# The OSKMDBA is the OS group which is to be granted SYSKM privileges.
#
# Deprecated: oracle.install.db.OSKMDBA_GROUP
#------------------------------------------------------------------------------
OSKMDBA=kmdba

#------------------------------------------------------------------------------
# The OSRACDBA is the OS group which is to be granted SYSRAC privileges.
#
# Deprecated: oracle.install.db.OSRACDBA_GROUP
#------------------------------------------------------------------------------
OSRACDBA=racdba

################################################################################
#                                                                              #
#                      Root script execution configuration                     #
#                                                                              #
################################################################################
#-------------------------------------------------------------------------------------------------------
# Specify the root script execution mode.
#
#   - true  : To run the root script automatically by using the appropriate configuration methods.
#   - false : To run the root script manually.
#
# If this option is selected, password should be specified on the console.
#
# Deprecated: oracle.install.db.rootconfig.executeRootScript
#-------------------------------------------------------------------------------------------------------
executeRootScript=false

#--------------------------------------------------------------------------------------
# Specify the configuration method to be used for automatic root script execution.
#
# Following are the possible choices:
#   - ROOT
#   - SUDO
#
# Deprecated: oracle.install.db.rootconfig.configMethod
#--------------------------------------------------------------------------------------
configMethod=

#--------------------------------------------------------------------------------------
# Specify the absolute path of the sudo program.
#
# Applicable only when SUDO configuration method was chosen.
#
# Deprecated: oracle.install.db.rootconfig.sudoPath
#--------------------------------------------------------------------------------------
sudoPath=

#--------------------------------------------------------------------------------------
# Specify the name of the user who is in the sudoers list. 
# Applicable only when SUDO configuration method was chosen.
# Note:For Single Instance database installations,the sudo user name must be the username of the user installing the database.
#
# Deprecated: oracle.install.db.rootconfig.sudoUserName
#--------------------------------------------------------------------------------------
sudoUserName=

Oracle InventoryやOracle BASE、Oracle HOME、OSグループを指定し、 rootスクリプトは自動実行せず、インストール後に手動実行します。

OUIのサイレントインストール

作成したレスポンスファイルを使用して、OUIのサイレントモードで実行します。

[oracle@learnbytebybyte dbhome_1]$ ./runInstaller -silent -responseFile /u01/app/oracle/product/26.0.0/dbhome_1/install/response/db_install.rsp
Launching Oracle AI Database Setup Wizard...

The response file for this session can be found at:
 /u01/app/oracle/product/26.0.0/dbhome_1/install/response/db_2026-02-28_09-38-36AM.rsp

You can find the log of this install session at:
 /tmp/InstallActions2026-02-28_09-38-36AM/installActions2026-02-28_09-38-36AM.log

As a root user, run the following script(s):
	1. /u01/app/oraInventory/orainstRoot.sh
	2. /u01/app/oracle/product/26.0.0/dbhome_1/root.sh

Run /u01/app/oraInventory/orainstRoot.sh on the following nodes: 
[learnbytebybyte]
Run /u01/app/oracle/product/26.0.0/dbhome_1/root.sh on the following nodes: 
[learnbytebybyte]


Successfully Setup Software.
Moved the install session logs to:
 /u01/app/oraInventory/logs/InstallActions2026-02-28_09-38-36AM

インストールが正常に完了すると、最後にSuccessfully Setup Software.と表示されます。

OUIのサイレントインストール後は、下記のスクリプトを実施するように案内されています。

As a root user, run the following script(s):
	1. /u01/app/oraInventory/orainstRoot.sh
	2. /u01/app/oracle/product/26.0.0/dbhome_1/root.sh

Run /u01/app/oraInventory/orainstRoot.sh on the following nodes: 
[learnbytebybyte]
Run /u01/app/oracle/product/26.0.0/dbhome_1/root.sh on the following nodes: 
[learnbytebybyte]

【失敗時の対処法】アンインストール

レスポンスファイルの設定を誤ったままインストールしてしまった場合は、deinstallを実行してソフトウェアをアンインストールし、レスポンスファイルを修正したうえで再度インストールを実行します。

[oracle@learnbytebybyte ~]$ cd /u01/app/oracle/product/26.0.0/dbhome_1/deinstall
[oracle@learnbytebybyte deinstall]$ ./deinstall
Checking for required files and bootstrapping ...
Please wait ...
Location of logs /tmp/deinstall2026-02-28_08-31-48AM/logs/

############ ORACLE DECONFIG TOOL START ############


######################### DECONFIG CHECK OPERATION START #########################
## [START] Install check configuration ##


Checking for existence of the Oracle home location /u01/app/oracle/product/26.0.0/dbhome_1
Oracle Home type selected for deinstall is: Oracle Single Instance Database
Oracle Base selected for deinstall is: /u01/app/oracle
Checking for existence of central inventory location /u01/app/oraInventory

## [END] Install check configuration ##

〜省略〜

######################### DECONFIG CHECK OPERATION END #########################


####################### DECONFIG CHECK OPERATION SUMMARY #######################
Oracle Home selected for deinstall is: /u01/app/oracle/product/26.0.0/dbhome_1
Inventory Location where the Oracle home registered is: /u01/app/oraInventory
Do you want to continue (y - yes, n - no)? [n]: y
A log of this session will be written to: '/tmp/deinstall2026-02-28_08-31-48AM/logs/deinstall_deconfig2026-02-28_08-31-51-AM.out'
Any error messages from this session will be written to: '/tmp/deinstall2026-02-28_08-31-48AM/logs/deinstall_deconfig2026-02-28_08-31-51-AM.err'

〜省略〜

######################## DEINSTALL CLEAN OPERATION START ########################
## [START] Preparing for Deinstall ##
Setting LOCAL_NODE to learnbytebybyte
Setting CRS_HOME to false
Setting oracle.installer.invPtrLoc to /tmp/deinstall2026-02-28_08-31-48AM/oraInst.loc
Setting oracle.installer.local to false

## [END] Preparing for Deinstall ##

Oracle Universal Installer clean START

Detach Oracle home 'OraDB23Home1' from the central inventory on the local node : Done

Delete directory '/u01/app/oracle/product/26.0.0/dbhome_1' on the local node : Done

Delete directory '/u01/app/oraInventory' on the local node : Done

Delete directory '/u01/app/oracle' on the local node : Done

You can find a log of this session at:
'/tmp/deinstall2026-02-28_08-31-48AM/logs/Cleanup2026-02-28_08-32-07AM.log'

Oracle Universal Installer clean END


## [START] Oracle install clean ##


## [END] Oracle install clean ##


######################### DEINSTALL CLEAN OPERATION END #########################


####################### DEINSTALL CLEAN OPERATION SUMMARY #######################
Successfully detached Oracle home 'OraDB23Home1' from the central inventory on the local node.
Successfully deleted directory '/u01/app/oracle/product/26.0.0/dbhome_1' on the local node.
Successfully deleted directory '/u01/app/oraInventory' on the local node.
Successfully deleted directory '/u01/app/oracle' on the local node.
Oracle Universal Installer cleanup was successful.

Oracle deinstall tool successfully cleaned up temporary directories.
#######################################################################


############# ORACLE DEINSTALL TOOL END #############

Oracle HOMEやOracle Inventoryのファイルパスを確認し、yを入力し続行すると以下のディレクトリが削除されます。

  • /u01/app/oracle/product/26.0.0/dbhome_1
  • /u01/app/oraInventory
  • /u01/app/oracle

インストール後の実行

OUIのサイレントインストール完了後は、案内されたスクリプトをrootユーザで実行します。

[root@learnbytebybyte ~]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
[root@learnbytebybyte ~]# /u01/app/oracle/product/26.0.0/dbhome_1/root.sh
Check /u01/app/oracle/product/26.0.0/dbhome_1/install/root_learnbytebybyte_2026-02-28_09-43-41-454356798.log for the output of root script

レスポンスファイル作成

次は、Oracle AI Database 26aiのデータベースを作成するために、DBCA(Database Configuration Assistant)用のレスポンスファイルを作成します。

OUI同様に、レスポンスファイルのフォルダに移動し、テンプレートのレスポンスファイルをバックアップしておきます。

今回は、シングルインスタンスのデータベースを作成するようにレスポンスファイルを編集します。

responseFileVersion=/oracle/assistants/rspfmt_dbca_response_schema_v23.0.0
gdbName=orcl
sid=orcl
databaseConfigType=SI
RACOneNodeServiceName=
policyManaged=
managementPolicy=
createServerPool=
serverPoolName=
cardinality=
force=
pqPoolName=
pqCardinality=
createAsContainerDatabase=true
numberOfPDBs=1
pdbName=orclpdb
useLocalUndoForPDBs=TRUE
pdbAdminPassword=<パスワード>
nodelist=
templateName=General_Purpose.dbc
sysPassword=<パスワード>
systemPassword=<パスワード>
oracleHomeUserPassword=<パスワード>
emConfiguration=NONE
runCVUChecks=TRUE
dbsnmpPassword=<パスワード>
omsHost=
omsPort=
emUser=
emPassword=
dvConfiguration=
dvUserName=
dvUserPassword=
dvAccountManagerName=
dvAccountManagerPassword=
olsConfiguration=
datafileJarLocation=
datafileDestination=
recoveryAreaDestination=
storageType=
diskGroupName=
asmsnmpPassword=
recoveryGroupName=
characterSet=AL32UTF8
nationalCharacterSet=AL16UTF16
registerWithDirService=
dirServiceUserName=
dirServicePassword=
walletPassword=
listeners=
variablesFile=
variables=processes=800,open_cursor=1200
initParams=
sampleSchema=FALSE
memoryPercentage=
databaseType=
automaticMemoryManagement=
totalMemory=4096

DBCAのサイレント構築

DBCA(Database Configuration Assistant)のレスポンスファイルを編集したら、oracleユーザでサイレントモード実行を行います。

[oracle@learnbytebybyte bin]$ ./dbca -silent -createDatabase -responseFile /u01/app/oracle/product/26.0.0/dbhome_1/assistants/dbca/dbca.rsp
[WARNING] [DBT-06208] The 'SYS' password entered does not conform to the Oracle recommended standards.
   CAUSE: 
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
   ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
[WARNING] [DBT-06208] The 'SYSTEM' password entered does not conform to the Oracle recommended standards.
   CAUSE: 
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
   ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
[WARNING] [DBT-06208] The 'PDBADMIN' password entered does not conform to the Oracle recommended standards.
   CAUSE: 
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
   ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
Prepare for db operation
8% complete
Copying database files
31% complete
Creating and starting Oracle instance
32% complete
36% complete
39% complete
42% complete
46% complete
Completing Database Creation
51% complete
53% complete
54% complete
Creating Pluggable Databases
58% complete
77% complete
Executing Post Configuration Actions
100% complete
Database creation complete. For details check the logfiles at:
 /u01/app/oracle/cfgtoollogs/dbca/orcl.
Database Information:
Global Database Name:orcl
System Identifier(SID):orcl
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/orcl/orcl.log" for further details.

最後に100% completeと表示され、Database creation complete.が出力されれば、DBCA によるデータベース作成は完了です。

環境変数の設定

.bash_profile等にORACLE_SID/ORACLE_BASE/ORACLE_HOMEを設定し、PATHを通します。

export ORACLE_SID=orcl
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/26.0.0/dbhome_1

export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH

export NLS_LANG=Japanese_Japan.AL32UTF8

umask 022

設定した環境変数を反映します。

[oracle@learnbytebybyte ~]$ . .bash_profile

ORACLE_SID環境変数が設定されていないと下記のエラーが発生することがあります。

あわせて読みたい
「ORA-12162: TNS: 指定されたNetサービス名は正しくありません。」の解決方法 僕の作業環境 OS:Oracle Linux 9.7 DB:Oracle AI Database 23.26.1.0.0 Enterprise Edition Oracle Linux上にOracle AI Databaseを構築後、またはOS再起動後に「ORA-1...

SQL*Plusで接続確認

Oracle AI Database 26aiにSQL*Plusで接続できました。

[oracle@learnbytebybyte ~]$ sqlplus / as sysdba

SQL*Plus: Release 23.26.1.0.0 - Production on 土 2月 28 11:16:33 2026
Version 23.26.1.0.0

Copyright (c) 1982, 2025, Oracle.  All rights reserved.



Oracle AI Database 26ai Enterprise Edition Release 23.26.1.0.0 - Production
Version 23.26.1.0.0
に接続されました。
SQL> show pdbs

    CON_ID CON_NAME			  OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
	 2 PDB$SEED			  READ ONLY  NO
	 3 ORCLPDB			  READ WRITE NO

自動起動・停止の設定

下記の記事は、Oracle公式ドキュメントに記載されているoratabdbstart/dbshutを活用したOracleインスタンスの起動・停止の自動化設定をまとめています。

あわせて読みたい
Oracle AI Databaseの起動・停止を自動化設定【OracleLinux 9.7】 OSを起動・再起動するたびにOracleインスタンスが停止してしまうと、毎回sqlplus / as sysdbaからstartupを打つのが手間です。 [oracle@learnbytebybyte ~]$ sqlplus / ...

まとめ

最後までご愛読ありがとうございました。

よかったらシェアしてね!
  • URLをコピーしました!
  • URLをコピーしました!

この記事を書いた人

情報系Fラン大学出身・新卒未経験からデータベースエンジニアに転身。
使用技術:Oracle|TypeScript
資格取得:情報処理安全確保支援士試験|応用情報技術者試験|OracleMaster Gold DBA|OCI Architect Associate

目次