Oracle 26ai静默安装全攻略,无需图形界面轻松部署
2026/8/4 19:14:47 网站建设 项目流程

Oracle 26ai 作为划时代的版本,将AI算法直接融入了数据库内核。如果你想尝鲜体验强大的 AI 能力,却又不想在安装部署上耗费太多精力,那么这篇教程正是为你准备的。

[root@ora26ai media]# cat /etc/redhat-releaseCentOS Linux release8.4.2105

内存配置:

[root@ora26ai media]# free -mtotal usedfreeshared buff/cache available Mem:233611716156472438599819034Swap:814708147

磁盘配置:

[root@ora26ai media]# df -hFilesystem Size Used Avail Use% Mounted on overlay 246G 187G 60G76% / tmpfs 64M064M0% /dev tmpfs 12G012G0% /sys/fs/cgroup shm 64M064M0% /dev/shm /dev/mapper/centos-root 246G 187G 60G76% /media tmpfs 12G8.4M 12G1% /run
systemctl status firewalld.service systemctl stop firewalld.service systemctl disable firewalld.service
sed-i's/SELINUX=enforcing/SELINUX=disabled/'/etc/selinux/config

说明:关于oracle用户创建、OS内核参数配置、系统依赖包等可以使用oracle-database-preinstall rpm安装包进行快速配置,当然你也可以选择手动配置。

相关下载地址:

  • Preinstall RPM包:

  • 数据库安装包:

上传安装介质并安装:

[root@ora26ai ~]# mkdir -p /u01/media[root@ora26ai media]# lsLINUX.X64_2326100_db_home.zip oracle-ai-database-preinstall-26ai-1.0-1.el8.x86_64.rpm[root@ora26ai media]# yum install oracle-ai-database-preinstall-26ai-1.0-1.el8.x86_64.rpm -y

安装成功后,oracle用户已自动创建,依赖包和内核参数也已配置完成:

[root@ora26ai media]# id oracleuid=54321(oracle)gid=54321(oinstall)groups=54321(oinstall),54322(dba),54323(oper),54324(backupdba),54325(dgdba),54326(kmdba),54330(racdba)

内核参数配置:

[root@ora26ai media]# cat /etc/sysctl.conf# sysctl settings are defined through files in# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.## Vendors settings live in /usr/lib/sysctl.d/.# To override a whole file, create a new file with the same in# /etc/sysctl.d/ and put new settings there. To override# only specific settings, add a file with a lexically later# name in /etc/sysctl.d/ and put new settings there.## For more information, see sysctl.conf(5) and sysctl.d(5).# oracle-ai-database-preinstall-26ai setting for fs.file-max is 6815744fs.file-max=6815744# oracle-ai-database-preinstall-26ai setting for kernel.sem is '250 32000 100 128'kernel.sem=25032000100128# oracle-ai-database-preinstall-26ai setting for kernel.shmmni is 4096kernel.shmmni=4096# oracle-ai-database-preinstall-26ai setting for kernel.shmall is 1073741824 on x86_64kernel.shmall=1073741824# oracle-ai-database-preinstall-26ai setting for kernel.shmmax is 4398046511104 on x86_64kernel.shmmax=4398046511104# oracle-ai-database-preinstall-26ai setting for kernel.panic_on_oops is 1 per Orabug 19212317kernel.panic_on_oops=1# oracle-ai-database-preinstall-26ai setting for net.core.rmem_default is 262144net.core.rmem_default=262144# oracle-ai-database-preinstall-26ai setting for net.core.rmem_max is 4194304net.core.rmem_max=4194304# oracle-ai-database-preinstall-26ai setting for net.core.wmem_default is 262144net.core.wmem_default=262144# oracle-ai-database-preinstall-26ai setting for net.core.wmem_max is 1048576net.core.wmem_max=1048576# oracle-ai-database-preinstall-26ai setting for net.ipv4.conf.all.rp_filter is 2net.ipv4.conf.all.rp_filter=2# oracle-ai-database-preinstall-26ai setting for net.ipv4.conf.default.rp_filter is 2net.ipv4.conf.default.rp_filter=2# oracle-ai-database-preinstall-26ai setting for fs.aio-max-nr is 1048576fs.aio-max-nr=1048576# oracle-ai-database-preinstall-26ai setting for vm.hugetlb_shm_group is gid of primary group of 'oracle' uservm.hugetlb_shm_group=54321# oracle-ai-database-preinstall-26ai setting special parameters BEGIN# oracle-ai-database-preinstall-26ai setting for kernel.panic is 10kernel.panic=10# oracle-ai-database-preinstall-26ai setting for net.ipv4.ip_local_port_range is 9000 65535net.ipv4.ip_local_port_range=900065535# oracle-ai-database-preinstall-26ai setting special parameters END
[root@ora26ai media]# su - oracle[oracle@ora26ai ~]$env|grepORA[oracle@ora26ai ~]$vi.bash_profile

