How to Install Oracle 12c Database on Red Hat Enterprise Linux Architecture

How to Install Oracle 12c Database on Red Hat Enterprise Linux Architecture

Posted by Daniel Brody on March 24, 2023 · 12 mins read

How to Install Oracle 12c Database on Red Hat Enterprise Linux Architecture

Introduction

Oracle Database is a powerful and popular relational database management system used by many organizations to store and manage large amounts of data. In this guide, we will provide a detailed overview of the steps required to install Oracle 12c Database on a Red Hat Enterprise Linux Architecture. We will cover the following topics:

  • Preparing for the installation
  • Downloading the installation files
  • Installing Oracle Database
  • Configuring Oracle Database
  • Verifying the installation
  • Troubleshooting common issues

Prerequisites

Before we begin the installation process, we must ensure that we meet the following prerequisites:

  • A supported version of Red Hat Enterprise Linux Architecture is installed on the server.
  • Sufficient disk space and memory are available on the server.
  • A valid Oracle user account with SYSDBA privileges is available for use during the installation process.
  • The server has internet connectivity to download the installation files and updates.

Downloading the Installation Files

To begin the installation, we need to download the installation files from the Oracle website. We can obtain the installation files from the following URL:

We must ensure that we download the appropriate version of Oracle 12c Database for our server’s architecture. Once we have downloaded the installation files, we can move on to the next step.

Installing Oracle Database

To install Oracle 12c Database on a Red Hat Enterprise Linux Architecture, we need to follow the steps outlined below:

Step 1: Extract the Installation Files

We need to extract the downloaded installation files to a directory of our choice. For example, if we downloaded the files to the /tmp directory, we can extract them by running the following command:

$ cd /tmp
$ unzip linuxx64_12201_database.zip

Step 2: Install Required Packages

Before we can begin the Oracle Database installation, we need to install some required packages on our server. We can install these packages by running the following command:

$ sudo yum install binutils compat-libcap1 compat-libstdc++-33 gcc gcc-c++ glibc glibc-devel ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel libxcb make sysstat -y

Step 3: Disable Transparent Huge Pages

Oracle recommends that we disable Transparent Huge Pages (THP) to improve performance and avoid issues. We can disable THP by running the following command:

$ sudo su -
$ echo never > /sys/kernel/mm/transparent_hugepage/enabled
$ echo never > /sys/kernel/mm/transparent_hugepage/defrag
$ exit

Step 4: Create the Oracle User and Groups

We need to create an Oracle user and groups to run the Oracle Database installation. We can create these by running the following commands:

$ sudo groupadd oinstall
$ sudo groupadd dba
$ sudo useradd -m -g oinstall -G dba oracle
$ echo "<password>" | sudo passwd --stdin oracle

Replace <password> with a secure password for the Oracle user.

Step 5: Configure Kernel Parameters

We need to configure some kernel parameters to ensure that Oracle Database runs smoothly on our server. We can configure these parameters by editing the /etc/sysctl.conf file and adding the following lines:

fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
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

We can load these kernel parameters by running the following command:

$ sudo sysctl -p

Step 6: Configure Limits

We need to configure some limits for the Oracle user to ensure that Oracle Database runs smoothly on our server. We can configure these limits by editing the /etc/security/limits.conf file and adding the following lines:

oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

Step 7: Install Oracle Database

We need to install Oracle Database by running the following command:

$ sudo su - oracle
$ cd /tmp/database
$ ./runInstaller

This command launches the Oracle Database installer. We need to follow the on-screen prompts to complete the installation process. We can refer to the Oracle documentation for detailed instructions on how to complete the installation process.

Configuring Oracle Database

After we have installed Oracle Database, we need to configure it. We can configure Oracle Database by following the steps outlined below:

Step 1: Run the Oracle Database Configuration Assistant

We need to run the Oracle Database Configuration Assistant (DBCA) to configure Oracle Database. We can run DBCA by running the following command:

$ sudo su - oracle
$ dbca

This command launches the DBCA. We need to follow the on-screen prompts to configure Oracle Database. We can refer to the Oracle documentation for detailed instructions on how to configure Oracle Database using DBCA.

Step 2: Configure Listener

