Tuesday, May 28, 2024

Oracle Database free 23ai installation on Linux 8.x (Redhat, Oracle Linux)


The Database Installation RPM can be downloaded from https://download.oracle.com/otn-pub/otn_software/db-free/oracle-database-free-23ai-1.0-1.el8.x86_64.rpm

For other Linux versions the download link is available at https://www.oracle.com/database/free/get-started/


[root@oralinux87 oracle]# ll

total 1345920

-rw-r--r--. 1 root   root     1378076936 May 27 17:46 oracle-database-free-23ai-1.0-1.el8.x86_64.rpm

-rw-r--r--. 1 oracle oinstall     141655 May 27 17:34 wget-log


Install Database 23ai using dnf command.


[root@oralinux87 oracle]# dnf install -y oracle-database-free-23ai-1.0-1.el8.x86_64.rpm

Last metadata expiration check: 0:05:29 ago on Mon 27 May 2024 05:42:05 PM CDT.

Dependencies resolved.

=============================================================================================================================================================================================================================================

 Package                                                                Architecture                                  Version                                                     Repository                                            Size

=============================================================================================================================================================================================================================================

Installing:

 oracle-database-free-23ai                                              x86_64                                        1.0-1                                                       @commandline                                         1.3 G

Installing dependencies:

 compat-openssl10                                                       x86_64                                        1:1.0.2o-4.el8_6                                            ol8_appstream                                        1.1 M

 ksh                                                                    x86_64                                        20120801-267.0.1.el8                                        ol8_appstream                                        923 k

 oracle-database-preinstall-23ai                                        x86_64                                        1.0-2.el8                                                   ol8_appstream                                         30 k


Transaction Summary

=============================================================================================================================================================================================================================================

Install  4 Packages


Total size: 1.3 G

Total download size: 2.1 M

Installed size: 3.6 G

Downloading Packages:

(1/3): oracle-database-preinstall-23ai-1.0-2.el8.x86_64.rpm                                                                                                                                                  172 kB/s |  30 kB     00:00

(2/3): compat-openssl10-1.0.2o-4.el8_6.x86_64.rpm                                                                                                                                                            2.2 MB/s | 1.1 MB     00:00

(3/3): ksh-20120801-267.0.1.el8.x86_64.rpm                                                                                                                                                                   373 kB/s | 923 kB     00:02

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Total                                                                                                                                                                                                        848 kB/s | 2.1 MB     00:02

Running transaction check

Transaction check succeeded.

Running transaction test

Transaction test succeeded.

Running transaction

  Preparing        :                                                                                                                                                                                                                     1/1

  Installing       : ksh-20120801-267.0.1.el8.x86_64                                                                                                                                                                                     1/4

  Running scriptlet: ksh-20120801-267.0.1.el8.x86_64                                                                                                                                                                                     1/4

  Installing       : compat-openssl10-1:1.0.2o-4.el8_6.x86_64                                                                                                                                                                            2/4

  Running scriptlet: compat-openssl10-1:1.0.2o-4.el8_6.x86_64                                                                                                                                                                            2/4

  Installing       : oracle-database-preinstall-23ai-1.0-2.el8.x86_64                                                                                                                                                                    3/4

  Running scriptlet: oracle-database-free-23ai-1.0-1.x86_64                                                                                                                                                                              4/4

  Installing       : oracle-database-free-23ai-1.0-1.x86_64                                                                                                                                                                              4/4

  Running scriptlet: oracle-database-free-23ai-1.0-1.x86_64                                                                                                                                                                              4/4

[INFO] Executing post installation scripts...

[INFO] Oracle home installed successfully and ready to be configured.

To configure Oracle Database Free, optionally modify the parameters in '/etc/sysconfig/oracle-free-23ai.conf' and then run '/etc/init.d/oracle-free-23ai configure' as root.


  Running scriptlet: oracle-database-preinstall-23ai-1.0-2.el8.x86_64                                                                                                                                                                    4/4

  Running scriptlet: oracle-database-free-23ai-1.0-1.x86_64                                                                                                                                                                              4/4

  Verifying        : compat-openssl10-1:1.0.2o-4.el8_6.x86_64                                                                                                                                                                            1/4

  Verifying        : ksh-20120801-267.0.1.el8.x86_64                                                                                                                                                                                     2/4

  Verifying        : oracle-database-preinstall-23ai-1.0-2.el8.x86_64                                                                                                                                                                    3/4

  Verifying        : oracle-database-free-23ai-1.0-1.x86_64                                                                                                                                                                              4/4


Installed:

  compat-openssl10-1:1.0.2o-4.el8_6.x86_64                   ksh-20120801-267.0.1.el8.x86_64                   oracle-database-free-23ai-1.0-1.x86_64                   oracle-database-preinstall-23ai-1.0-2.el8.x86_64


Complete!