添加以下内容:

exportORACLE_BASE=/u01/app/oracleexportORACLE_HOME=/u01/app/oracle/product/23.26.1/db_1exportPATH=$PATH:$JAVA_HOME/bin:$ORACLE_HOME/bin:$ORACLE_HOME/OPatchexportORACLE_SID=ora26aiexportLD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:$LD_LIBRARY_PATHexportCLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
[oracle@ora26ai ~]$source.bash_profile
[root@ora26ai media]# mkdir -p /u01/app/oracle/product/23.26.1/db_1[root@ora26ai media]# chown -R oracle:oinstall /u01/[root@ora26ai media]# chmod -R 775 /u01/
[root@ora26ai media]# su - oracle[oracle@ora26ai ~]$cd/u01/media/[oracle@ora26ai media]$lsLINUX.X64_2326100_db_home.zip oracle-ai-database-preinstall-26ai-1.0-1.el8.x86_64.rpm[oracle@ora26ai media]$unzip-qLINUX.X64_2326100_db_home.zip-d$ORACLE_HOME
[oracle@ora26ai media]$cp$ORACLE_HOME/install/response/db_install.rsp /u01/media/[oracle@ora26ai media]$catdb_install.rsp|grep-v'^#'|grep-v'^$'

配置内容:

oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v23.0.0installOption=INSTALL_DB_SWONLYUNIX_GROUP_NAME=oinstallINVENTORY_LOCATION=/u01/app/oraInventoryORACLE_HOME=/u01/app/oracle/product/23.26.1/db_1ORACLE_BASE=/u01/app/oracleinstallEdition=EEOSDBA=dbaOSOPER=operOSBACKUPDBA=backupdbaOSDGDBA=dgdbaOSKMDBA=kmdbaOSRACDBA=racdba
[oracle@ora26ai media]$cd$ORACLE_HOME[oracle@ora26ai db_1]$ ./runInstaller-silent-responseFile/u01/media/db_install.rsp-ignorePrereqLaunching Oracle AI Database Setup Wizard...[WARNING][INS-13013]Target environment does not meet some mandatory requirements. CAUSE: Some of the mandatory prerequisites are not met. See logsfordetails. /tmp/InstallActions2026-04-08_09-00-16PM/installActions2026-04-08_09-00-16PM.log. ACTION: Identify the list of failed prerequisite checks from the log: /tmp/InstallActions2026-04-08_09-00-16PM/installActions2026-04-08_09-00-16PM.log. Then either from the logfileor from installation manualfindthe appropriate configuration to meet the prerequisites and fix it manually. The responsefileforthis session can be found at: /u01/app/oracle/product/23.26.1/db_1/install/response/db_2026-04-08_09-00-16PM.rsp You canfindthe log of thisinstallsession at: /tmp/InstallActions2026-04-08_09-00-16PM/installActions2026-04-08_09-00-16PM.log As a root user, run the following script(s):1. /u01/app/oraInventory/orainstRoot.sh2. /u01/app/oracle/product/23.26.1/db_1/root.sh Run /u01/app/oraInventory/orainstRoot.sh on the following nodes:[ora26ai]Run /u01/app/oracle/product/23.26.1/db_1/root.sh on the following nodes:[ora26ai]Successfully Setup Software with warning(s). Moved theinstallsession logs to: /u01/app/oraInventory/logs/InstallActions2026-04-08_09-00-16PM

安装结束后需要以root用户执行以下两个脚本:

