Step by Step installation of Oracle database 23c

An RPM can be used to install Oracle Linux 8’s free development release of Oracle 23c.
The RPM installation of Oracle Database 23c free 64-bit on Oracle Linux 8 (OL8) 64-bit is covered in this article.

Below are the steps to install oracle 23c silently .

Hosts File

Check and edit, the /etc/hosts must contain a fully qualified name for the server.

[root@instance-2-test ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
10.0.0.41 instance-2-test.localdomain  instance-2-test


set the correct hostname in file “/etc/hostname file”.

[root@instance-2-test~]# cat /etc/hostname
instance-2-test

Oracle Installation

Download the respective RPM from download page of oracle.
oracle-database-preinstall-23c-1.0-0.5.el8.x86_64.rpm
oracle-database-free-23c-1.0-1.el8.x86_64.rpm

once download completed from above RPMS, we are copying these RPM from local machine to server through
Winscp.

[root@instance-2-test tmp]# pwd
/tmp
[root@instance-2-test tmp]# ls -lrt or*
-rw-rw-r–. 1 opc opc 1758776440 May 17 03:30 oracle-database-free-23c-1.0-1.el8.x86_64.rpm
-rw-rw-r–. 1 opc opc 30688 May 17 03:45 oracle-database-preinstall-23c-1.0-0.5.el8.x86_64.rpm

Install the prerequisites and oracle database binary through root user.

[root@instance-2-test tmp]# dnf -y localinstall /tmp/oracle-database-preinstall-23c-1.0-0.5.el8.x86_64.rpm
Last metadata expiration check: 3:48:05 ago on Wed 17 May 2023 12:01:24 AM GMT.

Dependencies resolved.

Package Architecture Version Repository Size

Installing:
oracle-database-preinstall-23c x86_64 1.0-0.5.el8 @commandline 30 k

Transaction Summary

Install 1 Package

Total size: 30 k
Installed size: 77 k
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : oracle-database-preinstall-23c-1.0-0.5.el8.x86_64 1/1
Running scriptlet: oracle-database-preinstall-23c-1.0-0.5.el8.x86_64 1/1
Verifying : oracle-database-preinstall-23c-1.0-0.5.el8.x86_64 1/1

Installed:
oracle-database-preinstall-23c-1.0-0.5.el8.x86_64

Complete!
[root@instance-2-test tmp]# dnf -y localinstall /tmp/oracle-database-free-23c-1.0-1.el8.x86_64.rpm
Last metadata expiration check: 3:48:42 ago on Wed 17 May 2023 12:01:24 AM GMT.

Dependencies resolved.

Package Architecture Version Repository Size

Installing:
oracle-database-free-23c x86_64 1.0-1 @commandline 1.6 G

Transaction Summary

Install 1 Package

Total size: 1.6 G
Installed size: 5.2 G
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Running scriptlet: oracle-database-free-23c-1.0-1.x86_64 1/1
Installing : oracle-database-free-23c-1.0-1.x86_64 1/1
Running scriptlet: oracle-database-free-23c-1.0-1.x86_64 1/1
[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-23c.conf' and then run '/etc/init.d/oracle-free-23c configure' as root.

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

Installed:
oracle-database-free-23c-1.0-1.x86_64

Complete!

Create Database

[root@instance-2-test dbhomeFree]# export DB_PASSWORD=SysPassword1
[root@instance-2-test dbhomeFree]# (echo "${DB_PASSWORD}"; echo "${DB_PASSWORD}";) | /etc/init.d/oracle-free-23c 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: instance-2-mangodb/FREEPDB1
     Multitenant container database: instance-2-mangodb
	 
	 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.

Using-It

Now switch to oracle user and connect to database.

[oracle@instance-2-test ~]$ export ORACLE_HOME=/opt/oracle/product/23c/dbhomeFree
[oracle@instance-2-test ~]$ export PATH=$ORACLE_HOME/bin:$PATH
[oracle@instance-2-test ~]$ sqlplus sys/SysPassword1@//localhost:1521/free as sysdba
SQL*Plus: Release 23.0.0.0.0 - Developer-Release on Wed May 17 04:08:28 2023
Version 23.2.0.0.0

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


Connected to:
Oracle Database 23c Free, Release 23.0.0.0.0 - Developer-Release
Version 23.2.0.0.0

SQL> select name,open_mode from v$database;

NAME      OPEN_MODE
--------- --------------------
FREE      READ WRITE

SQL> show pdbs;

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

Now connect to PDB directly.

[oracle@instance-2-test ~]$ sqlplus sys/SysPassword1@//localhost:1521/freepdb1 as sysdba

SQL*Plus: Release 23.0.0.0.0 - Developer-Release on Wed May 17 04:09:09 2023
Version 23.2.0.0.0

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


Connected to:
Oracle Database 23c Free, Release 23.0.0.0.0 - Developer-Release
Version 23.2.0.0.0

SQL> show user;
USER is "SYS"
SQL> show con_name;

CON_NAME
------------------------------
FREEPDB1

The following commands can be used by the root user to stop and start the service of database.

[root@instance-2-test ~]# /etc/init.d/oracle-free-23c stop
Shutting down Oracle Database instance FREE.
Oracle Database instance FREE shut down.
Stopping Oracle Net Listener.
Oracle Net Listener stopped.

[root@instance-2-test ~]# /etc/init.d/oracle-free-23c start
Starting Oracle Net Listener.
Oracle Net Listener started.
Starting Oracle Database instance FREE.
Oracle Database instance FREE started.



Leave a Reply

Your email address will not be published. Required fields are marked *