Tag: Installation

  • Update .bash_profile to display user and path of the Home and Environmental Variable

    PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin:.
    
    export PATH
    
    if [ -s "$MAIL" ]           # This is at Shell startup.  In normal
    then echo "$MAILMSG"        # operation, the Shell checks
    fi                          # periodically.
    
    export PS1="$USER-`uname -n`:\$PWD>"
    
    export umask=022
    export TERM=ansi
    export ORACLE_TERM=hft
    export ORACLE_HOME=$HOME
    export ORACLE_BASE=/home/data/u01
    export TNS_ADMIN=$ORACLE_HOME/network/admin
    export PATH=$ORACLE_HOME/bin:$PATH
    
    if [ "$DISPLAY" = "" ]
    then
    whoFlags="-m"
    case "$( uname -s )" in
    HP-UX) display="$(who -mR | sed 's/^.*(//' | sed 's/).*$//')" ;;
    AIX) display="$(who -m | sed 's/^.*(//' | sed 's/).*$//')" ;;
    SunOS) display="$(who -m | sed 's/^.*(//' | sed 's/).*$//')" ;;
    IRIX*) display="$REMOTEHOST" ;;
    Linux) display="$(who -m | sed 's/^.*(//' | sed 's/).*$//')" ;;
    esac
    if [ "$display" != "" -a "$display" != ":0.0" ]
    then
    export DISPLAY="$display:0.0"
    echo
    echo "DISPLAY set to $DISPLAY"
    echo
    fi
    if [ "$display" = ":0.0" ]; then export DISPLAY=":0.0"; fi
    fi
    
    user=$USER
    ps -fu $user
    
  • Oracle 19c Database Installation

    Installing Oracle Database 19c involves several steps, and the process can vary based on your operating system and specific requirements. Here’s a general outline of the steps you would follow for installing Oracle Database 19c:

    1. Prerequisites and Preparation:
      • Review the Oracle Database 19c documentation and installation guides for your specific operating system.
      • Ensure your system meets the hardware and software prerequisites, including memory, disk space, and compatible operating system versions.
      • Download the Oracle Database 19c installation files from Oracle’s official website.
      • Create a dedicated user (often named oracle) to perform the installation and manage the Oracle software.

    Update hosts parameter to point the DNS and IP to your server

    vi /etc/hosts

    After, updating changes in the Hosts file, we will proceed further.

    We have two options Manual Configuration and RPM based configuration. We are going to see RPM based installation first.

    RPM based Configuration

    yum install -y oracle-database-preinstall-19c

    Now, after rpm installation, we need to set ORACLE user password.

    passwd oracle

    Note: In case of Active Directory server configuration, you need to disable the nsswitch.conf first by editing and removing sss

    vi /etc/nsswitch.conf

    After setting the password for the oracle user, we need to create the directory for ORACLE_HOME

    mkdir -p /u01/app/oracle/product/19.3/db_home
    chown -R oracle:oinstall /u01
    chmod -R 775 /u01

    We need to change the user to Oracle user and set the bash profile.

    su - oracle
    vi .bash_profile

    Add below entries

    # Get the aliases and functions
    if [ -f ~/.bashrc ]; then
    	. ~/.bashrc
    fi
    
    # User specific environment and startup programs
    
    ## Adding for Oracle Database 19c##
    
    export ORACLE_BASE=/u01/app/oracle
    export ORACLE_HOME=/u01/app/oracle/product/19.3/db_home
    
    export ORACLE_SID=ORCL
    
    export LD_LIBRARY_PATH=\$ORACLE_HOME/lib:/lib:/usr/lib
    export CLASSPATH=\$ORACLE_HOME/jlib:\$ORACLE_HOME/rdbms/jlib
    export NLS_LANG=american_america.al32utf8
    export NLS_DATE_FORMAT="yyyy-mm-dd:hh24:mi:ss"
    
    PATH=$PATH:$HOME/.local/bin:$ORACLE_HOME/bin
    export PATH

    Now execute the bash profile to take the effects.

    . .bash_profile

    Manual Configuration

    Install required RPM mentioned below for OEL 7.9

    yum install -y bc binutils compat-libcap1 compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel fontconfig-devel glibc glibc-devel ksh libaio libaio-devel libXrender libXrender-devel libX11 libXau libXi libXtst libgcc libstdc++ libstdc++-devel libxcb make policycoreutils policycoreutils-python smartmontools sysstat

    For SUSE Linux 15 install below mentioned RPMs

    bc
    binutils
    glibc
    glibc-devel
    insserv-compat
    libaio-devel
    libaio1
    libX11-6
    libXau6
    libXext-devel
    libXext6
    libXi-devel
    libXi6
    libXrender-devel
    libXrender1
    libXtst6
    libcap-ng-utils
    libcap-ng0
    libcap-progs
    libcap1
    libcap2
    libelf1
    libgcc_s1
    libjpeg8
    libpcap1
    libpcre1
    libpcre16-0
    libpng16-16
    libstdc++6
    libtiff5
    libgfortran4
    mksh
    make
    pixz
    rdma-core
    rdma-core-devel
    smartmontools
    sysstat
    xorg-x11-libs
    xz

    On SUSE Linux Enterprise Server, to install the latest bc package using YaST, run the following command:

    yast --install bc

    Add the following lines to the “/etc/sysctl.conf” file, or in a file called “/etc/sysctl.d/98-oracle.conf”.

    # oracle-database-preinstall-19c setting for fs.file-max is 6815744
    fs.file-max = 6815744
    
    # oracle-database-preinstall-19c setting for kernel.sem is '250 32000 100 128'
    kernel.sem = 250 32000 100 128
    
    # oracle-database-preinstall-19c setting for kernel.shmmni is 4096
    kernel.shmmni = 4096
    
    # oracle-database-preinstall-19c setting for kernel.shmall is 1073741824 on x86_64
    kernel.shmall = 1073741824
    
    # oracle-database-preinstall-19c setting for kernel.shmmax is 4398046511104 on x86_64
    kernel.shmmax = 4398046511104
    
    # oracle-database-preinstall-19c setting for kernel.panic_on_oops is 1 per Orabug 19212317
    kernel.panic_on_oops = 1
    
    # oracle-database-preinstall-19c setting for net.core.rmem_default is 262144
    net.core.rmem_default = 262144
    
    # oracle-database-preinstall-19c setting for net.core.rmem_max is 4194304
    net.core.rmem_max = 4194304
    
    # oracle-database-preinstall-19c setting for net.core.wmem_default is 262144
    net.core.wmem_default = 262144
    
    # oracle-database-preinstall-19c setting for net.core.wmem_max is 1048576
    net.core.wmem_max = 1048576
    
    # oracle-database-preinstall-19c setting for net.ipv4.conf.all.rp_filter is 2
    net.ipv4.conf.all.rp_filter = 2
    
    # oracle-database-preinstall-19c setting for net.ipv4.conf.default.rp_filter is 2
    net.ipv4.conf.default.rp_filter = 2
    
    # oracle-database-preinstall-19c setting for fs.aio-max-nr is 1048576
    fs.aio-max-nr = 1048576
    
    # oracle-database-preinstall-19c setting for net.ipv4.ip_local_port_range is 9000 65500
    net.ipv4.ip_local_port_range = 9000 65500

    Run one of the following commands to change the current kernel parameters, depending on which file you edited.

    /sbin/sysctl -p
    # Or
    /sbin/sysctl -p /etc/sysctl.d/98-oracle.conf

    Add following parameter in this file /etc/security/limits.d/oracle-database-preinstall-19c.conf

    # oracle-database-preinstall-19c setting for nofile soft limit is 1024
    oracle   soft   nofile    1024
    
    # oracle-database-preinstall-19c setting for nofile hard limit is 65536
    oracle   hard   nofile    65536
    
    # oracle-database-preinstall-19c setting for nproc soft limit is 16384
    # refer orabug15971421 for more info.
    oracle   soft   nproc    16384
    
    # oracle-database-preinstall-19c setting for nproc hard limit is 16384
    oracle   hard   nproc    16384
    
    # oracle-database-preinstall-19c setting for stack soft limit is 10240KB
    oracle   soft   stack    10240
    
    # oracle-database-preinstall-19c setting for stack hard limit is 32768KB
    oracle   hard   stack    32768
    
    # oracle-database-preinstall-19c setting for memlock hard limit is maximum of 128GB on x86_64 or 3GB on x86 OR 90 % of RAM
    oracle   hard   memlock    134217728
    
    # oracle-database-preinstall-19c setting for memlock soft limit is maximum of 128GB on x86_64 or 3GB on x86 OR 90% of RAM
    oracle   soft   memlock    134217728
    
    # oracle-database-preinstall-19c setting for data soft limit is 'unlimited'
    oracle   soft   data    unlimited
    
    # oracle-database-preinstall-19c setting for data hard limit is 'unlimited'
    oracle   hard   data    unlimited

    Create the Oracle groups and users.

    groupadd -g 54321 oinstall
    groupadd -g 54322 dba
    groupadd -g 54323 oper
    
    useradd -u 54321 -g oinstall -G dba,oper oracle

    Set the password for the “oracle” user.

    passwd oracle

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

    SELINUX=permissive

    To make the changes effective, run the below command

    setenforce Permissive

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

    mkdir -p /u01/app/oracle/product/19.3/db_home
    chown -R oracle:oinstall /u01
    chmod -R 775 /u01


    We need to change the user to Oracle user and set the bash profile.su – oracle vi .bash_profile

    # Get the aliases and functions
    if [ -f ~/.bashrc ]; then
    	. ~/.bashrc
    fi
    
    # User specific environment and startup programs
    
    ## Adding for Oracle Database 19c##
    
    export ORACLE_BASE=/u01/app/oracle
    export ORACLE_HOME=/u01/app/oracle/product/19.3/db_home
    
    export ORACLE_SID=ORCL
    
    export LD_LIBRARY_PATH=\$ORACLE_HOME/lib:/lib:/usr/lib
    export CLASSPATH=\$ORACLE_HOME/jlib:\$ORACLE_HOME/rdbms/jlib
    export NLS_LANG=american_america.al32utf8
    export NLS_DATE_FORMAT="yyyy-mm-dd:hh24:mi:ss"
    
    PATH=$PATH:$HOME/.local/bin:$ORACLE_HOME/bin
    export PAT
    . .bash_profile.

    Database Installation

    We will going to perfor Database Insatallation using silent method.

    Download the Database software from edelivery website using wget or on windows machine and later transfer it to using winscp software.

    Now unzip the software to the oracle home location.

    unzip oracledb19  -d /u01/app/oracle/product/19.3/db_home

    Navigate to the ORACLE_HOME and execute runInstaller in silent mode.

    ./runInstaller -ignorePrereq -waitforcompletion -silent \ -responseFile ${ORACLE_HOME}/install/response/db_install.rsp \ oracle.install.option=INSTALL_DB_SWONLY \ ORACLE_HOSTNAME=${ORACLE_HOSTNAME} \ UNIX_GROUP_NAME=oinstall \ INVENTORY_LOCATION=${ORA_INVENTORY} \ SELECTED_LANGUAGES=en,en_GB \ ORACLE_HOME=${ORACLE_HOME} \ ORACLE_BASE=${ORACLE_BASE} \ oracle.install.db.InstallEdition=EE \ oracle.install.db.OSDBA_GROUP=dba \ oracle.install.db.OSBACKUPDBA_GROUP=dba \ oracle.install.db.OSDGDBA_GROUP=dba \ oracle.install.db.OSKMDBA_GROUP=dba \ oracle.install.db.OSRACDBA_GROUP=dba \ SECURITY_UPDATES_VIA_MYORACLESUPPORT=false \ DECLINE_SECURITY_UPDATES=true

    Run the required script, as root user

    Now, navigate to the ORACLE_HOME/bin and run DBCA to create the database.

    cd $ORACLE_HOME/bin
    ./dbca

    Enjoy..!