Oracle Pre-request (Check-list) : Install Grid & Oracle with ASM Standalone (Step By Step)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Step 1: List of RPM to support 10g, 11g and 12C (Via root)
==========================================================
rpm -Uvh binutils-2*x86_64*
rpm -Uvh glibc-2*x86_64* nss-softokn-freebl-3*x86_64*
rpm -Uvh glibc-2*i686* nss-softokn-freebl-3*i686*
rpm -Uvh compat-libstdc++-33*x86_64*
rpm -Uvh glibc-common-2*x86_64*
rpm -Uvh glibc-devel-2*x86_64*
rpm -Uvh glibc-devel-2*i686*
rpm -Uvh glibc-headers-2*x86_64*
rpm -Uvh elfutils-libelf-0*x86_64*
rpm -Uvh elfutils-libelf-devel-0*x86_64*
rpm -Uvh gcc-4*x86_64*
rpm -Uvh gcc-c++-4*x86_64*
rpm -Uvh ksh-*x86_64*
rpm -Uvh libaio-0*x86_64*
rpm -Uvh libaio-devel-0*x86_64*
rpm -Uvh libaio-0*i686*
rpm -Uvh libaio-devel-0*i686*
rpm -Uvh libgcc-4*x86_64*
rpm -Uvh libgcc-4*i686*
rpm -Uvh libstdc++-4*x86_64*
rpm -Uvh libstdc++-4*i686*
rpm -Uvh libstdc++-devel-4*x86_64*
rpm -Uvh make-3.81*x86_64*
rpm -Uvh numactl-devel-2*x86_64*
rpm -Uvh sysstat-9*x86_64*
rpm -Uvh compat-libstdc++-33*i686*
rpm -Uvh compat-libcap*
rpm -Uvh binutils-2.*
rpm -Uvh compat-libstdc++-33*
rpm -Uvh elfutils-libelf-0.*
rpm -Uvh libaio-0.*
rpm -Uvh libaio-devel-0.*
rpm -Uvh sysstat-9.*
rpm -Uvh glibc-2.*
rpm -Uvh glibc-common-2.*
rpm -Uvh glibc-devel-2.* glibc-headers-2.*
rpm -Uvh ksh-2*
rpm -Uvh make-3.*
rpm -Uvh libgcc-4.*
rpm -Uvh libstdc++-4.*
rpm -Uvh libstdc++-4.*.i686*
rpm -Uvh libstdc++-devel-4.*
rpm -Uvh gcc-4.*x86_64*
rpm -Uvh gcc-c++-4.*x86_64*
rpm -Uvh --allfiles elfutils-libelf-0*x86_64* elfutils-libelf-devel-0*x86_64*
rpm -Uvh elfutils-libelf-0*i686* elfutils-libelf-devel-0*i686*
rpm -Uvh libtool-ltdl*i686*
rpm -Uvh ncurses*i686*
rpm -Uvh readline*i686*
rpm -Uvh unixODBC*
Step 2: Configure the "/etc/hosts" file (Via root)
==================================================
if you are using standalone database server:
--------------------------------------------
192.168.56.101 oraerrors.localdomain oraerrorsStep 3: Change kernel parameters in "/etc/sysctl.conf" file (Via root)
==========================================================
Add or amend the following lines to the "/etc/sysctl.conf" file.
--------------------------------------------------------------------------------------------------------------------------
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 1054504960
kernel.shmmni = 4096
semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=1048586
Step 4: Run the command to take effect in kernel. (Via root)
=================================================
Run the following command to change the current kernel parameters.
/sbin/sysctl -p
Step 5: Configure the "/etc/security/limits.conf" file (Via root)
======================================================
Add the following lines to the "/etc/security/limits.conf" file.oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 4096
oracle hard nofile 65536
oracle soft stack 10240
grid soft nofile 65536
grid hard nofile 65536
grid soft nproc 16384
grid hard nproc 16384
Step 6: Configure the "/etc/pam.d/login" file (Via root)
==============================================
Add the following lines to the "/etc/pam.d/login" file, if it does not already exist.session required pam_limits.so
Step 7: Configure the "/etc/security/limits.d/90-nproc.conf" file (Via root)
==========================================================
Amend the "/etc/security/limits.d/90-nproc.conf" file as described below.
# Change this
* soft nproc 1024
# To this
* - nproc 16384
Step 8: Configure the "/etc/selinux/config" file (Via root)
==========================================================
Change the setting of SELinux to permissive by editing the "/etc/selinux/config" file, making sure the SELINUX flag is set as follows.
SELINUX=disabled
Step 8: Run the following command. (Via root)
=============================================
If you have the Linux firewall enabled, you will need to disable or configure it, as shown here or here. The following is an example of disabling the firewall.
# service iptables stop
# chkconfig iptables off
Step 9: Create directory structures for oracle & Gird home and inventory.(Via root)
==========================================================
For oracle user
++++++++++++++
mkdir -p /u01/app/oracle
mkdir -p /u01/app/oracle/product/11.2.0/db_1
For grid user
++++++++++++++
mkdir -p /u01/app/grid
mkdir -p /u01/app/grid/11.2.0/grid_home
mkdir -p /u01/app/oraInventory
Step 10: Add Groups & Create Grid and Oracle User. (Via root)
==========================================================
groupadd -g 200 oinstallgroupadd -g 201 dba
groupadd -g 202 oper
groupadd -g 203 asmdba
groupadd -g 204 asmoper
groupadd -g 205 asmadmin
useradd -u 200 -g oinstall -G dba,asmadmin,asmdba,oper -d /home/oracle oracle
useradd -u 201 -g oinstall -G dba,asmadmin,asmdba,oper -d /home/grid grid
[root@DBA01 Packages]# passwd oracle
[root@DBA01 Packages]# passwd grid
Step 11: Provide Permissions (Via root)
=======================================
chown -R oracle:oinstall /u01/app/oracle
chown -R oracle:oinstall /u01/app/grid/11.2.0/grid_home
chown -R oracle:oinstall /u01/app/oraInventory
chown -R grid:oinstall /u01/app/grid/
chown -R grid:oinstall /u01/app/oraInventory/
chown -R grid:oinstall /u01/app/grid/11.2.0/grid_home
chmod -R 775 /u01/
chmod -R 777 /opt
Step 12: Modifiy Grid & Oracle's .bash_profile (Via grid & oracle's users)
========================================================
vi .bash_profile for grid: (Via grid user)
++++++++++++++++++++++++++++++++++++++++++
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/grid/11.2.0/grid_home
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:/usr/bin:/usr/ccs/bin:/usr/local/bin:$PATH:.
export LD_LIBRARY_PATH=${ORACLE_HOME}/lib:${LD_LIBRARY_PATH}
vi .bash_profile for oracle: (Via oracle user)
++++++++++++++++++++++++++++++++++++++++++++++
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:/usr/bin:/usr/local/bin:$PATH:.
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
Step 13: Restart the Server. (Via root)
========================================
Please Restart the server for SELINUX value let set(apply) to disabledStep 14: Install and configure oracle ASM rpm and lib.(Via root)
==========================================================
Configure Oracleasm:
=================
[root@DBA03-ASM Packages]# ls -lrth *asmlib*
-rwxrwx---. 1 root vboxsf 13K Oct 15 01:17 oracleasmlib-2.0.4-1.el6.x86_64.rpm
[root@DBA03-ASM Packages]# ls -lrth *support*
-rwxrwx---. 1 root vboxsf 74K Feb 16 2013 oracleasm-support-2.1.8-1.el6.x86_64.rpm
[root@DBA01 Packages]# rpm -ivh oracleasm-support-2.1.8-1.el6.x86_64.rpm
warning: oracleasm-support-2.1.8-1.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing... ########################################### [100%]
1:oracleasm-support ########################################### [100%]
[root@DBA03-ASM Packages]# rpm -ivh oracleasmlib-2.0.4-1.el6.x86_64.rpm
warning: oracleasmlib-2.0.4-1.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing... ########################################### [100%]
1:oracleasmlib ########################################### [100%]
[root@DBA03-ASM Packages]# rpm -q -i oracleasmlib
Name : oracleasmlib Relocations: (not relocatable)
Version : 2.0.4 Vendor: Oracle Corporation
Release : 1.el6 Build Date: Tue 27 Mar 2012 01:52:44 AM IST
Install Date: Thu 15 Oct 2015 04:53:33 AM IST Build Host: ca-build44.us.oracle.com
Group : System Environment/Kernel Source RPM: oracleasmlib-2.0.4-1.el6.src.rpm
Size : 27192 License: Oracle Corporation
Signature : RSA/8, Tue 27 Mar 2012 01:52:51 AM IST, Key ID 72f97b74ec551f03
Packager : Joel Becker <joel.becker@oracle.com>
URL : http://oss.oracle.com/
Summary : The Oracle Automatic Storage Management library userspace code.
Description :
The Oracle userspace library for Oracle Automatic Storage Management
[root@DBA03-ASM Packages]# rpm -ivh oracleasm-support-2.1.8-1.el6.x86_64.rpm
warning: oracleasm-support-2.1.8-1.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing... ########################################### [100%]
1:oracleasm-support ########################################### [100%]
[root@DBA03-ASM Packages]# rpm -q -i oracleasm-support
Name : oracleasm-support Relocations: (not relocatable)
Version : 2.1.8 Vendor: Oracle Corporation
Release : 1.el6 Build Date: Sat 09 Feb 2013 04:16:49 AM IST
Install Date: Thu 15 Oct 2015 04:59:14 AM IST Build Host: ca-build44.us.oracle.com
Group : System Environment/Kernel Source RPM: oracleasm-support-2.1.8-1.el6.src.rpm
Size : 221696 License: GPL
Signature : RSA/8, Sat 09 Feb 2013 04:20:30 AM IST, Key ID 72f97b74ec551f03
Packager : Joel Becker <joel.becker@oracle.com>
URL : http://oss.oracle.com/projects/oracleasm/
Summary : The Oracle Automatic Storage Management support programs.
Description :
Tools to manage the Oracle Automatic Storage Management library driver
[root@DBA01 Packages]# which oracleasm
/usr/sbin/oracleasm
[root@DBA01 Packages]# oracleasm configure -i
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting <ENTER> without typing an
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: grid
Default group to own the driver interface []: oinstall
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
Step 15: Make partition in disk which added for ASM (Via root)
==========================================================
[root@DBA01 Packages]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x98420d76.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-783, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-783, default 783):
Using default value 783
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@DBA01 Packages]# fdisk /dev/sdc
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xec46acce.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-783, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-783, default 783):
Using default value 783
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks
Step 16: Initialization the ASM and create ASM disks (Via root)
==========================================================
[root@DBA01 Packages]# oracleasm initCreating /dev/oracleasm mount point: /dev/oracleasm
Loading module "oracleasm": oracleasm
Configuring "oracleasm" to use device physical block size
Mounting ASMlib driver filesystem: /dev/oracleasm
[root@DBA01 Desktop]# oracleasm status
Checking if ASM is loaded: yes
Checking if /dev/oracleasm is mounted: yes
[root@DBA01 Desktop]# oracleasm createdisk data /dev/sdb1
Writing disk header: done
Instantiating disk: done
[root@DBA01 Desktop]# oracleasm createdisk fra /dev/sdc1
Writing disk header: done
Instantiating disk: done
[root@DBA01 Desktop]#
[root@DBA01 Desktop]# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
No comments:
Post a Comment