Sunteți pe pagina 1din 4

Rac 11g R2 Install

File By : Mohamed Abdelmagid


Oracle Certified Professional 11G Database Administrator
Email: Mohamed.ocp9@gmail.com

Connect AS root user


1 – Install Packages

From Cd/media/
cd /media/cdrom/Server

rpm -Uvh binutils-2.*


rpm -Uvh compat-libstdc++-33*
rpm -Uvh elfutils-libelf-0.*
rpm -Uvh elfutils-libelf-devel-*
rpm -Uvh gcc-4.*
rpm -Uvh gcc-c++-4.*
rpm -Uvh glibc-2.*
rpm -Uvh glibc-common-2.*
rpm -Uvh glibc-devel-2.*
rpm -Uvh glibc-headers-2.*
rpm -Uvh ksh-2*
rpm -Uvh libaio-0.*
rpm -Uvh libaio-devel-0.*
rpm -Uvh libgcc-4.*
rpm -Uvh libstdc++-4.*
rpm -Uvh libstdc++-devel-4.*
rpm -Uvh make-3.*
rpm -Uvh sysstat-7.*
rpm -Uvh unixODBC-2.*
rpm -Uvh unixODBC-devel-2.*

2- Add the following to /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
-----------------------------------------------
3- add the following to /etc/security/limits.conf file:

oracle soft nproc 2047


oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
---------------------------------------------
4- Add the following to /etc/pam.d/login file:

session required pam_limits.so


-----------------------------------------------
5- modify hosts file /etc/hosts

-----------------------------------------------
6- Add "-x" option into the following line in the
"/etc/sysconfig/ntpd" file if u will user network time
protocol ( NTPD )

OPTIONS="-x -u ntp:ntp -p /var/run/ntpd.pid"

Service ntpd restart


-----------------------------------------------
7 – Create Users & Oralce Directories

groupadd -g 1000 oinstall


groupadd -g 1200 dba
groupadd -g 801 asmadmin
groupadd -g 802 asmdba
groupadd -g 803 asmoper
useradd -u 1000 -g oinstall -G dba oracle
useradd -u 1100 -g oinstall -G
asmdba,asmadmin,asmoper grid
passwd oracle
passwd grid

Then Create Directories

mkdir -p /u01/app/11.2.0/grid
mkdir -p /u01/app/oracle/product/11.2.0/db_1
chown -R grid:oinstall /u01
chmod -R 775 /u01/
-----------------------------------------------
8- Configure .bash_profile for oracle & Grid Users

For Oracle User type the following in .bash_profile

PATH=$PATH:$HOME/bin:/u01/app/oracle/product/11.2.0/
dbhome_2/bin
export PATH

# ORACLE Settings
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_2;
export ORACLE_HOME
ORACLE_UNQNAME=racdb; export ORACLE_UNQNAME
ORACLE_SID=racdb1; export ORACLE_SID

For Grid user user type the following in .bash_profile

PATH=$PATH:$HOME/bin:/u01/app/11.2.0/grid/bin
export PATH

# ORACLE Settings
GRID_HOME=/u01/app/11.2.0/grid; export GRID_HOME
ORACLE_SID=+ASM1; export ORACLE_SID

-----------------------------------------------
9- Confiure ASM Driver and create ASM DISKS

Connect as root user and install ASM packages

rpm –Uvh oracleasm*

Configure ASMLib using the following command

# 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 []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]:
Writing Oracle ASM library driver configuration: done
#
------------------------------------
Load the kernel module using the following command:

Oracleasm init

Create the ASM DISKS

# oracleasm createdisk OCR /dev/sdb1


Writing disk header: done
Instantiating disk: done
# /usr/sbin/oracleasm createdisk FRA /dev/sdc1
Writing disk header: done
Instantiating disk: done
# /usr/sbin/oracleasm createdisk DATA /dev/sdd1
Writing disk header: done
Instantiating disk: done
#

Scan disks and list it after creation

# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
#

# oracleasm listdisks
DATA
FRA
OCR
#

10- Using Cluster Verification Utility

Connect to grid user and go the grid infrastructure


folder

Cd /home/grid/Desktop/grid and type following:

./runcluvfy.sh stage -pre crsinst -n RAC1,RAC2 -fixup -


verbose

S-ar putea să vă placă și