top of page

step-by-step guide to install Oracle 19c database on CentOS 9 for a pluggable database

Step 1: Prerequisites


  1. System Requirements:

  • Minimum 8GB RAM.

  • Minimum 40GB disk space.

  1. Update the system:

bash

 

sudo dnf update -y

sudo dnf upgrade -y

  1. Install required packages:

bash

 

sudo dnf install -y bc binutils gcc gcc-c++ glibc glibc-devel ksh libaio libaio-devel libX11 libXau libXi libXtst libgcc libnsl libstdc++ libstdc++-devel libxcb make smartmontools sysstat elfutils-libelf elfutils-libelf-devel libXrender libXrender-devel

  1. Create required users and groups:

bash

 

sudo groupadd -g 54321 oinstall

sudo groupadd -g 54322 dba

sudo useradd -u 54321 -g oinstall -G dba oracle

sudo passwd oracle

  1. Create required directories:

bash

 

sudo mkdir -p /u01/app/oracle/product/19.0.0/dbhome_1

sudo mkdir -p /u02/oradata

sudo chown -R oracle:oinstall /u01 /u02

sudo chmod -R 775 /u01 /u02


Step 2: Kernel Parameters and Resource Limits


  1. Set kernel parameters: Edit the /etc/sysctl.conf file and add the following lines:

bash

 

fs.aio-max-nr = 1048576

fs.file-max = 6815744

kernel.shmall = 2097152

kernel.shmmax = 1073741824

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

net.ipv4.ip_local_port_range = 9000 65500

net.core.rmem_default = 262144

net.core.rmem_max = 4194304

net.core.wmem_default = 262144

net.core.wmem_max = 1048576

Apply the changes:

bash

 

sudo sysctl -p

  1. Set resource limits: Edit the /etc/security/limits.conf file and add the following lines:

bash

 

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 1024

oracle hard nofile 65536

oracle soft stack 10240

oracle hard stack 32768

  1. Configure PAM: Edit the /etc/pam.d/login file and add the following line:

bash

 

session required pam_limits.so


Step 3: Download and Install Oracle Database Software


  1. Download Oracle 19c software from the Oracle website.

  2. Transfer the downloaded file to the CentOS server.

  3. Unzip the Oracle software:

bash

 

unzip LINUX.X64_193000_db_home.zip -d /u01/app/oracle/product/19.0.0/dbhome_1


Step 4: Install Oracle Database


  1. Switch to the Oracle user:

bash

 

sudo su - oracle

  1. Set environment variables: Edit the ~/.bash_profile file and add the following lines:

bash

 

export ORACLE_BASE=/u01/app/oracle

export ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1

export ORACLE_SID=orcl

export PATH=$PATH:$ORACLE_HOME/bin

Apply the changes:

bash

 

source ~/.bash_profile

  1. Run the Oracle Universal Installer (OUI):

bash

 

$ORACLE_HOME/runInstaller

Follow the GUI instructions to complete the installation. Select "Set Up Software Only" during the installation.


Step 5: Create a Listener


  1. Run the Net Configuration Assistant:

bash

 

netca

  1. Create a new listener: Follow the prompts to create a listener with default settings.



Step 6: Create a Database


  1. Run the Database Configuration Assistant (DBCA):

bash

 

dbca

  1. Create a Pluggable Database: Follow the prompts to create a database with a pluggable database. Use the following settings:

  • Database Type: Advanced Mode

  • Configuration Type: General Purpose or Transaction Processing

  • Container Database: Create a container database with one pluggable database

  • PDB Name: pdb1


Step 7: Post-Installation



  1. Start the listener and database:

bash

 

lsnrctl start

sqlplus / as sysdba

Inside SQL*Plus:

sql

 

STARTUP;

ALTER PLUGGABLE DATABASE ALL OPEN;

  1. Verify the installation:

sql

 

SELECT name, open_mode FROM v$pdbs;


Congratulations! You have successfully installed Oracle 19c on CentOS 9 with a pluggable database. If you encounter any issues, please let me know!


 

1,519 views

Recent Posts

See All

Comentarios


AiTech

©2023 by AiTech

bottom of page