RHEL6.7 x64 Dual-node installation Oracle 11g R2 RAC

Source: Internet
Author: User
Tags dba stdin ssh iptables server memory

Basic Environment

Use two HP DL580 servers as RAC nodes, storage using IBM V7000. The specific environment is as follows:

Equipment Use IP Address Disk space
HP DL580 RAC Node 01

rac01-pub:116.1.1.57

rac01-priv:4.4.4.35

rac01-vip:116.1.1.59

rac02-pub:16.1.1.58

rac02-priv:4.4.4.36

rac02-vip:116.1.1.60

rac-scan:116.1.1.61

300G
HP DL580 RAC Node 02 300G
IBM V7000 Shared storage

ocr:30g fra:450g

data1:600g data2:600g data3:600g

  

  The previous network configuration (two sets of dual-NIC bindings, respectively, the pub IP and Priv IP), the shared storage connection, and the Yum source configuration have been completed. Oracle version: 11.2.0.4, which stores multipath software as a multipath with Redhat.

implementation Stepspreparatory workhosts and host name configuration (all nodes)  

To edit the/etc/sysconfig/network file configuration hostname (restart effective):

#所有节点均执行
[Email protected]:~]#cat /etc/sysconfig/network NETWORKING=yeshostname= Cheastrac01[[email protected]:~]#cat /etc/sysconfig/networknetworking=yeshostname =CHEASTRAC02

  Edit/etc/hosts Configuration hosts:

#所有节点均执行
[[Email protected]:~]$Cat/etc/hosts127.0.0.1localhost localhost.localdomain localhost4 localhost4.localdomain4::1localhost localhost.localdomain localhost6 localhost6.localdomain6#rac116.1.1.57CHEASTRAC01116.1.1.58CHEASTRAC02116.1.1.59Cheastrac01-VIP116.1.1.60cheastrac02-VIP4.4.4.35Cheastrac01-Priv4.4.4.36cheastrac02-Priv116.1.1.61Cheastrac-scan
firewall, SELinux, and NTP disabled (all nodes)

  To turn off the server firewall:

All nodes are executed
[[Email protected]:~] $service iptables stop [[email protected]:~] $chkconfig iptables off

Disable SELinux:

#所有节点均执行
[Email protected]:~]$sed's/selinux=enforcing/selinux=disabled/g' /etc/ selinux/Config

Disable NTP and delete its profile: (After disabling NTP and deleting the configuration file, the RAC's grid installation automatically uses its own CTSS for time management)

#所有节点均执行
[[Email protected]:~] $service ntpd stop [email protected]:~] $chkconfig ntpd off[[email protected]:~]$mv /etc/ntp.conf/etc/ Ntp.conf.bak
Resource Limit configuration (all nodes)  

Configure resource limits for grids and Oracle.

Edit/etc/sysctl.conf and add the following:

#所有节点均执行
[[Email protected]:~]$Cat/etc/sysctl.conf. #oracle racfs .file-max =6815744Kernel.sem= - 32000 - -Kernel.shmmni=4096Kernel.shmall=1073741824Kernel.shmmax=96636764160#依当前内存而定, usually 60%- the%about Net.core.rmem_default=262144Net.core.rmem_max=4194304Net.core.wmem_default=262144Net.core.wmem_max=1048576Fs.aio-MAX-NR =1048576Net.ipv4.ip_local_port_range=9000 65500
[11:10 [email protected]:~] $sysctl-P    #令配置生效

Edit/etc/security/limits.conf and add the following:

#所有节点均执行
[[Email protected]:~]$Cat/etc/security/limits.conf. #oracle Racgrid Soft Nofile1024x768grid Hard Nofile65536Grid Soft Nproc2047grid Hard Nproc16384Grid Soft Stack10240grid Hard Stack32768Oracle Soft Nofile1024x768Oracle Hard Nofile65536Oracle Soft Nproc2047Oracle Hard Nproc16384Oracle Soft Stack10240Oracle Hard Stack32768

Edit/etc/pam.d/login and add the following:

#所有节点均执行
[Email protected]:~] $echo "session required pam_limits.so" >>/etc/pam.d/login

Adjust TMPFS size

If the memory is large, the SGA target cannot exceed the TMPFS size, so you need to adjust the TMPFS to a value larger than the SGA target. Edit/etc/fstab, modify the TMPFS line:

#所有节点均执行
Tmpfs /dev/shm tmpfs defaults,size=102400m 00 # If the server memory 128GB,SGA target is 90GB, you can set TMPFS to 100GB

Re-mount and see if the TMPFS setting is in effect:

#所有节点均执行
[Email protected]:~] $mount-o remount/dev/shm [[email protected]:~] $DF-H
User and group configuration (all nodes)

Create a new grid and Oracle-related users and groups.

