Forgot your password?    
+ Reply to Thread
Results 1 to 3 of 3

Thread: Install Oracle 10g Release 2 on RHEL 5

  1. #1
    Oracle Administrator
    Join Date
    Feb 2012
    Location
    New Delhi, India
    Posts
    53

    Install Oracle 10g Release 2 on RHEL 5

    This is a step by step guide, which will walk you through the installation of Oracle 10g on RHEL 5.1 (Red Hat Enterprise Linux 5.1) 32-bit architecture.

    The first thing we need to verify is, if the hardware we have is okay for an Oracle 10g Installation.

    -- Check Physical RAM.
    # grep MemTotal /proc/meminfo
    MemTotal: 2075424 kB

    /*
    We need at least 1024 MB of physical RAM.
    In my case I have 2048 MB.
    */
    -- Check Swap Space.
    # grep SwapTotal /proc/meminfo
    SwapTotal: 3148732 kB

    /*
    RAM up to 1024MB then swap = 2 times the size of RAM
    RAM between 2049MB and 8192MB then swap = equal to the size of RAM
    RAM more than 8192MB then swap size = 0.75 times the size of RAM
    Since my RAM is 2048MB, so I have 3072 MB of Swap Size.
    */

    -- Check space available in /tmp
    # df -h /tmp
    Filesystem Size Used Avail Use% Mounted on
    /dev/sda5 1.5G 35M 1.4G 3% /tmp

    /*
    You need to have at least 400 MB of space in the /tmp directory.
    Make sure you have 400MB in the column "Avail" in the above output.
    In my case I have 1.4G space available in /tmp.
    */

    -- Check space for Oracle Software and pre-configured database.
    -- I have created a separate partition "/u01" for Oracle Software
    -- and database files
    # df -h /u01
    Filesystem Size Used Avail Use% Mounted on
    /dev/sda2 15G 166M 14G 2% /u01

    -- I have 14G available space on the partition /u01.
    /*
    Space requirement for Oracle Software:
    Enterprise Edition 2.5G
    Standard Edition 2.3G
    Custom (maximum) 3G

    Space requirement for Oracle Database Files:
    1.2 G
    (
    creating a database is always optional with oracle installation.
    Can be done later.
    )
    */

    Once all hardware requirements are verified, we will proceed with further configuration.
    Make sure that there is an entry in /etc/hosts file for your machine like this:

    [IP-address] [fully-qualified-machine-name] [machine-name]

    /*
    Where "fully-qualified-machine-name" is your
    "machine_name"."domain_name"
    */

    Next we need to adjust the Linux Kernel Parameters to support Oracle.
    Open /etc/sysctl.conf and add the following lines:

    # Oracle settings
    kernel.shmall = 2097152
    kernel.shmmax = 2147483648
    kernel.shmmni = 4096
    kernel.sem = 250 32000 100 128
    fs.file-max = 65536
    net.ipv4.ip_local_port_range = 1024 65000
    net.core.rmem_default = 262144
    net.core.rmem_max = 262144
    net.core.wmem_default = 262144
    net.core.wmem_max = 262144

    Note: You may find the parameters mentioned above already present in the /etc/sysctl.conf file. If they have a value lower then mentioned above then make sure you change it, but if they have a larger value then perhaps its safe to leave it as is.

    -- Make the kernel parameters changes effective immediately:
    # /sbin/sysctl -p

    -- Verify the parameters are changed or not?
    # /sbin/sysctl -a | grep name_of_kernel_parameter -- e.g. shmall

    Now setup User that we will use as Oracle owner and the groups that it will need for installing and managing Oracle.

    /usr/sbin/groupadd oinstall
    /usr/sbin/groupadd dba
    /usr/sbin/useradd -g oinstall -G dba oracle
    /usr/bin/passwd oracle

    Create directories where the Oracle Software and database will be installed.

    mkdir -p /u01/app/oracle/product/10.2.0/db_1
    chown -R oracleinstall /u01
    chmod -R 775 /u01

    Now set the shell limits for the user Oracle.
    Open /etc/security/limits.conf and add these lines.

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

    Where "nproc" is the maximum number of processes available to the user and "nofiles" is the number of open file descriptors.

    Open /etc/pam.d/login and add the following line if it is already not there.

    session required pam_limits.so

    Disable secure linux by editing the /etc/selinux/config file, making sure the SELINUX flag is set as follows:

    SELINUX=disabled

    If you leave SELINUX=enforcing then you may get an error later while starting sqlplus:
    sqlplus: error while loading shared libraries:
    /usr/lib/oracle/default/client64/lib/libclntsh.so.11.1: cannot restore segment
    prot after reloc: Permission denied

    Now we need to make sure we have all necessary packages for Oracle. Put your Linux Media into DVD and go to the "Server" directory.

    cd /dvd_mount_point/Server

    For RHEL 5 (32-bit):

    rpm -Uivh binutils-2*
    rpm -Uivh gcc-c++-4*
    rpm -Uivh libgcc-4*
    rpm -Uivh libstdc++-4*
    rpm -Uivh libstdc++-devel-4*
    rpm -Uivh setarch-2*
    rpm -Uivh make-3*
    rpm -Uivh glibc-2*`uname -p`*
    rpm -Uivh libaio-0*
    rpm -Uivh compat-libstdc++-33-3*
    rpm -Uivh compat-gcc-34-3*
    rpm -Uivh compat-gcc-34-c++-3*
    rpm -Uivh gcc-4*
    rpm -Uivh libXp-1*
    rpm -Uivh openmotif-2*
    rpm -Uivh compat-db-4*

    For RHEL 5 (64-bit):

    rpm -Uivh binutils-2*`uname -p`*
    rpm -Uivh compat-db-4*`uname -p`*
    rpm -Uivh compat-gcc-34-3*`uname -p`*
    rpm -Uivh compat-gcc-34-c++-3*`uname -p`*
    rpm -Uvih compat-libstdc++-33*`uname -p`*
    rpm -Uvih compat-libstdc++-33*i386*
    rpm -Uvih compat-libstdc++-296*i386*
    rpm -Uvih gcc-4*`uname -p`*
    rpm -Uvih gcc-c++-4*`uname -p`*
    rpm -Uivh glibc-2*`uname -p`*
    rpm -Uvih glibc-devel-2*i386*
    rpm -Uvih glibc-devel-2*`uname -p`*
    rpm -Uvih glibc-headers-2*`uname -p`*
    rpm -Uvih kernel-headers-2*`uname -p`*
    rpm -Uivh libaio-0*`uname -p`*
    rpm -Uivh libgcc-4*`uname -p`*
    rpm -Uvih libgomp-4*`uname -p`*
    rpm -Uivh libstdc++-4*`uname -p`*
    rpm -Uvih libstdc++-devel-4*`uname -p`*
    rpm -Uvih libXp-1*i386*
    rpm -Uvih libXp-1*`uname -p`*
    rpm -Uivh make-3*`uname -p`*
    rpm -Uivh openmotif-2*`uname -p`*
    rpm -Uivh setarch-2*`uname -p`*
    rpm -Uvih sysstat-7*`uname -p`*

    NOTE: If you are using RHEL5 DVD then you should find them all in the "Server" directory in your DVD. And if you don't find one there you may download it from the Linux vendor's Web site.
    If you have your Linux distribution in 3 CDs then these will be scattered on all three CDs in the Server directory on all CDs.

    Oracle 10g is not certified to be installed on RHEL 5, therefore, it runs a check on the operating system when the installer starts and will bounce back with an error if the redhat release is not redhat-4 or redhat-3 etc.
    Open /etc/redhat-release, remove whatever release is specified over there and put this:

    redhat-4

    The release specification that was in the /etc/redhat-release file, keep it somewhere safe as we will have to revert back the redhat-release file once Oracle Installation is complete. In my case it is "Red Hat Enterprise Linux Server release 5.1 (Tikanga)"

    Allow the user oracle to use X server, which it will need to run Oracle Universal Installer.

    # xhost +SI:localuserracle

    Now switch to the user oracle.

    # su - oracle

    -- Let's see which shell is being used by the user Oracle.
    $ echo $SHELL
    /bin/bash

    If the returned shell is bash then open ~/.bash_profile and add these lines:

    # Oracle settings
    TMP=/tmp; export TMP
    TMPDIR=$TMP; export TMPDIR

    # If /tmp doesn't have 400mb space free then you can workaround it
    # by pointing the variables TMP AND TMPDIR to a location where you
    # have sufficient space. Oracle will then use this directory for
    # temporary files.

    ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
    ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
    ORACLE_SID=ora10g; 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

    if [ $USER = "oracle" ]; then
    if [ $SHELL = "/bin/ksh" ]; then
    ulimit -p 16384
    ulimit -n 65536
    else
    ulimit -u 16384 -n 65536
    fi
    fi

    If using C shell then open ~/.login and add these lines:

    # Oracle settings
    setenv TMP=/tmp
    setenv TMPDIR=$TMP

    # If /tmp doesn't have 400mb space free then you can workaround it
    # by pointing the variables TMP AND TMPDIR to a location where you
    # have sufficient space. Oracle will then use this directory for
    # temporary files.

    setenv ORACLE_BASE /u01/app/oracle
    setenv ORACLE_HOME $ORACLE_BASE/product/10.2.0/db_1
    setenv ORACLE_SID ora10g
    setenv ORACLE_TERM xterm
    setenv PATH /usr/sbin:$PATH
    setenv PATH $ORACLE_HOME/bin:$PATH

    setenv LD_LIBRARY_PATH $ORACLE_HOME/lib:/lib:/usr/lib
    setenv CLASSPATH $ORACLE_HOME/JRE:$ORACLE_HOME/jlib
    setenv CLASSPATH $CLASSPATH:$ORACLE_HOME/rdbms/jlib

    if ( $USER == "oracle" ) then
    limit maxproc 16384
    limit descriptors 65536
    endif

    Now run the following command to make these changes effective in the current session of user oracle.

    -- for bash shell
    $ source ~/.bash_profile
    -- for C shell
    $ source ~/.login

    The environment is ready for oracle installation. Its time to prepare the oracle installation media now.
    Download or Copy the oracle media to the oracle user home directory i.e. /home/oracle.
    Once Download/Copy is done unzip the media as follows:

    $ cd /home/oracle/
    $ unzip 10201_database_linux32.zip

    Once the unzip is finished go to the "database" directory unzipped in the previous step and start the Oracle Universal Installer.

    $ cd /home/oracle/database/
    $ ./runInstaller

    The OUI (Oracle Universal Installer) should start and you should see following screens in the order given below:

    1. Select the installation Method (Advanced or Basic). I usually select advanced here.

    Select Installation Method

    2. Provide the Oracle Installation Inventory directory and the oracle installation group i.e. oinstall in our case. If you have properly configured your environment as suggested above you may leave this page to the defaults.

    Inventory directory and credentials

    3. Select the installation type (Enterprise or Standard Edition or Custom Installation). Select "Enterprise Edition".

    Select Installation Type

    4. Specify Oracle home for this installation. As we have set $ORACLE_HOME in our configuration before so it is picked up automatically by the installer.

    Oracle Home

    5. Oracle will now perform pre-requisite checks. Make sure they all are executed and succeeded. If "Checking Network Configuration requirements" check is not executed, it should be fine. It will display a warning that your primary network interface should be configured using a static IP (not DHCP) for oracle to function properly. If this is true for your system just tick the checkbox against this check and you will se its status become "User Verified".

    Product Specific Prerequisite Checks

    6. Select the configuration option. We want to create an oracle database with this installation and it will not be an ASM based installation so select "Create a database".

    Select Configuration Option

    7. When we choose to create a database, this page shows up asking the database configuration. Choose the database type you wish to create.

    Select Database Configuration

    8. Specify database configuration options e.g. database SID and characterset.

    Specify Database Configuration Option

    9. Select whether you want to use Grid Control or Database Control with this database.

    Select Database Management Options

    10. Select database storage options. File System, ASM or Raw Devices.

    Specify Database Storage Options

    11. Choose your backup and recovery options.

    Specify Backup and Recovery Options

    12. Provide passwords for database schemas. Different password for each user or one master password for all.

    Specify Database Schema Passwords

    13. This is the installation summary. Review it and press "Install" to start the installation.

    Installation Summary

    14. The installation started and will take several minutes.

    Installation Progress

    15. Once the installation is complete the configuration assistants will start. They will configure the Oracle Net and the database itself.

    Configuration Assistants

    16. This is the database configuration assistant (DBCA) which should automatically start from the Configuration Assistants screen in the Oracle Installer..

    Database Configuration Assistant

    17. Once database creation is complete the DBCA will show you a summary about the database it created.

    Database Summary

    18. Once the DBCA is complete oracle will then ask you to log in as root and execute two script.

    Execute Configuration Scripts

    Open another console and login as root. Execute following once logged in successfully.

    # /u01/app/oracle/oraInventory/orainstRoot.sh
    Changing permissions of /u01/app/oracle/oraInventory to 770.
    Changing groupname of /u01/app/oracle/oraInventory to oinstall.
    The execution of the script is complete

    # /u01/app/oracle/product/10.2.0/db_1/root.sh
    Running Oracle10 root.sh script...

    The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME= /u01/app/oracle/product/10.2.0/db_1

    Enter the full pathname of the local bin directory: [/usr/local/bin]:
    Copying dbhome to /usr/local/bin ...
    Copying oraenv to /usr/local/bin ...
    Copying coraenv to /usr/local/bin ...


    Creating /etc/oratab file...
    Entries will be added to the /etc/oratab file as needed by
    Database Configuration Assistant when a database is created
    Finished running generic part of root.sh script.
    Now product-specific root actions will be performed.

    19. When configuration scripts are executed successfully by root press OK in the installer and you will this "End of Installation" page. Note down the management URLs and press "Exit".

    End of installation

    Now go ahead and revert back the /etc/redhat-release file to whatever it was before we started the installation.

    Red Hat Enterprise Linux Server release 5.1 (Tikanga)
    Regards_____
    D
    evesh Chaurasia

    Oracle Administrator

  2. #2
    Oracle DBA
    Join Date
    Oct 2012
    Posts
    1
    Dear Devesh

    How can I increase SWAP space and tmp space

    Thanks
    Md. Tanweer

  3. #3
    Administrator
    Join Date
    Oct 2011
    Posts
    13
    Become a superuser (root) by typing:

    su
    password

    Create a file in a selected directory to add swap space by typing:

    dd if=/dev/zero of=/dir/myswapfile bs=1024 count=number_blocks_needed

    where dir is a directory in which you have permission to add swap space. The myswapfile is the name of the swap file you are creating. The number_blocks_needed is an amount of 1024-byte blocks you want to create. See the dd(1) man page for more information.
    Verify that the file was created by typing:

    ls -l /dir/myswapfile

    The new file appears in the directory.
    Initialize the new swap area by typing:

    mkswap /dir/myswapfile

    See the mkswap(8) man page for more detailed information.
    Run the swapon command to enable the new swap space for paging and swapping by typing the following:

    swapon -a /dir/myswapfile

    Verify that the extra swap space was added by typing:

    swapon -s

    The output shows the allocated swap space.


    Pradip K. | Sr. Oracle Apps DBA
    www.dbalounge.com
    Contact me: er.pradeepkr erpradeepkr
    A creative man is motivated by the desire to achieve, not by the desire to beat others.
    ---------------------------------------------------------------------------------------
    TAGS: DBA Lounge Provides Oracle DBA Training Services. This includes Online Training, Classroom based Training at Noida (Delhi NCR).
    Students come form Delhi,Gurgaon,Noida,Ghaziabad,Faridabad,Greater Noida.
    Trainings : Oracle Database,10G,11G,RAC,Apps,11i,R12,Fusion Middleware,WebLogic,OID,OBIEE,WebCenter.
    We plan to commence Oracle DBA Training at Chandigarh,Mohali,Panchkula,Bangalore,Jaipur,Pune, Mumbai,Jammu and Hyderabad soon.

