Installing oracle database 12c on oracle linux

How I Simplified Oracle Database 12c and 11g Installations on Oracle Linux 6

by Ginny Henningsen; updated by Michele Casey
Published September 2012 (updated September 2017)

How to simplify the installation of Oracle Database 12c or 11g on Oracle Linux 6 by installing the oracle-rdbms-server-12cR1-preinstall or oracle-rdbms-server-11gR2-preinstall RPM package, which automatically performs a number of tasks, such as installing required software packages, resolving package dependencies, and modifying kernel parameters.

READ THIS FIRST: Important Changes Since Publication

While the content in this article is still valid, several details have changed. For example:

For Oracle Database 12c Release 2, the preinstall RPM has a different name than the one used in the article belowpu:

oracle-database-server-12cR2-preinstall

The preinstall RPMs are published on Oracle Linux yum server for both Oracle Linux 6 and 7 in the Latest repositories which are configured and enabled by default in recent releases of Oracle Linux 6 and 7

Introducing the oracle-rdbms-server-12cR1-preinstall and oracle-rdbms-server-11gR2-preinstall RPM for Oracle Linux

Before installing Oracle Database 12c or 11g on a system, you need to preconfigure the operating environment since the database requires certain software packages, package versions, and tweaks to kernel parameters. (Be sure to review the appropriate Oracle Database installation guide to familiarize yourself with hardware, software, and operating system requirements.)

Note: This article applies to Oracle Linux 6. A previous article, «How I Simplified Oracle Database Installation on Oracle Linux,» covered performing a similar task on versions of Oracle Linux 5.

On Oracle Linux, I discovered that there is a remarkably easy way to address these installation prerequisites: First, depending on your database version, install either the RPM package called oracle-rdbms-server-12cR1-preinstall or oracle-rdbms-server-11gR2-preinstall . This RPM performs a number of preconfiguration steps, including the following:

  • Automatically downloading and installing any additional software packages and specific package versions needed for installing Oracle Grid Infrastructure and Oracle Database 12 c Release 1 (12.1) or 11g Release 2 (11.2.0.3), with package dependencies resolved via yum or up2date capabilities.
  • Creating the user oracle and the groups oinstall (for OraInventory ) and dba (for OSDBA ), which are used during database installation. (For security purposes, this user has no password by default and cannot log in remotely. To enable remote login, please set a password using the passwd tool.)
  • Modifying kernel parameters in /etc/sysctl.conf to change settings for shared memory, semaphores, the maximum number of file descriptors, and so on.
  • Setting hard and soft shell resource limits in /etc/security/limits.conf , such as the locked-in memory address space, the number of open files, the number of processes, and core file size.
  • Setting numa=off in the kernel for x86_64 machines.

Note that oracle-rdbms-server-12cR1-preinstall and oracle-rdbms-server-11gR2-preinstall parses the existing /etc/sysctl.conf and /etc/security/limits.conf files and updates values only as needed for database installation. Any precustomized settings not related to database installation are left as is.

The oracle-rdbms-server-12cR1-preinstall and oracle-rdbms-server-11gR2-preinstall RPM packages are accessible through the Oracle Unbreakable Linux Network (ULN, which requires a support contract), from the Oracle Linux distribution media, or from the Oracle public yum repository. Thus, whether or not your system is registered with ULN to access Oracle patches and support, you can use oracle-rdbms-server-12cR1-preinstall and oracle-rdbms-server-11gR2-preinstall to simplify database installation on Oracle Linux. In addition, the Oracle public yum repository now includes all security and bug errata, ensuring systems are secured and stable with the latest security updates and bug fixes.

Читайте также:  Quicktime codec pack для windows

Installing the oracle-rdbms-server-12cR1-preinstall or oracle-rdbms-server-11gR2-preinstall RPM

The remainder of this article steps through the procedure that I used for installing oracle-rdbms-server-11gR2-preinstall on Oracle Linux via the Oracle public yum repository. The same steps outlined in the following section can be used for either version of the preinstall RPM package. I started with a system running Oracle Linux Release 6 Update 4 for x86_64, a 64-bit version of Oracle Linux that I downloaded from the Oracle software delivery cloud (requires registration or login). First, I set up a yum configuration file that pointed to the correct repository, and then I installed the oracle-rdbms-server-11gR2-preinstall RPM from that repository.

Here are the steps for preconfiguring a system for Oracle Database installation using oracle-rdbms-server-11gR2-preinstall . Remember, the steps are the same when using the oracle-rdbms-server-12cR1-preinstall package; you simply need to change the name of the RPM package during the yum installation step.

As an authorized user (for example, root ), retrieve the file that configures repository locations:

Using a text editor, modify the file, changing the field enabled=0 to enabled=1 to reflect repositories that correspond to the machine’s operating system release.

Here is an excerpt of public-yum-old6.repo with the changed lines in boldface.

Because the target system is running Oracle Linux Release 6 Update 4 for x86_64, which installs the Oracle Unbreakable Enterprise Kernel by default, there are two repositories to enable, [ol6_latest] and [ol6_UEK_latest] .

Next, install the oracle-rdbms-server-11gR2-preinstall RPM using the yum install command. If you are using Oracle Database 12c, then you would type yum install .

The output in Listing 1 shows how the installation checks dependencies and then downloads and installs the required packages.

Listing 1: Installing the oracle-rdbms-server-11gR2-preinstall RPM

The yum installation logs messages about kernel changes in the file /var/log/oracle-rdbms-server-11gR2-preinstall/results/orakernel.log , and it makes backups of current system settings in the directory /var/log/oracle-rdbms-server-11gR2-preinstall/backup .

At this point, the system is ready for the installation of Oracle Database. For example, to install Oracle Database 11g Release 2, follow the directions in Chapter 4, «Installing Oracle Database,» of the Database Installation Guide for Linux.»

Here are the steps I followed while installing Oracle Database 11g Release 2 in my test environment. Make sure you review all documentation and follow recommended best practices before installing into your production environment.

As root , create a parent directory in a file system that has sufficient space to be the target location for the downloaded files:

The amount of disk space needed in the file system varies according to the specific installation type, but roughly twice the size of the zip archives, or 5 GB, is enough to house the software and data files.

Into this target directory, download the installation media files from the Oracle Database Software Downloads page on Oracle Technology Network.

Extract the files:

Log in as the user oracle . Change directory to the database directory and enter the following command to run the Oracle Universal Installer:

The Oracle Universal Installer performs a number of checks, verifying that the necessary OS packages and versions are installed. In addition, it checks kernel parameters set by the oracle-rdbms-server-11gR2-preinstall installation. During the kernel settings check, the installer might flag a few settings as «failed,» and you should investigate these failures. In some cases, you still might be able to continue with the database installation. If you check kernel settings in /etc/sysctl.conf , you’ll see that oracle-rdbms-server-11gR2-preinstall has modified and added the necessary settings to ensure the minimum requirements are met, as defined in section 2.10.1. Below is the list of requirements:

Читайте также:  Windows task manager функции процессора

If necessary, you can (as root ) edit the file /etc/sysctl.conf to specify a setting manually, for example:

The Oracle Universal Installer performs additional checks, such as verifying the glibc version, sufficient disk space, environmental variable and path settings, and sufficient physical memory and swap space. Generally, installing oracle-rdbms-server-11gR2-preinstall takes care of the prerequisites so that you can proceed directly with installing the database.

Final Thoughts

Installing the oracle-rdbms-server-12cR1-preinstall and oracle-rdbms-server-11gR2-preinstall RPMs can save time when installing Oracle Database 12c and 11g on Oracle Linux. These RPMs address most Oracle Database installation prerequisites and greatly simplify the installation process.

See Also

Here are the resources referenced earlier in this document:

  • Oracle Unbreakable Linux Network: https://linux.oracle.com
  • Oracle Linux yum server: http://yum.oracle.com/
  • Oracle software delivery cloud (requires registration or login): https://edelivery.oracle.com/linux
  • Oracle Database Software Downloads page on Oracle Technology Network: http://www.oracle.com/database/technologies/oracle-database-software-downloads.html

And here are some additional resources from the Oracle Database Documentation Library (http://www.oracle.com/pls/db112/homepage).

Also see the blog entry «Oracle RDBMS Server 11gR2 Pre-Install RPM for Oracle Linux 6 has been released»: https://blogs.oracle.com/linux/entry/oracle_rdbms_server_11gr2_pre

About the Authors

Ginny Henningsen has worked for the last 15 years as a freelance writer developing technical collateral and documentation for high-tech companies. Prior to that, Ginny worked for Sun Microsystems, Inc. as a Systems Engineer in King of Prussia, PA and Milwaukee, WI. Ginny has a BA from Carnegie-Mellon University and a MSCS from Villanova University.

Michele Casey is the Director of Product Management for Oracle Linux. She has worked with commercial Linux distributions and open source projects as a product manager since 2006. She has also held positions as a system administrator, project manager, and technical support engineer.

Revision 1.1, 07/09/2013; added information about using the
oracle-rdbms-server-12cR1-preinstall package to install
Oracle Database 12c

Источник

Oracle Database 12c Release 1 (12.1) Installation On Oracle Linux 6

This article describes the installation of Oracle Database 12c Release 1 (12.1) (64-bit) on Oracle Linux 6 (64-bit). The article is based on a server installation with a minimum of 2G swap, with SELinux set to permissive and the firewall disabled. The following package groups were included for this installation.

  • Base System > Base
  • Base System > Compatibility libraries
  • Base System > Hardware monitoring utilities
  • Base System > Large Systems Performance
  • Base System > Network file system client
  • Base System > Performance Tools
  • Base System > Perl Support
  • Servers > Server Platform
  • Servers > System administration tools
  • Desktops > Desktop
  • Desktops > Desktop Platform
  • Desktops > Fonts
  • Desktops > General Purpose Desktop
  • Desktops > Graphical Administration Tools
  • Desktops > Input Methods
  • Desktops > X Window System
  • Applications > Internet Browser
  • Development > Additional Development
  • Development > Development Tools

An example of this type of Linux installations can be seen here. Alternative installations may require more packages to be loaded, in addition to the ones listed below.

Download Software

Download the Oracle software from OTN or MOS depending on your support status.

This article has been updated for the 12.1.0.2 release, but the installation is essentially unchanged since 12.1.0.1. Any variations specific for 12.1.0.1 will be noted.

Depending on your version of VirtualBox and Oracle Linux, there may be some slight variation in how the screen shots look.

Unpack Files

Unzip the files.

You should now have a single directory called «database» containing installation files.

Hosts File

The «/etc/hosts» file must contain a fully qualified name for the server.

Oracle Installation Prerequisites

Perform either the Automatic Setup or the Manual Setup to complete the basic prerequisites. The Additional Setup is required for all installations.

Читайте также:  Командная строка windows имя процесса

Automatic Setup

If you plan to use the «oracle-rdbms-server-12cR1-preinstall» package to perform all your prerequisite setup, issue the following command.

Earlier versions of Oracle Linux required manual setup of the Yum repository by following the instructions at http://public-yum.oracle.com.

It is probably worth doing a full update as well, but this is not strictly speaking necessary.

Manual Setup

If you have not used the «oracle-rdbms-server-12cR1-preinstall» package to perform all prerequisites, you will need to manually perform the following setup tasks.

Add or amend the following lines in the «/etc/sysctl.conf» file.

Run the following command to change the current kernel parameters.

Add the following lines to the «/etc/security/limits.conf» file.

Install the following packages if they are not already present.

Create the new groups and users.

Uncomment the extra groups you require.

Additional Setup

The following steps must be performed, whether you did the manual or automatic setup.

Set the password for the «oracle» user.

Amend the «/etc/security/limits.d/90-nproc.conf» file as described below. See MOS Note [ID 1487773.1]

Set secure Linux to permissive by editing the «/etc/selinux/config» file, making sure the SELINUX flag is set as follows.

Once the change is complete, restart the server or run the following command.

If you have the Linux firewall enabled, you will need to disable or configure it, as shown here or here. To disable it, do the following.

Create the directories in which the Oracle software will be installed.

Putting mount points directly under root without mounting separate disks to them is typically a bad idea. It’s done here for simplicity, but for a real installation «/» storage should be reserved for the OS.

Unless you are working from the console, or using SSH tunnelling, login as root and issue the following command.

Add the following lines at the end of the «/home/oracle/.bash_profile» file.

Installation

Log into the oracle user. If you are using X emulation then set the DISPLAY environmental variable.

Start the Oracle Universal Installer (OUI) by issuing the following command in the database directory.

Proceed with the installation of your choice.

If you are doing an installation for an Enterprise Manager repository, remember to do an advanced installation and pick the ALT32UTF8 character set.

You can see the type of installation I performed by clicking on the links below to see screen shots of each stage.

The «Database Configuration Assistant Complete» screen displays the Database Express 12c URL, which will be something like «https://ol6-121.localdomain:5500/em».

Post Installation

Edit the «/etc/oratab» file setting the restart flag for each instance to ‘Y’.

If Database Express 12c is not working, check the XMLDB HTTP port. If it is 0, set it to the port you want to use.

Common Errors

«error code 35» : The machine name in the «/etc/hosts» file is not correct. It needs an entry for the loopback adapter (localhost) and the machine name. If you are using DNS for name resolution, you still need the loopback adapter reference in this file.

«error code 37» : The DNS not working properly. You may also get this error is the «/etc/hosts» file is not configured correctly.

«sqlplus: error while loading shared libraries: libclntsh.so.12.1» : The prerequisites have not been met. Work through them again. Specifically, make sure the «gcc» package has been installed.

Listener fails to start — Typically this is due to incorrect name resolution. Make sure the «/etc/hosts» and/or DNS is configured correctly.

Linking errors — Almost always due to missing prerequisites. Review the setup sections.

Источник

Оцените статью