Your cart is currently empty!
Steps to Install Oracle Linux 9 and Set Up Oracle Database 19c
-
Download Oracle Linux ISO
Get the Oracle Linux ISO file from this link: https://yum.oracle.com/oracle-linux-isos.html. -
Install Oracle Linux 9
Use the downloaded ISO file to install Oracle Linux 9 on either a virtual machine (VM) or a physical server. -
Verify Installation
Once the OS is installed, log in to the machine and run the following commands to verify the system setup:cat /etc/*release
– This shows the Oracle Linux version.uname -a
– This displays the kernel version.
-
Install Oracle Preinstallation Package
Ensure the server has internet access, then install the Oracle preinstallation package:yum install -y oracle-database-preinstall-19c
– This command will download necessary Oracle dependencies.
-
Apply Kernel Parameter Changes
Run and apply kernel parameter changes:sysctl -p
– This ensures kernel parameters are applied without needing a restart.
-
Set Password for Oracle User
After the Oracle preinstallation package creates the oracle user, set the password:id oracle
– Confirm the oracle user was created.passwd oracle
– Set the password for the oracle user.
-
Create Oracle 19c Directories
Create the required directories for Oracle Database:mkdir -p /u01/app/oracle/product/19c/dbhome_1
– Oracle binaries, config files, and libraries are stored here.mkdir -p /u02/oracle/oradata
– Data files for the Oracle database will reside here.mkdir -p /u02/oracle/FRA
– This is for the Fast Recovery Area (FRA), storing backups and logs.mkdir -p /backup/patch
– Store Oracle patch files here.
-
Update Ownership and Permissions
Change ownership and permissions for the directories:chown -R oracle:oinstall /u02
chown -R oracle:oinstall /u01
chown -R oracle:oinstall /backup
chmod -R 775 /u01/
chmod -R 775 /u02/
chmod -R 775 /backup/
-
Set Limits for Oracle User
Set resource limits for the oracle user by editing the/etc/security/limits.conf
file:- Limit processes:
oracle soft nproc 2047
oracle hard nproc 16384
- Limit file descriptors:
oracle soft nofile 1024
oracle hard nofile 65536
- Limit stack size:
oracle soft stack 10240
oracle hard stack 10240
- Lock memory in RAM:
oracle soft memlock 134217728
oracle hard memlock 134217728
- Limit processes:
-
Reboot or Re-login
These limits will take effect after a system reboot or when the oracle user logs out and back in. You can verify with the command:
ulimit -l
- Disable Firewall (Optional)
To disable the firewall or adjust rules, run:
systemctl stop firewalld
systemctl disable firewalld
- Configure Oracle User’s Bash Profile
Set up environment variables for the Oracle user:
- Log in as the Oracle user:
su - oracle
- Edit
.bash_profile
:vi ~/.bash_profile
- Add these Oracle environment variables:
- Apply Changes to Bash Profile
To apply the environment variables to your current session, run:
source ~/.bash_profile
- Verify Environment Variables
Ensure the environment variables are set correctly:
echo $ORACLE_HOME
echo $ORACLE_SID
echo $PATH
echo $LD_LIBRARY_PATH
Or use:env | grep ORA
-
Download Oracle Database 19c Installation Files
Download the Oracle Database 19c files and OPatch utility from the official Oracle website:
https://www.oracle.com/database/technologies/oracle-database-software-downloads.html#db_ee
For this example, downloadLINUX.X64_193000_db_home.zip
(requires an Oracle account). -
Upload Installation Files
Upload the Oracle Database zip and OPatch files to the$ORACLE_HOME
directory. -
Download Oracle Database Patch
Visit My Oracle Support and follow these steps:
- Search for “Oracle Database 19c patch”.
- Choose the patch that matches your system configuration.
- Download and save it to your system, then upload it to
/backup/patch
on the server.
- Change File Ownership
Change the ownership of the uploaded files:
chown oracle:oinstall LINUX.X64_193000_db_home.zip
chown oracle:oinstall p6880880_190000_Linux-x86-x64.zip
chown oracle:oinstall patch_file_name.zip
- Unzip Oracle Database Software
Unzip the Oracle Database installation files:
unzip LINUX.X64_193000_db_home.zip
- Remove Old OPatch Directory
The unzipped files will include an old OPatch directory. To replace it, run:
ls -ld Opatch
(to check if the directory exists)rm -rf Opatch
(to remove the old directory)
- Unzip New OPatch Utility
Now unzip the OPatch zip file:
unzip p6880880_190000_Linux-x86-x64.zip
Confirm the new OPatch directory:
ls -ld Opatch
-
Remove Unnecessary Zip Files
After extracting the necessary files, remove the Oracle DB and OPatch zip files from$ORACLE_HOME
. -
Unzip Patch from /backup/patch
Unzip the patch from the/backup/patch
directory:
unzip patch_file_name.zip
This creates a directory under /backup/patch
, such as /backup/patch/3344556677
.
- Remove Patch Zip File
Once unzipped, remove the patch zip file:
rm -rf patch_file_name.zip
- Set Display Environment Variable
To set the display variable for graphical applications, run:
export DISPLAY=machine_name:0.0
- Set CV_ASSUME_DISTID
Set the distribution ID for Oracle installation:
export CV_ASSUME_DISTID=OL8
- Apply the Patch
Run the installer to apply the patch:
./runInstaller -applyRU /backup/patch/3344556677
-
Wait for Patch Application
Wait for the patch to apply. You will see a message like:
“Successfully applied the patch. The log can be found at: /tmp/InstallActionsDATETIME/InstallerPatchActionsDATETIME.log” -
Launch Oracle DB Setup Wizard
The installer will now launch the Oracle DB setup wizard. -
Choose Installation Options
The wizard will offer these choices:
- Create and configure a single-instance database.
- Set up software only. For this task, choose Set Up Software Only.
-
Select Installation Type
Choose Single Instance Database Installation (not Oracle RAC). -
Choose Database Edition
Choose either Enterprise Edition or Standard Edition. -
Specify Oracle Directories
Confirm that the Oracle base and home directories are correct. These will auto-populate based on previous steps. -
Specify Oracle Inventory Directory
Leave the Oracle inventory directory as the default. -
Select Groups
Choose theoinstall
group for all options. -
Run Root Scripts
Allow automatic execution of configuration scripts and provide the root user password. -
Prerequisite Checks
If you encounter warnings, select Ignore All and proceed. -
Start Installation
On the summary page, click Install to begin the installation process. -
Wait for Installation Completion
The database software will install. The final message will say, “The registration of Oracle Database was successful.” -
Close the Wizard
Once the installation is complete, close the wizard. -
Verify Installation
Run the following commands to verify:
sqlplus -v
– Check the Oracle version.cat /etc/oraInst.loc
– Verify the inventory location and group.cd /u01/app/oraInventory/ContentsXML && cat inventory.xml
– Ensure the home points to the correct$ORACLE_HOME
.
- Create a Database with DBCA
Use the DBCA tool to create a new database:
- Run
dbca
to launch the database configuration assistant wizard.
-
Select Database Operation
Choose Create a Database and click Next. -
Select Creation Mode
Choose Advanced Configuration and click Next. -
Select Deployment Type
Choose Custom Database and proceed. -
Database Configuration
Set the global database name (e.g.,orcl
) and deselect the option to create a pluggable database. -
Set Database Storage Locations
Choose/u02/oracle/oradata
for the database files location. -
Configure Fast Recovery Area
Check Specify Fast Recovery Area, select/u02/oracle/FRA
, and allocate 30 GB for the FRA. -
Network Configuration
Skip this step for now and click Next. -
Configure Database Options
Keep the default options. -
Configure Memory
Set the SGA and PGA sizes to allocate 40% of the VM memory. -
User Credentials
Set an administrative password for all accounts. -
Final Steps
Ensure Create Database is checked and click Finish to create the database. -
Wait for Database Creation
The database creation process will take a few minutes. Once done, you can connect to your new database.
Conclusion
Following these steps, you’ve successfully installed Oracle Linux 9, set up the Oracle Database 19c environment, applied necessary patches, and created your database. By carefully configuring the server, setting appropriate permissions, and establishing environment variables, you’ve laid the foundation for a stable and efficient Oracle Database instance.
From verifying your installation to creating the database, each step ensures that your Oracle environment is properly prepared and optimized for performance. Whether you’re using this setup for development, testing, or production, this guide provides a solid, step-by-step framework for installing and configuring Oracle Database 19c on Oracle Linux 9.
Now that the installation is complete, you’re ready to start working with Oracle DB, managing databases, and running enterprise-level applications. Always remember to regularly check for patches and updates to keep your environment secure and efficient.
Leave a Reply