+ Reply to Thread

Similar Threads

  1. Error during installation of Oracle for release / OS Version not certified
    By sandeep.negi27 in forum Database Installation,Upgrades,Migration,Patching and Cloning
    Replies: 5
    Last Post: 06-26-2012, 10:15 PM
  2. How to install ASM instance on a non-asm Oracle database
    By devesh_ocp in forum RAC Installation, ASM Install , ASM Administration
    Replies: 0
    Last Post: 04-26-2012, 02:17 PM
  3. not able to install oracle
    By manishkr23 in forum Database Installation,Upgrades,Migration,Patching and Cloning
    Replies: 2
    Last Post: 01-05-2012, 04:50 PM
  4. Install or Relink Errors with 32 bit Oracle on 64 bit OS
    By Hemant in forum Oracle Apps Patching and Cloning, Installation , Migration,Upgrades
    Replies: 0
    Last Post: 12-07-2011, 12:21 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

DBA Lounge (P) Ltd. deals in Oracle Technologies on Consulting, Resourcing, Corporate Training


Online and corporate training available on Oracle Database 11g, Oracle 11g Real Application Cluster (RAC), Oracle Applications 11i/R12, Oracle Fusion Middleware 11g, Oracle Identity Management-OIM, Oracle Internet Directory 11g-OID, Oracle Business Intelligence Enterprise Edition-OBIEE, Oracle Golden Gate, Oracle Access Management-OAM, Oracle Internet Directory-ODS, Oracle Identity Analytics Architecture-OIA Statistics