oracle

https://www.youtube.com/watch?v=n5SfzJeqMuk

** Please use the root user to edit the files and execute the commands unless further notice. **

Prerequisite

  1. Install the latest VirtualBox and the VirtualBox Extension Pack.

  2. Create a new virtual machine and install the CentOS to the virtual machine. Select Workstation as Base Environment, select Container Management, Development Tools and Graphical Administration Tools as Additional software for Selected Environment.

Download Packages and Software

Hostname and Host File

  1. Open the file /etc/hostname, change the content to update the hostname.

ol8-19.localdomain
  1. Open the file /etc/hosts, add your IP address and hostname.

Install Required Packages

  1. Perform a yum update to update every currently installed package.

  1. Add execute permission to the downloaded rpm files.

  1. Install the libcapl library for getting and setting POSIX.1e (formerly POSIX 6) draft 15 capabilities.

  1. Inatll the libstdc++ package which contains compatibility standard C++ library from GCC 3.3.4.

  1. Install the below required packages.

Install Oracle Installation Prerequisites

  1. Install the OIP package.

  1. Open the /etc/group file, update the GID of the below items.

  1. Open the /etc/passwd file, update both the UID and GID of account oracle.

  1. Update the password of account oracle.

  1. Set secure Linux to permissive by editing the /etc/selinux/config file.

  1. Set the secure Linux change right now.

  1. Disable the firewall.

Setup Oracle User Profile

  1. Create Oracle directories.

  1. Create a new directory for Oracle user.

  1. Create filese for Oracle user.

  1. Set the environment when the Bash runs whenever it is started interactively.

Create and Add New Swap File

  1. Run the following command, with oracle user, to create and apply new swap file.

  1. Apply the swap by executing the following command with root user.

Install Oracle Database

  1. Set the DISPLAY variable with oracle user.

  1. Unzip the archive with oracle user.

  1. "Cheat" the installer about the distribution with oracle user.

  1. Run the installer, with oracle user, to install Oracle database.

  1. If the setup is success, the following message should be printed on screen.

  1. Execute the below scripts, with root user, to update the permission of Oracle directories and set the environment variables.

Database Creation

  1. Start the listener with oracle user.

  1. Create a database with oracle user.

Listener Update

  1. Replace or edit the listener.ora file, with oracle user, to set the correct hostname, port number and SID name.

  1. Reload the Oracle Listener.

Post Installation

  1. Edit the /etc/oratab file, with root user, to update the restart flag from 'N' to 'Y'.

  1. Configure the Database instance "orcl" with auto startup.

  1. Enable Oracle Managed Files (OMF) and make sure the PDB starts when the instance starts.

  1. Execute the following commands, with root user, to start the Oracle Listener automatically.

  1. Use the following command, with oracle user, to edit the crontab file.

  1. Put the following cron job in the first line of crontab file, then press the keys :wq to save and exit.

Healthcheck

  1. Login as oracle user and then execute the following commands one-by-one.

Create New User and Tablespace

  1. Login as Sysdba with SqlPlus.

  1. Update the seesion setting _ORACLE_SCRIPT to true to allow common user comes without c## as prefix.

  1. Create a new tablespace with an automatic extensible size 100MB, maximum 10G in size.

  1. Create a new user.

  1. Grant permissions to the new user.

  1. [Optional] Grant DBA to the new user.

References

Last updated

Was this helpful?