We need to configure the Oracle listener to enable remote connections to Oracle Database. We can configure the listener by running the following command:

$ sudo su - oracle
$ netca

This command launches the Oracle Net Configuration Assistant (NETCA). We need to follow the on-screen prompts to configure the listener. We can refer to the Oracle documentation for detailed instructions on how to configure the listener using NETCA.

Step 3: Configure Enterprise Manager

We need to configure Oracle Enterprise Manager to manage Oracle Database. We can configure Enterprise Manager by running the following command:

$ sudo su - oracle
$ emca -config dbcontrol db -repos create

This command launches the Oracle Enterprise Manager Configuration Assistant (EMCA). We need to follow the on-screen prompts to configure Enterprise Manager. We can refer to the Oracle documentation for detailed instructions on how to configure Enterprise Manager using EMCA.

Verifying the Installation

To verify that the installation was successful, we can test the connection to Oracle Database. We can test the connection by following these steps:

  1. Open a terminal window on a client machine.
  2. Install the Oracle Instant Client package on the client machine. We can download the package from the following URL:
    https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html
    
  3. Set the LD_LIBRARY_PATH environment variable to the location of the Oracle Instant Client package. For example:
    $ export LD_LIBRARY_PATH=/opt/oracle/instantclient_19_3
    
  4. Open a SQL*Plus session by running the following command:
    $ sqlplus <username>/<password>@<hostname>:<port>/<sid>
    

Replace <username> with a valid Oracle username, <password> with the password for the Oracle user, <hostname> with the hostname of the Oracle server, <port> with the port number for the Oracle listener, and <sid> with the Oracle System ID (SID).

If the connection is successful, we can enter SQL commands to query the database. For example:

$ sqlplus scott/tiger@localhost:1521/orclpdb1

SQL> SELECT * FROM employees;

This command selects all records from the employees table.

Troubleshooting Common Issues

If we encounter any issues during the installation or configuration process, we can troubleshoot them by following these steps:

  1. Review the installation and configuration logs. The installation logs are located in the install_dir/logs directory, and the configuration logs are located in the ORACLE_HOME/cfgtoollogs/dbca directory.
  2. Check the database alert log for any error messages.
  3. Check the listener log for any error messages.
  4. Verify that the database is running and accessible from the client machine.
  5. Verify that the listener is running and accessible from the client machine.
  6. Verify that the tnsnames.ora file is configured correctly on the client machine.
  7. Verify that the user account used during the installation has the necessary privileges.
  8. Consult the Oracle documentation and support resources for additional guidance.

Conclusion

In conclusion, installing Oracle 12c Database on a Red Hat Enterprise Linux Architecture is a complex but rewarding process that requires careful planning and attention to detail. By following the steps outlined in this guide, we can successfully install and configure Oracle Database and begin storing and managing large amounts of data on our server. If we encounter any issues, we can refer to the troubleshooting steps outlined in this guide and consult the Oracle documentation and support resources for additional guidance.

We hope that this guide has been helpful in providing a comprehensive overview of the installation and configuration process for Oracle Database on Red Hat Enterprise Linux Architecture. By following these steps, we can ensure that our installation is successful and that we can begin using Oracle Database to store and manage our data.

It is important to note that this guide provides a general overview of the installation and configuration process for Oracle 12c Database on Red Hat Enterprise Linux Architecture. Depending on our specific requirements and environment, there may be additional steps or configuration options that we need to consider. As such, we should always refer to the Oracle documentation and support resources for the most up-to-date and comprehensive guidance on installing and configuring Oracle Database.

In addition, we should always ensure that we have the necessary knowledge and expertise to perform the installation and configuration process, or seek the assistance of qualified professionals if necessary. The installation and configuration of Oracle Database is a complex process that requires careful planning, attention to detail, and knowledge of the underlying technologies and best practices.

We hope that this guide has provided a useful starting point for installing and configuring Oracle 12c Database on Red Hat Enterprise Linux Architecture, and wish you success in your endeavors with Oracle Database.


  • HowTo: Install Oracle 12c Database Server on Linux
  • March 35, 2023
  • Brody, Daniel
  • COPYRIGHT 2022 Yom Shore Ventures LLC All Rights Reserved