Saturday, April 11, 2015

 

 

Oracle Database Installation Guide for Linux

Server should be started at runlevel 3 or runlevel 5
Server display cards provide atleast 1024 x 768 display resolution
Server should be connected to network
At least 6.9 GB disk space for an oracle grid infrastructure for a standalone server installation
At least 1 GB RAM for oracle database installation
At least 4 GB of RAM for Oracle Grid Infrastructure for a standalone server
At least 1 GB allocated for /tmp

Operating system checklist for Oracle Database Installation on Linux

               Ensure that OpenSSH is installed on your servers
               Configure a yum repository from the Oracle public yum site, and then install the oracle Preinstallation RPM

                      
                          
yum install oracle-rdbms-server-12cR1-preinstall
           cd /etc/yum.repos.d/

                         
wget http://public-yum.oracle.com/public-yum-ol6.repo

         The following package must be installed

                    binutils-2.23.52.0.1-12.el7.x86_64
                 compat-libcap1-1.10-3.el7.x86_64

                 gcc-4.8.2-3.el7.x86_64
                 gcc-c++-4.8.2-3.el7.x86_64
                
 glibc-2.17-36.el7.i686
         
      glibc-2.17-36.el7.x86_64
             
glibc-devel-2.17-36.el7.i686
             
glibc-devel-2.17-36.el7.x86_64  
             
ksh
             
libaio-0.3.109-9.el7.i686  
             
libaio-0.3.109-9.el7.x86_64  
             
libaio-devel-0.3.109-9.el7.i686
             
libaio-devel-0.3.109-9.el7.x86_64
             
libgcc-4.8.2-3.el7.i686
             
libgcc-4.8.2-3.el7.x86_64
             
libstdc++-4.8.2-3.el7.i686
             
libstdc++-4.8.2-3.el7.x86_64
             
libstdc++-devel-4.8.2-3.el7.i686
             
libstdc++-devel-4.8.2-3.el7.x86_64
             
libXi-1.7.2-1.el7.i686
             
 libXi-1.7.2-1.el7.x86_64
             
libXtst-1.2.2-1.el7.i686
             
libXtst-1.2.2-1.el7.x86_64
             
 make-3.82-19.el7.x86_64  
             
sysstat-10.1.5-1.el7.x86_64   
             libx package must be installed

Minimum Kernel Parameter

Parameter

Value

File

semmsl

semmns

semopm

semmni

250

32000

100

128

/proc/sys/kernel/sem

shmall

40 percent of the size of physical memory in pages

Note: If the server supports multiple databases, or uses a large SGA, then set this parameter to a value that is equal to the total amount of shared memory, in 4K pages, that the system can use at one time.

/proc/sys/kernel/shmall

shmmax

Half the size of physical memory in bytes refer Note 567506.1

/proc/sys/kernel/shmmax

shmmni

4096

/proc/sys/kernel/shmmni

panic_on_oops

1

/proc/sys/kernel/panic_on_oops

file-max

6815744

/proc/sys/fs/file-max

aio-max-nr

1048576

Note: This value limits concurrent outstanding requests and should be set to avoid I/O subsystem failures.

/proc/sys/fs/aio-max-nr

iplocal_port_range

Minimum: 9000

Maximum: 65500

/proc/sys/net/ipv4/ip_local_port_range

rmem_default

262144

/proc/sys/net/core/rmem_default

rmem_max

4194304

/proc/sys/net/core/rmem_max

wmem_default

262144

/proc/sys/net/core/wmem_default

wmem_max

1048576

/proc/sys/net/core/wmem_max

 

Displaying and Changing Kernel Parameter Values

semmsl, semmns, semopm, and semmni

# /sbin/sysctl -a | grep sem

This command displays the value of the semaphore parameters in the order listed.

shmall, shmmax, and shmmni

# /sbin/sysctl -a | grep shm

This command displays the details of the shared memory segment sizes.

file-max

# /sbin/sysctl -a | grep file-max