[root@ora26ai ~]# /u01/app/oraInventory/orainstRoot.shChanging permissions of /u01/app/oraInventory. Adding read,write permissionsforgroup. Removing read,write,execute permissionsforworld. Changing groupname of /u01/app/oraInventory to oinstall. The execution of the script is complete.
[root@ora26ai ~]# /u01/app/oracle/product/23.26.1/db_1/root.shCheck /u01/app/oracle/product/23.26.1/db_1/install/root_ora26ai_2026-04-08_21-04-32-378280336.logforthe output of root script
# mkdir -p /u01/oradata/# mkdir -p /u01/oradata/fast_recovery_area# chown -R oracle:oinstall /u01/oradata/
[oracle@ora26ai media]$ dbca-silent-createDatabase\-templateNameGeneral_Purpose.dbc\-gdbnameora26ai-sidora26ai-responseFileNO_VALUE\-characterSetAL32UTF8\-nationalCharacterSetUTF8\-sysPasswordOraoracle\-systemPasswordOraoracle\-createAsContainerDatabasetrue\-numberOfPDBs2\-pdbNamepdb\-pdbAdminPasswordOraoracle\-databaseTypeOLTP\-automaticMemoryManagementfalse\-totalMemory4096\-storageTypeFS\-datafileDestination/u01/oradata/\-recoveryAreaDestination/u01/oradata/fast_recovery_area\-recoveryAreaSize10000\-redoLogFileSize200\-ignorePreReqs\-enableArchiveTRUE\-useOMFtrue

执行输出:

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 63% complete 77% complete Executing Post Configuration Actions 100% complete Database creation complete. For details check the logfiles at: /u01/app/oracle/cfgtoollogs/dbca/ora26ai. Database Information: Global Database Name:ora26ai System Identifier(SID):ora26ai Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/ora26ai/ora26ai.log" for further details.
[oracle@ora26ai media]$ netca-silent-responseFile$ORACLE_HOME/assistants/netca/netca.rsp Parsingcommandline arguments: Parameter"silent"=trueParameter"responsefile"=/u01/app/oracle/product/23.26.1/db_1/assistants/netca/netca.rsp Done parsingcommandline arguments. Oracle Net Services Configuration: Profile configuration complete. Oracle Net Listener Startup: Running Listener Control: /u01/app/oracle/product/23.26.1/db_1/bin/lsnrctl start LISTENER Listener Control complete. Listener started successfully. Listener configuration complete. Oracle Net Services configuration successful. Theexitcode is0

查看监听状态:

[oracle@ora26ai media]$ lsnrctl status LSNRCTLforLinux: Version23.26.1.0.0 - Production on 08-APR-202621:49:50 Copyright(c)1991,2026, Oracle. All rights reserved. Connecting to(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=0.0.0.0)(PORT=1521)))STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNRforLinux: Version23.26.1.0.0 - Production Start Date 08-APR-202621:48:46 Uptime0days0hr.1min.4sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/oracle/product/23.26.1/db_1/network/admin/listener.ora Listener Log File /u01/app/oracle/diag/tnslsnr/ora26ai/listener/alert/log.xml Listening Endpoints Summary...(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))Services Summary... Service"48945b67d121c623e063399b5e6478e6"has1instance(s). Instance"ora26ai", status READY, has1handler(s)forthis service... Service"4ef3cc0d9bec929ae063270a0a0a1be6"has1instance(s). Instance"ora26ai", status READY, has1handler(s)forthis service... Service"4ef3cd2592ef9379e063270a0a0a2724"has1instance(s). Instance"ora26ai", status READY, has1handler(s)forthis service... Service"ora26ai"has1instance(s). Instance"ora26ai", status READY, has1handler(s)forthis service... Service"ora26aiXDB"has1instance(s). Instance"ora26ai", status READY, has1handler(s)forthis service... Service"pdb1"has1instance(s). Instance"ora26ai", status READY, has1handler(s)forthis service... Service"pdb2"has1instance(s). Instance"ora26ai", status READY, has1handler(s)forthis service... Thecommandcompleted successfully

验证数据库连接:

[oracle@ora26ai media]$ sqlplus / as sysdba SQL*Plus: Release23.26.1.0.0 - Production on Wed Apr821:50:452026Version23.26.1.0.0 Copyright(c)1982,2025, Oracle. All rights reserved. Connected to: Oracle AI Database 26ai Enterprise Edition Release23.26.1.0.0 - Production Version23.26.1.0.0 SQL>show pdbs;CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ----------2PDB$SEEDREAD ONLY NO3PDB1 READ WRITE NO4PDB2 READ WRITE NO SQL>archive log list;Database log mode Archive Mode Automatic archival Enabled Archive destination USE_DB_RECOVERY_FILE_DEST Oldest online log sequence2Next log sequence to archive2Current log sequence1

至此,Oracle 26ai 静默安装已全部完成,你的Oracle AI数据库已经准备就绪,可以开始体验AI增强的数据库功能了!

需要专业的网站建设服务?

联系我们获取免费的网站建设咨询和方案报价,让我们帮助您实现业务目标

立即咨询