Saturday, October 28, 2023


 I am using VirtualBox 6.1 for my database installations, each running on an Oracle Linux VM. Here is the step by step demonstration to install Oracle Database 23c Free on Oracle Linux 8.

Here we go..

  1. Download and Install Oracle Linux 8 from https://yum.oracle.com/oracle-linux-isos.html
  2. Download the database pre-install package: https://yum.oracle.com/repo/OracleLinux/OL8/developer/x86_64/getPackage/oracle-database-preinstall-23c-1.0-0.5.el8.x86_64.rpm
    and install it as root in your OL8 machine:
    [root@srlab sf_Oracle]# cd 23c
    [root@srlab 23c]# ls -lrt
    total 1717588
    -rwxrwx — -. 1 root vboxsf 1758776440 Apr 4 2023 oracle-database-free-23c-1.0–1.el8.x86_64.rpm
    -rwxrwx — -. 1 root vboxsf 30688 Oct 27 23:19 oracle-database-preinstall-23c-1.0–0.5.el8.x86_64.rpm

[root@srlab 23c]# yum install oracle-database-preinstall-23c-1.0–0.5.el8.x86_64.rpm
Last metadata expiration check: 15:20:02 ago on Fri 27 Oct 2023 09:09:24 AM IST.
Dependencies resolved.
======================================================================================================================================================
Package Architecture Version Repository Size
======================================================================================================================================================
Installing:
oracle-database-preinstall-23c x86_64 1.0–0.5.el8 
@commandline 30 k
Installing dependencies:
compat-openssl10 x86_64 1:1.0.2o-4.el8_6 ol8_appstream 1.1 M
ksh x86_64 20120801–257.0.1.el8 ol8_appstream 929 k
libnsl x86_64 2.28–225.0.4.el8_8.6 ol8_baseos_latest 108 k

Transaction Summary
======================================================================================================================================================
Install 4 Packages

Total size: 2.2 M
Total download size: 2.1 M
Installed size: 6.3 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): libnsl-2.28–225.0.4.el8_8.6.x86_64.rpm 159 kB/s | 108 kB 00:00
(2/3): ksh-20120801–257.0.1.el8.x86_64.rpm 693 kB/s | 929 kB 00:01
(3/3): compat-openssl10–1.0.2o-4.el8_6.x86_64.rpm 685 kB/s | 1.1 MB 00:01
— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —
Total 1.2 MB/s | 2.1 MB 00:01
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : ksh-20120801–257.0.1.el8.x86_64 1/4
Running scriptlet: ksh-20120801–257.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
/sbin/ldconfig: /etc/ld.so.conf.d/kernel-5.4.17–2011.1.2.el8uek.x86_64.conf:6: hwcap directive ignored

Installing : libnsl-2.28–225.0.4.el8_8.6.x86_64 3/4
Installing : oracle-database-preinstall-23c-1.0–0.5.el8.x86_64 4/4
Running scriptlet: oracle-database-preinstall-23c-1.0–0.5.el8.x86_64 4/4
/sbin/ldconfig: /etc/ld.so.conf.d/kernel-5.4.17–2011.1.2.el8uek.x86_64.conf:6: hwcap directive ignored

Verifying : libnsl-2.28–225.0.4.el8_8.6.x86_64 1/4
Verifying : compat-openssl10–1:1.0.2o-4.el8_6.x86_64 2/4
Verifying : ksh-20120801–257.0.1.el8.x86_64 3/4
Verifying : oracle-database-preinstall-23c-1.0–0.5.el8.x86_64 4/4

Installed:
compat-openssl10–1:1.0.2o-4.el8_6.x86_64 ksh-20120801–257.0.1.el8.x86_64 libnsl-2.28–225.0.4.el8_8.6.x86_64
oracle-database-preinstall-23c-1.0–0.5.el8.x86_64

Complete!

3. Download the Oracle Database 23c Free RPM:
https://download.oracle.com/otn-pub/otn_software/db-free/oracle-database-free-23c-1.0-1.el8.x86_64.rpm
and install it as root:

[root@srlab 23c]# yum install -y oracle-database-free-23c-1.0–1.el8.x86_64.rpm
Last metadata expiration check: 15:24:45 ago on Fri 27 Oct 2023 09:09:24 AM IST.
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.

/sbin/ldconfig: /etc/ld.so.conf.d/kernel-5.4.17–2011.1.2.el8uek.x86_64.conf:6: hwcap directive ignored

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

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

Complete!

4. Run the initialization script as directed, entering the privileged user password when prompted:
[root@srlab ~]# /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.
ORACLEListener 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: srlab.localdomain/FREEPDB1
Multitenant container database: srlab.localdomain
[root@srlab ~]# ps -ef |grep pmon
oracle 9147 1 0 13:58 ? 00:00:00 db_pmon_FREE
root 9987 6062 0 14:14 pts/1 00:00:00 grep — color=auto pmon
[root@srlab ~]# ps -ef |grep tns
root 21 2 0 13:26 ? 00:00:00 [netns]
oracle 6172 1 0 13:42 ? 00:00:00 /opt/oracle/product/23c/dbhomeFree/bin/tnslsnr LISTENER -inherit
root 9997 6062 0 14:14 pts/1 00:00:00 grep — color=auto tns

5. Make sure the DB is auto-started when the machine boots:
[root@srlab ~]# systemctl enable oracle-free-23c
oracle-free-23c.service is not a native service, redirecting to systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable oracle-free-23c

6. Edit /etc/oratab and change N to Y in the FREE line:

[root@srlab ~]# cat /etc/oratab

FREE:/opt/oracle/product/23c/dbhomeFree:Y

7. Open up a firewall port so the DB can be accessed from other machines:
[root@srlab ~]# firewall-cmd — permanent — add-port=1521/tcp
success
[root@srlab ~]# firewall-cmd — reload
success

8. Reboot the VM (in my case). I can then connect to the DB from my host machine like sqlplus system@srlab.localhost/freepdb1

Post a Comment: