Installing Oracle 10g R2 Using Oracle Public Yum Repository on 64 Bit Oracle Enterprise Linux

There are a lot of documents about installing Oracle database on Linux systems on the Internet. Most of them are quite complex and the remaining ones do not include Oracle Public Yum Repository installation. Below is a concise document that should get the job done.

Preinstallation Tasks

1. Verify Kernel Version

To start with, your system must be running kernel version 2.6.9-11.EL or later. To verify whether the required kernel is installed, enter the following command:
# uname -r or to get more detailed information execute # cat /proc/version


2. Install Missing Packages

Additionally, the following packages (or later versions) must be already installed in your system:

binutils-2.15.92.0.2-10.EL4
compat-db-4.1.25-9
control-center-2.8.0-12
gcc-3.4.3-9.EL4
gcc-c++-3.4.3-9.EL4
glibc-2.3.4-2
glibc-common-2.3.4-2
gnome-libs-1.4.1.2.90-44.1
libstdc++-3.4.3-9.EL4
libstdc++-devel-3.4.3-9.EL4
make-3.80-5
pdksh-5.2.14-30
sysstat-5.0.5-1
xscreensaver-4.18-5.rhel4.2

Missing packages can be found in the RPM search sites like http://rpm.pbone.net/, but installing these packages individually may require too much time and effort. The fast alternative to install all the packages is to use Oracle validated RPMs.

The Oracle validated RPMs automatize the install of the various components required to setup the Oracle database. They install all required packages and also configure a lot of Linux configuration files and create users. There are a few steps you need to take before installing Oracle validated RPMs.


Go to yum.repos.d folder by typing 

 # cd /etc/yum.repos.d


Next, enable the appropriate repository by editing the yum configuration file. To achieve this, open the yum configuration file in a text editor. Locate the section in the file for the repository you plan to update from, e.g. [el5_u5_base]. Change [el5_u5_base] and [ol5_u5_base] entries’ enabled property from 0 to 1.

The final configuration file should look like something like this:

[el5_u5_base]
name=Enterprise Linux $releasever U5 - $basearch - base
baseurl=http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/5/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=1

[ol5_u5_base]
name=Oracle Linux $releasever - U5 - x86_64 - base
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL5/5/base/x86_64/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=1

Save and exit from the editor.

Run;

# yum clean all

To upgrade all recommended packages associated with the Unbreakable Enterprise Kernel, use the following yum command:

# yum install oracle-linux

Reboot your system to run the newly installed Unbreakable Enterprise Kernel. For detailed information about Public Yum Server please refer to http://public-yum.oracle.com/.


Next, download the proper version of Oracle validated RPM from http://oss.oracle.com/el5/oracle-validated/. I used oracle-validated-1.0.0-22.el5.x86_64.rpm for EL5 64bit Linux. Select the proper RPM for your Linux distro’s kernel and architecture and run:


#yum install ./oracle-validated-1.0.0-22.el5.x86_64.rpm

Other than installing required packages, this command configures required kernel parameters, the /etc/security/limits.conf file and creates required user and groups.
    Go to /etc/sysctl.conf file and do required changes (just read the instructions in the file, it is easy) and after editing this file re-run 

     #sysctl-p.


    3. Disable SELinux

    Due to two internal bugs in the Oracle Database (Bug 6140224, Bug 6079461), SELinux has to be disabled on RHEL/OEL 5 to work with Oracle database 10.2.

    To permanently disable SELinux go to /etc/selinux/ folder and edit the config file. Change SELINUX = enforcing to permissive or disabled

    4. Create Directories

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

    # mkdir -p /u01/app/oracle/product/10.1.0/db_1

    Set the ownership:

    # chown -R oracle.oinstall /u01


    Create oraInventory under /u01/app/oracle

    5. Modify Oracle User's Bash Profile

    Add the following lines to the /home/oracle/.bash_profile file

    ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
    ORACLE_HOME=$ORACLE_BASE/product/10.2/db_1; export ORACLE_HOME
    ORACLE_SID=ORCL; export ORACLE_SID
    ORACLE_TERM=xterm; export ORACLE_TERM
    PATH=/usr/sbin:$PATH; export PATH
    PATH=$ORACLE_HOME/bin:$PATH; export PATH
    LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
    CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

    This completes the preinstallation tasks.

    Install the Oracle Database

    Download the Oracle database setup and then run:


    $ gunzip 10201_database_linux_x86_64.cpio.gz
    $ cpio -idmv < 10201_database_linux_x86_64.cpio

    Now you are ready to run the installer
    Login as the oracle user and run:


    # ./runInstaller


    Post Installation

    After installing Oracle 10g R2 execute:
    $ lsnrctl

    LSNRCTL> start
    LSNRCTL> exit

    $ sqlplus sys/sys as sysdba

    SQL> startup 

    At this point your Oracle database should be up and running.

    Aziz √únsal

    Comments

    Popular posts from this blog

    PostgreSQL for Oracle Developers and DBA's