This command displays the maximum number of file handles.

ip_local_port_range

# /sbin/sysctl -a | grep ip_local_port_range

This command displays a range of port numbers.

rmem_default

# /sbin/sysctl -a | grep rmem_default

rmem_max

# /sbin/sysctl -a | grep rmem_max

wmem_default

# /sbin/sysctl -a | grep wmem_default

wmem_max

# /sbin/sysctl -a | grep wmem_max

aio-max-nr

# /sbin/sysctl -a | grep aio-max-nr

 

Configuring Users,Groups and Environments for Oracle Database

Assign oracle:dba to disk for ASM disk
asmdba / dba are same as oracle documentation
To determine if oracle owner software user named oracle or grid exist
 # id oracle
 If the oracle user exists, then the output from this command is similar to the following:
uid=54321(oracle) gid=54321(oinstall) groups=54322(dba),54323(oper)
Create oper group
# /usr/sbin/groupadd -g 54323 oper
 Creating the OSBACKUPDBA Group for Database Installations
# /usr/sbin/groupadd -g 54324 backupdba
Creating the OSDGDBA Group for Database Installations
# /usr/sbin/groupadd -g 54325 dgdba
Creating the OSKMDBA Group for Database Installations
# /usr/sbin/groupadd -g 54326 kmdba
Creating the OSDBA Group for Oracle Automatic Storage Management
# /usr/sbin/groupadd -g 54327 asmdba
Creating the OSOPER Group for Oracle Automatic Storage Management
# /usr/sbin/groupadd -g 54328 asmoper
Creating the OSASM Group for Oracle Automatic Storage Management
# /usr/sbin/groupadd -g 54329 asmadmin

Modfiy existing user

# /usr/sbin/usermod -g oinstall -G dba,asmdba,backupdba,dgdba,kmdba[,oper] oracle

Checking resource limits for Oracle software installation users

Table 5-1 Installation Owner Resource Limit Recommended Ranges

Resource Shell Limit

Resource

Soft Limit

Hard Limit

Open file descriptors

nofile

at least 1024

at least 65536

Number of processes available to a single user

nproc

at least 2047

at least 16384

Size of the stack segment of the process

stack

at least 10240 KB

at least 10240 KB, and at most 32768 KB

Maximum Locked Memory Limit

memlock

at least 90 percent of the current RAM when HugePages memory is enabled and at least 3145728 KB (3 GB) when HugePages memory is disabled

at least 90 percent of the current RAM when HugePages memory is enabled and at least 3145728 KB (3 GB) when HugePages memory is disabled

Log in as an installation owner.
Check the soft and hard limits for the file descriptor setting. Ensure that the result is in the recommended range, for example:
 $ ulimit –Sn
  
1024
 $ ulimit –Hn
 
65536
Check the soft and hard limits for the number of processes available to a user. Ensure that the result is in the recommended range, for example:
$ ulimit –Su
 
 2047
$ ulimit –Hu
 
16384
Check the soft limit for the stack setting. Ensure that the result is in the recommended range, for example:
$ ulimit –Ss
  
10240
$ ulimit –Hs
  
32768
Repeat this procedure for each Oracle software installation owner.
Optional

To ensure that X11 forwarding does not cause the installation to fail, create a user-level SSH client configuration file for the Oracle software owner user, as follows:

  1. Using any text editor, edit or create the software installation owner's ~/.ssh/config file.
  2. Ensure that the ForwardX11 attribute in the ~/.ssh/config file is set to no. For example:
  3. 3.  Host * ForwardX11 no
  4. Ensure that the permissions on the ~/.ssh are secured to the oracle or grid user. For example:
  5. 5.  $ ls -al .ssh
  6. 6.  total 28
  7. 7.  drwx------  2 oracle oinstall 4096 Jun 21 2012
  8. 8.  drwx------ 19 oracle oinstall 4096 Jun 21 2012
  9. 9.  -rw-r--r--  1 oracle oinstall 1202 Jun 21 2012 authorized_keys
  10. 10.-rwx------  1 oracle oinstall  668 Jun 21 2012 id_dsa
  11. 11.-rwx------  1 oracle oinstall  601 Jun 21 2012 id_dsa.pub
  12. -rwx------  1 oracle oinstall 1610 Jun 21 2012 known_hosts

Configuring Oracle Software Owner Environment

Set the default file mode creation mask (umask) to 022 in the shell startup file.
Set the DISPLAY environment variable.

Putting in .bash_profile
Umask 022

  $ TMP=/mount_point/tmp

  $ TMPDIR=/mount_point/tmp

  $ export TMP TMPDIR

Server Environment Configuration Checklist for Oracle Database Installation

/u01/app/oracle is an Oracle base directory created by the oracle user
/u01/app/oracle/oradata/test
/u01/app/oracle/product/12.1.0/dbhome_1 indicates the Oracle home directory for the first installation of Oracle Database on this system.
/u01/app/oracle/product/12.1.0/grid Oracle home directory for Oracle Grid Infrastructure 12c for a standalone server, for useroracle

Checking Shared Memory File System Mount on Linux

/dev/shm mount area is of type tmpfs and is mounted with the following options
With rw and execute permissions set on it
With noexec or nosuid not set on it
Use the following procedure to check the shared memory file system:
$ more /etc/fstab |grep "tmpfs"
If necessary, change the mount settings. For example, log in as root, open the /etc/fstab file with a text editor, and modify the tmpfs line:
tmpfs     /dev/shm     tmpfs     rw,exec      0 0

Disabling Transparent HugePages

Transparent HugePages memory is enabled by default with Red Hat Enterprise Linux 6,
To check if Transparent HugePages is enabled run one of the following commands as the root user

Red Hat Enterprise Linux kernels:

# cat /sys/kernel/mm/redhat_transparent_hugepage/enabled
Other kernels:
# cat /sys/kernel/mm/transparent_hugepage/enabled

The following is a sample output that shows Transparent HugePages is being used as the [always] flag is enabled.
[always] never

To disable Transparent HugePages perform the following steps:

Add the following entry to the kernel boot line in the/etc/grub.conf file:

2.  transparent_hugepage=never

For Ex

    title Oracle Linux Server (2.6.32-300.25.1.el6uek.x86_64)      
 root (hd0,0)

 kernel /vmlinuz-2.6.32-300.25.1.el6uek.x86_64 ro root=LABEL=/ transparent_hugepage=never

 initrd /initramfs-2.6.32-300.25.1.el6uek.x86_64.img

           Restart the system to make the changes permanent

 

Create the following directory

/u01/app/oraInventory
 Oracle base directory
 Oracle home directory

         Identifying an existing Oracle base directory
cat /u01/app/oraInventory/ContentsXML/inventory.xml
Oracle directory should have minimum of 6 GB space

Enter commands similar to the following to create the recommended subdirectories in the mount point directory 

 # mkdir -p /u01/app/oracle
 # chown -R oracle:oinstall /u01/app/oracle

# chmod -R 775 /u01/app/oracle

Setting Disk I/O Scheduler on Linux

http://docs.oracle.com/database/121/LADBI/pre_install.htm#LADBI7641

 

For best performance for Oracle ASM, Oracle recommends that you use the Deadline I/O Scheduler.

Enter the following command to ensure that the Deadline disk I/O scheduler is configured for use:
# echo deadline > /sys/block/${ASM_DISK}/queue/scheduler

Database Storage Options

12c database can be installed using ASM no file system allowed
Prior to 11gR1 ASM use to come as a part of database binaries
After 11gR2 and later it is coming as part of grid

Run CVU and Download and Install the ORAchk Health Check Tool

Downloading and Installing theORAchk Health Check Tool

Download and install the ORAchk utility to perform proactive heath checks for the Oracle software stack.
For information about downloading, configuring and running ORAchk utility, refer to My Oracle Support not
1268927.1
ORAchk is not supported on IBM: Linux on System z.