#所有节点均执行 and ensure that the same group and user ID for all nodes
[Email protected]:~] $groupadd-G4321Oinstall [[email protected]:~] $groupadd-G4322Dba[[email protected]:~] $groupadd-G4323Oper[[email protected]:~] $groupadd-G4324Asmdba[[email protected]:~] $groupadd-G4325Asmadmin
[Email protected]:~] $groupadd-G4326Asmoper
[email protected]:~] $useradd-U4321-G Oinstall-G asmadmin,asmdba,asmoper,dba-d/home/grid-s/bin/bash-c "grid Infrastructure Owner" grid
[[Email protected]:~] $useradd-u4322-G oinstall-g asmadmin,asmdba,dba,oper-d/home/oracle-s/bin/bash-c "Oracle software Owner" Oracle
[[Email protected]:~] $echo "Grid" | passwd--stdin Grid #为grid和oracle用户设置密码
[[Email protected]:~] $echo "Oracle" | passwd--stdin Oracle

New grid and Oracle installation directory

#所有节点均执行
[Email protected]:~] $mkdir-P/u01/grid/product/grid11g [[email protected]:~] $mkdir-P/u01/ oracle/product/db11g[[email protected]:~] $chown-R grid:oinstall/U01[[email protected]:~] $chown- R oracle:oinstall/u01/oracle[[email protected]:775 /u01

Configuring Grid and Oracle User environment variables

grid environment variables: Edit the/home/grid/.bash_profile file and add the following:

 #所有节点均执行 
[[email protected]:~] $cat/home/grid/.bash_profile Export Pathexport TMP =/tmpexport TMPDIR =$ Tmpexport oracle_base =/u01/gridexport oracle_home = $ORACLE _base/ Product/grid11gexport oracle_sid =+asm1 #节点1为 + ASM1, Node 2 is + asm2, and so on export PATH = $HOME/bin: $ORACLE _home/bin:/usr/bin:/bin:/usr/bin/x11:/usr/local/bin: $ORACLE _base/common/oracle/bin: $PATHexport ld_library_path = $ORACLE _home/lib: $ORACLE _home/oracm/lib:/usr/lib:/usr/local/libexport CLASSPATH = $ORACLE _home/jre: $ORACLE _home/jlib: $ORACLE _home/rdbms/jlib: $ORACLE _home/network/ Jlib: $ORACLE _home/oracm/lib

Oracle Environment variables: Edit the/home/oracle/.bash_profile file to add the following:

#所有节点均执行
[Email protected]:~] $cat/home/oracle/bash_profile export pathexport TMP=/tmpexport TMPDIR= $TMPexport oracle_base=/u01/oracleexport oracle_home= $ORACLE _base/product/db11gexport Oracle_sid=crrdw #此处指定oracle实例名. Oracle_sid can be specified in a single instance case, it is not recommended to specify export path =/usr/sbin in multiple instances: $PATHexport path= $ORACLE _home/bin : $PATHexport ld_library_path= $ORACLE _home/lib:/lib:/usr/libexport CLASSPATH= $ORACLE _home/jre:$ Oracle_home/jlib: $ORACLE _home/rdbms/jlib
SSH Trusted configuration (all nodes)

Configure SSH password-free login between all nodes to ensure inter-node file transfer. You need to configure SSH trust between the grid and the Oracle user separately , and the root user is not worthy. This project has only two nodes: Cheastrac01, Cheastrac02. To configure SSH Trust for a grid user, for example:

Log on to the grid user on all nodes and execute the following command:

#所有节点均执行
[Email protected]:~] $rm-rf ~/. SSH [[email protected]:~] $mkdir ~/. Ssh[[email protected]: ~/ssh[[email protected]:~]$/usr/bin/ssh-keygen-t RSA #提示输入时一路回车即可

Execute the following command on Node 1:

~/.ssh/id_rsa.pub>>~/.ssh/authorized_keys  ~/.ssh/id_rsa.pub>>~/.ssh/~/.ssh/ Authorized_keys Cheastrac02:.ssh/authorized_keys

Execute the following command on Node 2:

#仅节点2执行 [[email protected]: ~/.ssh/authorized_keys

Test whether SSH Trust is configured successfully:

#所有节点均执行, the following command first executes the need to enter a password, then do not need, indicating a successful configuration [[email protected]:~] $ssh cheastrac01 date[[email protected]: ~] $ssh cheastrac02 date[[email protected]:~] $ssh cheastrac01 date[[email protected]:~] $ssh CHEASTRAC02 Date

Log in to the Oracle account and repeat the above actions.

Edit/etc/ssh/sshd_config, change #logingracetime 2m to Logingracetime 0 so that SSH authentication does not time out.

RHEL6.7 x64 Dual-node installation Oracle 11g R2 RAC

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.