vicker313 tech blog

January 15, 2009

Install Oracle 10g in Fedora Core 4 and 6

Filed under: Linux, Oracle — Tags: , , , — vicker313 @ 8:13 am

Methods below applied to Red Hat as well.

Pre-Installation

  1. Boot Fedora and log in as “root”

  2. Create a “dba” group and “oracle” user

    # groupadd dba

    # useradd -g dba oracle

    # passwd oracle

    Set user password as “oracle”

  3. Then set system parameter, edit “/etc/sysctl.conf” and add the following lines:

    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

    Reboot the machine or execute “sysctl -p” to apply bove settings

  4. Edit “/etc/pam.d/login” and add the following line:

    session required /lib/security/pam_limits.so

  5. Edit “/etc/security/limits.conf” and add the following line:

    oracle soft nproc 2047

    oracle hard nproc 16384

    oracle soft nofile 1024

    oracle hard nofile 65536

  6. Disable SELINUX. Edit “/etc/selinux/config”:

    SELINUX = disabled

    Reboot the machine to apply above settings

  7. Create oracle directories:

    # mkdir /opt/oracle

    # mkdir /opt/oracle/10gR2

    # chown -R oracle:dba /opt/oracle

  8. Set Oracle environment, edit “/home/oracle/.bash_profile” and add the following lines, remember to change ORACLE_SID to the right database name:

    ORACLE_BASE=/opt/oracle

    ORACLE_HOME=$ORACLE_BASE/10gR2

    ORACLE_SID=test10g

    LD_LIBRARY_PATH=$ORACLE_HOME/lib

    PATH=$PATH:$ORACLE_HOME/bin

    export ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH PATH

    Save the file and execute the following commands.

    # cd /home/oracle

    # . .bash_profile

  9. For Fedora Core 6, backup and edit “/etc/redhat-release”, change the version to “redhat-4”

  10. Verify whether the required packages are installed in the machine or not (for Fedora Core 4)

    rpm -q binutils gcc glibc glibc-headers glibc-kernheaders glibc-devel compat-libstdc++ cpp compat-gcc make compat-db compat-gcc-c++ compat-libstdc++ compat-libstdc++-devel openmotif openmotif21 setarch pdksh libaio libaio-devel

    “q” means query and “pdksh” renamed to “ksh” since Fedora Core 4

    1. For Fedora Core 6:

      # From Fedora Core 6 DVD or CDs

      rpm -iv setarch-*

      rpm -iv tcl-*

      rpm -iv libXau-devel-* libXp-*

      rpm -iv compat-db-*

      rpm -iv compat-libstdc++-33*

      rpm -iv compat-libf2c-34-*

      rpm -iv compat-gcc-34-*

      rpm -iv libaio-*

      rpm -iv compat-gcc-34-c++-*

      rpm -iv compat-libstdc++-296*

      rpm -iv compat-libgcc-296*

      # From download

      rpm -Uvh openmotif21-2.1.30-14.i386.rpm

  11. For a fresh install Fedora Core 4, install the following packages in this order:

    1. Install these packages first at Disk 3

      xorg-x11-deprecated-libs-devel, xorg-x11-devel, fontconfig-devel and freetype-devel

    2. Then install these packages at Disk 3

      compat-gcc-32, compat-libstdc++-296-2, compat-libstdc++-33-3, libaio, libaio-devel, openmotif-devel

    3. Then install package at Disk 2

      openmotif

    4. Finally install packages at Disk 4

      compat-gcc-32-c++, compat-gcc-32-g77

  12. For a fresh install Fedora Core 6, install the following packages in this order:

    1. Install these packages at Disk 2

      gcc, libgomp, glibc-headers, glibc-devel, libXau-devel

    2. Install these packages at Disk 3

      tcl, compat-db, compat-libstdc++-33, libaio, compat-libstdc++-296

    3. Install these packages at Disk 4

      libXp, compat-gcc-34, compat-libgcc-296

    4. Install these packages at Disk 5

      compat-libf2c-34, compat-gcc-34-c++

    5. Download and install

      openmotif21

Install

  1. Extract 10201_database_linux32.zip

  2. run installation

    ./runInstaller

  3. Installation Type Selection, select advance

  4. Set Inventory Directories and Group Name

  5. Edition Selection (Enterprise, Standard), select standard

  6. Set Home Details

  7. Check product specific prerequisite

  8. Configuration Option, create database

  9. Database configuration, select general purpose

  10. Database configuration, set Global Database Name and SID. Both set as “test10g”

  11. Database Management Option

  12. Database Storage Option, set “/opt/oracle/oradata”

  13. Disable backup and recovery options

  14. Database Schema password, set same password for all accounts, “oracle”

  15. Start install

Post-Installation

  1. Edit “/etc/oratab” and search for the line

    test10g:/opt/oracle/10gR2:N

    if the last character is “N”, change it to “Y”

  2. Edit “/opt/oracle/10gR2/bin/dbstart” and “/opt/oracle/10gR2/bin/dbshut”, change the line below (else the listener will not start)

    ORACLE_HOME_LISTNER = $ORACLE_HOME

  3. Create the startup script /etc/init.d/dbora (link below is a word document that contain the startup script, copy the code inside and paste in a new text file then save it as dbora)

    dbora

    Then execute commands below

    # chmod +x dbora

    # chkconfig ––add dbora

    Use following command to verify

    #chkconfig ––list dbora

  4. configure firewall, edit “/etc/sysconfig/iptables” and add the following line above line “commit”

    -A RH-Firewall-1-INPUT -m state ––state NEW -m tcp -p tcp ––dport 1521 -j ACCEPT

  5. Some common commands

    Start listener

    # lsnrctl start

    Start database

    # dbstart

    Start iSQLPLUS server, “http://localhost:5560/isqlplus” and “http://localhost:5560/isqlplus/dba

    # isqlplusctl start

    Start Database Configuration Assistant

    # dbca

    Start Enterprise Manager Server, “http://localhost:1158/em

    # emctl start dbconsole

    Start Database Update Assistant

    # dbua

    Start Worksheet

    # oemapp worksheet

    Start Enterprise Manager

    # oemapp console

    Start Network Configuration Assistance

    # netca

    Start Network Manager

    # netmgr

Advertisements

January 10, 2009

Install Fedora Core 6

Filed under: Linux — Tags: — vicker313 @ 8:08 am

Install medium:

  • 5 pieces of Fedora Core 6 Installation CD
  • Disk 1 is the boot disk, while Disk 2 to 5 contains the packages that can be installed. So it will depend on the Package Selection to see which CD will be needed.

Steps:

  1. Select Graphic Install
  2. Skip CD defect test
  3. Language selection, select “english”
  4. Keyboard selection, select “us english”
  5. Make partition
  6. Boot loader selection
  7. Network configuration
    1. disable DHCP and IPV6
    2. set host name “testserver”
    3. set static IP 10.10.10.10
    4. set mask 255.255.255.0
    5. set gateway
    6. set primary DNS
    7. set secondary DNS
  8. Timezone selection, select KL
  9. Set root account, password as “testserver” (minimum 6 characters)
  10. Package selection. Warning! Fedora Core 6 installation CD has bug at this stage, it is recommended to to continue the installation without select anything, don’t click anything other than “next” else it will crash. We can always install the packages after the installation.
  11. Start installation
  12. After installation and reboot, user needs to set firewall, date time, SELINUX and also create another system user
  13. Finish

Blog at WordPress.com.