Configuring New or Upgraded Databases

You must run the utlrp.sql script after creating or upgrading a database. This script recompiles all PL/SQL modules that are in an invalid state, including packages, procedures, and types. You must run the utlrp.sql script immediately following the installation and not at a later date.

1.        Switch the user to oracle.

2.        Use the oraenv or coraenv script to set the environment for the database where you want to run the utlrp.sqlscript:

·         Bourne, Bash, or Korn shell:

·         $ . /usr/local/bin/oraenv

·         C shell:

·         % source /usr/local/bin/coraenv

When prompted, provide the SID for the database.

  1. Start SQL*Plus, as follows:

4.  $ sqlplus / AS SYSDBA

  1. Start the database in restricted mode and run theutlrp.sql script:

6.  SQL> STARTUP RESTRICT

SQL> $ORACLE_HOME/rdbms/admin/utlrp.sql

Checking NFS Buffer Size Parameters

fs_server:/vol/DATA/oradata /home/oracle/netapp nfs\
rw,bg,hard,nointr,rsize=32768,wsize=32768,tcp,actimeo=0,vers=3,timeo=600

Refer Note 359515.1

 

Setting TCP Network Protocol Buffer for Direct NFS Client

To check the current TCP buffer size, enter the following command:

# sysctl -a |grep -e net.ipv4.tcp_[rw]mem

The output of this command is similar to the following:

net.ipv4.tcp_rmem = 4096        87380   1048576

net.ipv4.tcp_wmem = 4096        16384   1048576

Oracle recommends that you set the value based on the link speed of your servers. For example, perform the following steps:

As root, use a text editor to open /etc/sysctl.conf, and add or change to the following:

# net.ipv4.tcp_rmem = 4096        87380   4194304
# net.ipv4.tcp_wmem = 4096        16384   4194304
Restart the network:

# /etc/rc.d/init.d/network restart

Use the following SQL*Plus views for managing Direct NFS Client in a single instance environment:

  • v$dnfs_servers: Shows a table of servers accessed using Direct NFS Client.
  • v$dnfs_files: Shows a table of files currently open using Direct NFS Client.
  • v$dnfs_channels: Shows a table of open network paths (or channels) to servers for which Direct NFS Client is providing files
  • v$dnfs_stats: Shows a table of performance statistics for Direct NFS Client

By default, Direct NFS Client is installed in a disabled state with single instance Oracle Database installations. To enable Direct NFS Client, complete the following steps:

Change the directory to$ORACLE_HOME/rdbms/lib.
Enter the following command:
make -f ins_rdbms.mk dnfs_on

Disabling Direct NFS Client

        Log in as the Oracle software installation owner, and disable Direct NFS Client using the following commands:

  cd $ORACLE_HOME/rdbms/lib

  make -f ins_rdbms.mk dnfs_off

          Remove the oranfstab file.

Enabling HCC on Direct NFS Client

To enable Hybrid Columnar Compression (HCC) on Direct NFS Client, perform the following steps:

1.       Ensure that SNMP is enabled on the ZFS storage server. For example:

2.  $ snmpget -v1 -c public server_name .1.3.6.1.4.1.42.2.225.1.4.2.0

3.  SNMPv2-SMI::enterprises.42.2.225.1.4.2.0 = STRING: "Sun Storage 7410"

4.       If SNMP is enabled on an interface other than the NFS server, then configure oranfstab using the managementparameter.

5.       If SNMP is configured using a community string other thanpublic, then configure oranfstab file using thecommunity parameter.

6.       Ensure that libnetsnmp.so is installed by checking ifsnmpget is available.

Different file location on oracle server

 

        http://docs.oracle.com/database/121/LADBI/appendix_ofa.htm#LADBI7921

 

Install ssh package

rpm -qa | grep ssh

To determine the physical RAM size, enter the following command:

# grep MemTotal /proc/meminfo

To determine the size of the configured swap space, enter the following command:

# grep SwapTotal /proc/meminfo

To determine the amount of space available in the /tmpdirectory, enter the following command:

#df -h /tmp

       To determine the amount of free RAM and disk swap space on the system, enter the following command:

Free

For enterprise  edition minimum of  6.4 GB size is required

 

Server Memory Minimum Requirements

Ensure that your system meets the following memory requirements:

Minimum: 1 GB of RAM

Recommended: 2 GB of RAM or more

Table 4-3 describes the relationship between the installed RAM and the configured swap space recommendation:

Table 4-3 Swap Space Requirement for Linux

RAM

Swap Space

Between 1 GB and 2 GB

1.5 times the size of the RAM

Between 2 GB and 16 GB

Equal to the size of the RAM

More than 16 GB

16 GB

 

http://docs.oracle.com/database/121/LADBI/pre_install.htm#LADBI7505

 

 

 

For Red Hat Enterprise Linux

 

http://docs.oracle.com/database/121/LADBI/pre_install.htm#LADBI8033

 

 

Using Oracle RPM Checker on IBM: Linux on System z

Use the Oracle RPM Checker utility to verify that you have the required Red Hat Enterprise Linux or SUSE packages installed on the operating system before you start the Oracle Database or Oracle Grid Infrastructure installation.

 note 1574412.1

# rpm -ivh ora-val-rpm-EL6-DB-12.1.0.1-1.s390x.rpm

On Red Hat Enterprise Linux, the utility checks and also installs all required RPMs. For example:

yum install ora-val-rpm-EL6-DB-12.1.0.1-1.s390x.rpm

Installing the cvuqdisk RPM for Linux

 

If you do not use an Oracle Preinstallation RPM, then you must install thecvuqdisk RPM. Without cvuqdisk, the Cluster Verification Utility cannot find shared disks, and you receive a "Package cvuqdisk not installed" error when you run the Cluster Verification Utility. Use thecvuqdisk RPM for your hardware (for example, x86_64, or i386).

To install the cvuqdisk RPM, complete the following procedure:

Locate the cvuqdisk RPM package, which is in the directory rpm on the Oracle Database installation media. If you installed Oracle Grid Infrastructure, then it is in the directory oracle_home1/cv/rpm.

Log in as root.

Use the following command to find if you have an existing version of the cvuqdisk package:

4.  # rpm -qi cvuqdisk

If you have an existing version, then enter the following command to deinstall the existing version:

# rpm -e cvuqdisk

Set the environment variable CVUQDISK_GRP to point to the group that owns cvuqdisk, typically oinstall, for example:

6.  # CVUQDISK_GRP=oinstall; export CVUQDISK_GRP

In the directory where you have saved the cvuqdisk RPM, use the following command to install the cvuqdiskpackage:

7.  rpm -iv package

For example:

# rpm -iv cvuqdisk-1.0.9-1.rpm

 Setting the mask to 022 ensures that the user performing the software installation creates files with 644 permissions.

 

/usr/sbin/groupadd -g 54323 oper
/usr/sbin/groupadd -g 54324 backupdba
/usr/sbin/groupadd -g 54325 dgdba
/usr/sbin/groupadd -g 54326 kmdba
/usr/sbin/groupadd -g 54327 asmdba
/usr/sbin/groupadd -g 54328 asmoper
/usr/sbin/groupadd -g 54329 asmadmin
/usr/sbin/groupadd -g 54322 oinstall
/usr/sbin/groupadd -g 54321 dba
/usr/sbin/useradd -g oinstall -G dba,oper oracle

/usr/sbin/usermod -g oinstall -G dba,asmdba,backupdba,dgdba,kmdba,oper oracle

No comments:

Post a Comment

  Diagnosing a long parsing issue in Oracle Database Slide 1: Topic: Diagnosing a Long Parsing Issue in Oracle Database Slide 2: Parsing is ...