Step 1: Prerequisites
System Requirements:
Minimum 8GB RAM.
Minimum 40GB disk space.
Update the system:
bash
sudo dnf update -y
sudo dnf upgrade -y
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
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
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
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
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
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
Download Oracle 19c software from the Oracle website.
Transfer the downloaded file to the CentOS server.
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
Switch to the Oracle user:
bash
sudo su - oracle
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
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
Run the Net Configuration Assistant:
bash
netca
Create a new listener: Follow the prompts to create a listener with default settings.
Step 6: Create a Database
Run the Database Configuration Assistant (DBCA):
bash
dbca
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
Start the listener and database:
bash
lsnrctl start
sqlplus / as sysdba
Inside SQL*Plus:
sql
STARTUP;
ALTER PLUGGABLE DATABASE ALL OPEN;
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!
Comentarios