DBA Hub

📋Steps in this guide1/5

Oracle Database 23ai Free RPM Installation On Oracle Linux 9 (OL9)

This article describes the RPM installation of Oracle Database 23ai Free 64-bit on Oracle Linux 9 (OL9) 64-bit.

oracle 23configurationintermediate
by OracleDba
12 views
1

Hosts File

The "/etc/hosts" file must contain a fully qualified name for the server. For example. Set the correct hostname in the "/etc/hostname" file.

Code/Command (click line numbers to comment):

1
2
3
4
5
6
<IP-address>  <fully-qualified-machine-name>  <machine-name>

127.0.0.1       localhost localhost.localdomain localhost4 localhost4.localdomain4
192.168.56.107  ol9-23.localdomain  ol9-23

ol9-23.localdomain
2

Oracle Installation

Download the relevant RPM from download page here . - oracle-database-free-23ai-1.0-1.el9.x86_64.rpm With the RPM file downloaded, we can install the Oracle prerequisites using the following commands as the "root" user. We now install the 23ai software using the following command as the root user. This assumes the RPM file is in the "/tmp" directory. The for the software installation is "/opt/oracle/product/23ai/dbhomeFree".

Code/Command (click line numbers to comment):

1
2
3
dnf install -y oracle-database-preinstall-23ai

dnf -y localinstall /tmp/oracle-database-free-23ai-1.0-1.el9.x86_64.rpm
3

Create Database

In addition to the software installation, the RPM creates a script that allows us to create a demo database called "FREE", with a pluggable database (PDB) called "FREEPDB1". In the following example we set the environment variable so we can do a silent database creation using the script. We can of course create a database in the normal way, using the Database Configuration Assistant (DBCA). We don't have to use this script.

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#
export DB_PASSWORD=SysPassword1
#
(echo "${DB_PASSWORD}"; echo "${DB_PASSWORD}";) | /etc/init.d/oracle-free-23ai configure
Specify a password to be used for database accounts. 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]. Note that the same password will be used for SYS, SYSTEM and PDBADMIN accounts:
Confirm the password:
Configuring Oracle Listener.
Listener configuration succeeded.
Configuring Oracle Database FREE.
Enter SYS user password:
*************
Enter SYSTEM user password:
**************
Enter PDBADMIN User Password:
************
Prepare for db operation
7% complete
Copying database files
29% complete
Creating and starting Oracle instance
30% complete
33% complete
36% complete
39% complete
43% complete
Completing Database Creation
47% complete
49% complete
50% complete
Creating Pluggable Databases
54% complete
71% complete
Executing Post Configuration Actions
93% complete
Running Custom Scripts
100% complete
Database creation complete. For details check the logfiles at:
 /opt/oracle/cfgtoollogs/dbca/FREE.
Database Information:
Global Database Name:FREE
System Identifier(SID):FREE
Look at the log file "/opt/oracle/cfgtoollogs/dbca/FREE/FREE.log" for further details.

Connect to Oracle Database using one of the connect strings:
     Pluggable database: localhost.localdomain/FREEPDB1
     Multitenant container database: localhost.localdomain
[root@localhost yum.repos.d]#
4

Using-It

From the "oracle" user we can connect as follows. We can stop and start the service from the root user with the following commands.

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
export ORACLE_HOME=/opt/oracle/product/23ai/dbhomeFree
export PATH=$ORACLE_HOME/bin:$PATH

-- Root container
sqlplus sys/SysPassword1@//localhost:1521/free as sysdba

-- Pluggable database
sqlplus sys/SysPassword1@//localhost:1521/freepdb1 as sysdba

/etc/init.d/oracle-free-23ai stop
/etc/init.d/oracle-free-23ai start
5

Vagrant Example

If you want to see it in action, you might want to try one of these Vagrant build. - ol9_23_free For more information see: - Installing Oracle Database Free - Automating Database Startup and Shutdown on Linux - Oracle Universal Installations (OUI) Silent Installations - Database Configuration Assistant (DBCA) : Creating Databases in Silent Mode Hope this helps. Regards Tim...

Comments (0)

Please to add comments

No comments yet. Be the first to comment!