Table of Contents
Oracle
This is a demo install of Oracle Database Server 21c on Oracle Linux 8.
Environment
VirtualBox virtual machine manager.
Operating system
Install
2 CPU, 2GB RAM, 32GB HDD FIXED SIZE, 64MB VMSVGA
Take note of MAC address and configure DHCP server with a fixed address.
Install Oracle Linux 8.5.0
During install do not use scaled mode because it can cause problems with the GUI. CTRL+C will exit scaled mode if enabled (CTRL+ALT will return you to the desktop).
Setup as follows:
- Select language: English (United Kingdom)
- Time & Date: Etc → Coordinated Universal Time
- Software Selection: Server → Headless management, system tools
- Installation Destination: X, automatic partitioning
- Network and Host: ON → hostname.kewl.org
- Root Password
Begin installation… Reboot System
Login
$ ssh root@hostname.kewl.org
Update
$ yum update Y $ reboot
VBoxAdd
Install the VBox Linux Additions so we can mount a share on the VM. This is to access downloaded files on the host machine with a shared folder.
Install kernel and tools
$ yum install kernel-uek kernel-uek-devel make perl Y $ reboot
Install module
$ uname -a Linux hostname.kewl.org 5.4.17-2136.307.3.1.el8uek.x86_64 #2 SMP Mon May 9 17:29:47 PDT 2022 x86_64 x86_64 x86_64 GNU/Linux $ mount /dev/sr0 /mnt $ /mnt/VBoxLinuxAdditions.run
Server
Oracle Database Server version 21c.
The install guide is mostly for the ZIP version but we shall install the RPM for OL8.
Preinstall
The O/S needs to be setup for Oracle, a preinstall RPM does this automatically for us.
$ yum install ./oracle-database-preinstall-21c-1.0-1.el8.x86_64.rpm Y $ reboot
Install
Now we can install the Database Server and afterward configure it with the example database.
$ yum install ./oracle-database-ee-21c-1.0-1.ol8.x86_64.rpm Y Downloading Packages: Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Running scriptlet: oracle-database-ee-21c-1.0-1.x86_64 1/1 Installing : oracle-database-ee-21c-1.0-1.x86_64 1/1 Running scriptlet: oracle-database-ee-21c-1.0-1.x86_64 1/1 [INFO] Executing post installation scripts... [INFO] Oracle home installed successfully and ready to be configured. To configure a sample Oracle Database you can execute the following service configuration script as root: /etc/init.d/oracledb_ORCLCDB-21c configure Verifying : oracle-database-ee-21c-1.0-1.x86_64 1/1 Installed: oracle-database-ee-21c-1.0-1.x86_64 Complete!
Configure
Setup the example database.
$ /etc/init.d/oracledb_ORCLCDB-21c configure Configuring Oracle Database ORCLCDB. Prepare for db operation 8% complete Copying database files 31% complete Creating and starting Oracle instance 32% complete 36% complete 40% complete 43% complete 46% complete Completing Database Creation 51% complete 54% complete Creating Pluggable Databases 58% complete 77% complete Executing Post Configuration Actions 100% complete Database creation complete. For details check the logfiles at: /opt/oracle/cfgtoollogs/dbca/ORCLCDB. Database Information: Global Database Name:ORCLCDB System Identifier(SID):ORCLCDB Look at the log file "/opt/oracle/cfgtoollogs/dbca/ORCLCDB/ORCLCDB.log" for further details. Database configuration completed successfully. The passwords were auto generated, you must change them by connecting to the database using 'sqlplus / as sysdba' as the oracle user.
Client
Create bash profile for oracle user in /home/oracle
Ownership is oracle:oinstall
# .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs export TMP=/tmp export TMPDIR=/tmp export ORACLE_HOSTNAME=hostname.kewl.org export ORACLE_BASE=/opt/oracle export ORA_INVENTORY=$ORACLE_BASE/oraInventory export DATA_DIR=$ORACLE_BASE/oradata export ORACLE_HOME=$ORACLE_BASE/product/21c/dbhome_1 export PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:$ORACLE_HOME/bin export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib export ORACLE_UNQNAME=ORCLCDB export ORACLE_SID=ORCLCDB export PDB_NAME=ORCLPDB1
Set oracle user password and logout.
$ passwd oracle $ exit
Login as oracle user.
$ ssh oracle@hostname.kewl.org
Connect to database using password `oracle'
$ sqlplus sys as sysdba SQL*Plus: Release 21.0.0.0.0 - Production on Sat May 14 03:33:26 2022 Version 21.3.0.0.0 Copyright (c) 1982, 2021, Oracle. All rights reserved. Enter password: Connected to: Oracle Database 21c Enterprise Edition Release 21.0.0.0.0 - Production Version 21.3.0.0.0 SQL>