[root@oralinux87 oracle]#



Configure the database using /etc/init.d/oracle-free-23ai. It will create a PDB called FREEPDB1 in 23ai database and the ask for the password. The given password is common for sys, system and pdbadmin users.

The configuration with default settings as below. If we want to modify the settings then edit the /etc/sysconfig/oracle-free-23ai.conf file.

# LISTENER PORT used Database listener, Leave empty for automatic port assignment
LISTENER_PORT=

# Character set of the database
CHARSET=AL32UTF8

# Database file directory
# If not specified, database files are stored under Oracle base/oradata
DBFILE_DEST=

# DB Domain name
DB_DOMAIN=

# Configure TDE
CONFIGURE_TDE=false

# Encrypt Tablespaces list, Leave empty for user tablespace alone or provide ALL for encrypting all tablespaces
# For specific tablespaces use SYSTEM:true,SYSAUX:false
ENCRYPT_TABLESPACES=

# SKIP Validations, memory, space
SKIP_VALIDATIONS=FALSE


[root@oralinux87 oracle]# ls -lrt /etc/init.d/

total 48

-rw-r--r--. 1 root root 18434 Aug 10  2022 functions

-rw-r--r--. 1 root root  1161 Nov  9  2022 README

-r-xr-xr-x. 1 root root 20518 Apr 24 14:46 oracle-free-23ai

[root@oralinux87 oracle]# /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: oralinux87/FREEPDB1

     Multitenant container database: oralinux87


We need to set ORACLE environment variables to access the executables. For that we need to Oracle database home location.

It can be identified from Central inventory and its location can be found using /etc/oraInst.loc file.


[root@oralinux87 oracle]# cat /etc/oraInst.loc

inventory_loc=/opt/oracle/oraInventory    -----------> Central Inventory location.

inst_group=oinstall


[root@oralinux87 oracle]# cd /opt/oracle/oraInventory

[root@oralinux87 oraInventory]# ls -lrt

total 12

-rwxrwx---. 1 oracle oinstall 1644 May 27 17:53 orainstRoot.sh

-rw-rw----. 1 oracle oinstall   59 May 27 17:53 oraInst.loc

drwxrwx---. 2 oracle oinstall 4096 May 27 17:53 logs

drwxrwx---. 2 oracle oinstall   60 May 27 17:53 ContentsXML

[root@oralinux87 oraInventory]# cd ContentsXML/

[root@oralinux87 ContentsXML]# ll

total 12

-rw-rw----. 1 oracle oinstall 300 May 27 17:53 comps.xml

-rw-rw----. 1 oracle oinstall 479 May 27 17:53 inventory.xml   ---> It has all oracle home details.

-rw-rw----. 1 oracle oinstall 292 May 27 17:53 libs.xml

[root@oralinux87 ContentsXML]# cat inventory.xml

<?xml version="1.0" standalone="yes" ?>

<!-- Copyright (c) 1999, 2024, Oracle and/or its affiliates.

All rights reserved. -->

<!-- Do not modify the contents of this file by hand. -->

<INVENTORY>

<VERSION_INFO>

   <SAVED_WITH>12.2.0.9.0</SAVED_WITH>

   <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>

</VERSION_INFO>

<HOME_LIST>

<HOME NAME="OraDBHome23aiFree" LOC="/opt/oracle/product/23ai/dbhomeFree" TYPE="O" IDX="1"/>      ---> We could see Oracle 23ai Installation location.

</HOME_LIST>

<COMPOSITEHOME_LIST>

</COMPOSITEHOME_LIST>

</INVENTORY>


[root@oralinux87 ContentsXML]# cd /opt/oracle/product/23ai/dbhomeFree

[root@oralinux87 dbhomeFree]# pwd

/opt/oracle/product/23ai/dbhomeFree

[root@oralinux87 dbhomeFree]# echo $ORACLE_HOME


[root@oralinux87 dbhomeFree]# sudo su - oracle

[oracle@oralinux87 ~]$ export ORACLE_HOME=/opt/oracle/product/23ai/dbhomeFree

[oracle@oralinux87 ~]$ export PATH=$ORACLE_HOME/bin:$PATH

[oracle@oralinux87 ~]$ sqlplus sys@localhost:1521/FREEPDB1 as sysdba


SQL*Plus: Release 23.0.0.0.0 - Production on Mon Version 23.4.0.24.05

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

Enter password:

Connected to:

Oracle Database 23ai Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free

Version 23.4.0.24.05


SQL> show pdbs


    CON_ID CON_NAME                       OPEN MODE  RESTRICTED

---------- ------------------------------ ---------- ----------

         3 FREEPDB1                       READ WRITE NO

SQL>


No comments:

Post a Comment

 OCI IAM - OCI Command line - Uploading API Keys to User in Default and Custom Domain In our previous post, we explored how to create users ...