Oracle Database 19c is a powerful and widely used relational database management system (RDBMS) known for its high performance, scalability, and reliability. If you want to set up Oracle Database 19c on a Linux-based system, this step-by-step guide will walk you through the process—from preparing your environment to running Oracle Database smoothly.
Prerequisites
Before starting the installation process, ensure that your system meets the following requirements:
- A Linux server (e.g., Oracle Linux 7/8, CentOS, RHEL) with at least 8 GB of RAM and 50 GB of free disk space.
- Root access to the server.
- Access to the Oracle Database 19c RPM package and other required files.
Step 1: Install Essential Packages
First, make sure you have the necessary utilities installed on your system. These include tools like curl
for downloading packages and net-tools
for network utilities.
# Update your package manager
sudo dnf update -y
# Install necessary tools
sudo dnf install -y curl net-tools
Step 2: Download Oracle Database 19c RPM
Oracle provides an official RPM package for Oracle Database 19c that simplifies the installation process. To begin, download the RPM package for the Oracle Database.
# Download the Oracle Database 19c RPM (ensure you have the correct URL or session)
curl -O -L "https://download.oracle.com/otn/linux/oracle19c/190000/oracle-database-ee-19c-1.0-1.x86_64.rpm?AuthParam=your_auth_param"
Make sure that you replace the URL with the valid one obtained from Oracle's website, which requires login and acceptance of their license agreement.
Step 3: Download and Install Oracle Preinstall RPM
Before installing Oracle Database 19c, you need to configure your system with the necessary OS settings. Oracle provides a preinstall package that configures the required kernel parameters, user limits, and groups.
# Download the Oracle Preinstall package
curl -o oracle-database-preinstall-19c-1.0-1.el9.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL9/appstream/x86_64/getPackage/oracle-database-preinstall-19c-1.0-1.el9.x86_64.rpm
# Install the preinstall package
sudo dnf -y localinstall oracle-database-preinstall-19c-1.0-1.el9.x86_64.rpm
This package ensures your system is ready for Oracle Database 19c by setting up necessary directories, user groups, and kernel parameters.
Step 4: Install Oracle Database 19c
Now that the preinstall package is in place, you can proceed to install the Oracle Database 19c package using the RPM package manager.
# Install Oracle Database 19c
sudo rpm -ivh oracle-database-ee-19c-1.0-1.x86_64.rpm
This will install Oracle Database 19c and set up all the required files and directories. The process will also create the Oracle user and configure the necessary permissions.
Step 5: Configure Oracle Database
Once the installation is complete, the next step is to configure the database. Oracle provides a configuration script that sets up the database environment, initializes the database instance, and configures essential services.
# Run the Oracle database configuration script
sudo /etc/init.d/oracledb_ORCLCDB-19c configure
This command will:
- Set up the default Oracle database container (
ORCLCDB
). - Configure the Oracle listener.
- Apply the necessary system configurations for running the database.
Step 6: Verify the Oracle Database Installation
Once the configuration process completes, you can check if the Oracle Database service is running correctly.
# Check the Oracle Database service status
sudo systemctl status oracle-database-19c
If the installation was successful, the service should show as active and running.
Step 7: Set Up Oracle Environment Variables
To make it easier to work with Oracle Database, you need to configure environment variables for the Oracle user. This step ensures that tools like sqlplus
and other Oracle utilities are accessible from the command line.
# Switch to the Oracle user
sudo su - oracle
# Edit the .bash_profile file
nano ~/.bash_profile
Add the following lines to set the necessary environment variables:
export ORACLE_HOME=/opt/oracle/product/19c/dbhome_1
export ORACLE_SID=ORCLCDB
export PATH=$ORACLE_HOME/bin:$PATH
After saving the file, apply the changes by sourcing the .bash_profile
.
source ~/.bash_profile
Step 8: Test the Oracle Database Installation
Finally, test your installation by logging into Oracle Database using SQL*Plus.
# Log into SQL*Plus as SYSDBA
sqlplus / as sysdba
# Check the Oracle database version
SELECT * FROM v$version;
You should see output indicating the Oracle Database version you’ve installed:
BANNER
--------------------------------------------------------------------------------
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
This confirms that Oracle Database 19c is successfully installed and running.
Troubleshooting
1. Error: "Unable to Find a Valid RPM Package"
Ensure that the RPM file URL is correct and that you’ve logged into Oracle’s website to accept the license agreement before downloading. Copy the download link exactly if downloading from Oracle’s website.
2. Network Issues
If you encounter network-related issues during the download process, check your firewall or proxy settings to ensure the system can access Oracle's servers. You can also try downloading the RPM files manually from a browser and then transferring them to your server.
3. Memory Issues During Installation
Oracle Database 19c requires a significant amount of RAM (at least 8 GB). If you face memory-related errors during the installation, ensure your server meets the minimum requirements. You may also need to close other resource-intensive applications.
Conclusion
By following this guide, you should have successfully installed and configured Oracle Database 19c on your Linux system. You’ve also learned how to set up the Oracle environment and verified the installation. Oracle 19c offers a powerful platform for handling critical workloads, and with this setup, you're ready to start using Oracle Database for your applications.
As always, be sure to regularly apply patches and updates to your Oracle installation to maintain system stability, security, and performance.
Top comments (0)