rac笔记
linux分区记录
用10g空间安装linux 虚拟机器
/boot 100
/ 3530
swap 1024
/oracle
(1),vim /etc/hosts
192.168.200.105 dbp
192.168.200.106 dbs
192.168.200.107 dbp-vip
192.168.200.108 dbs-vip
10.0.0.154 dbp-priv
10.0.0.155 dbs-priv
(2),新增oracle用户
groupadd -g 600 dba
groupadd oinstall -g 601
useradd -u 600 -g oinstall -G dba oracle
-----------
(3),创建SSH
两个节点:
[oracle@dbs .ssh]$cd /home
[oracle@dbs .ssh]$mkdir -pv .ssh
[oracle@dbs .ssh]$chmod 700 .ssh
[oracle@dbs .ssh]$cd .ssh
[oracle@dbs .ssh]$ ssh-keygen -t rsa
[oracle@dbs .ssh]$ ssh-keygen -t dsa
[oracle@dbs .ssh]$ cat *.pub > authorized_keys
节点分别做:
[oracle@dbs .ssh]$ scp authorized_keys dbp:/home/oracle/.ssh/keys_dbs
[oracle@dbp .ssh]$cat keys_dbs >> authorized_keys
[oracle@dbp .ssh]$scp authorized_keys dbs:/home/oracle/.ssh/.
dbs:
[oracle@dbs .ssh]$ ssh dbp
[oracle@dbs .ssh]$ ssh dbp-priv
dbp:
[oracle@dbp .ssh]$ssh dbs
[oracle@dbp .ssh]$ssh dbs-priv
----
[root@dbp ~]# modprobe hangcheck-timer
------------
(4)配置系统内核参数
[root@dbp ~]# vim /etc/modprobe.conf
vim /etc/sysctl.conf
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
kernel.shmall = 268435456
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_max = 262144
net.core.wmem_default = 262144
fs.file-max = 65536
kernel.shmmax = 536870912
kernel.shmmni = 4096
(5)提高 Oracle 用户的 shell 限制
设置oracle使用的文件数权限
[root@node1 ~]# vi /etc/security/limits.conf
增加下列内容
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
(6)修改安全限制
[root@node1 ~]# vi /etc/pam.d/login
增加:
session required /lib/security/pam_limits.so
(7)配置Hangcheck计时器
[root@node1 ~]# vi /etc/rc.local
增加:
modprobe hangcheck-timer hangcheck-tick=30 hangcheck_margin=180
(8)配置rawdevices
vim /etc/sysconfig/rawdevices
/dev/raw/raw1 /dev/sdb1
/dev/raw/raw2 /dev/sdb2
vim /etc/udev/permissions.d/50-udev.permissions
--raw*.oracle:dba:0660
--raw/*:oracle:dba:0660
-------
/etc/init.d/rawdevices restart
-----------------
39页
9.创建asm磁盘
第一步
[root@dbs ~]# /etc/init.d/oracleasm enable
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver: [ OK ]
Scanning the system for Oracle ASMLib disks: [ OK ]
第二步
[root@dbs ~]# /etc/init.d/oracleasm status
Checking if ASM is loaded: yes
Checking if /dev/oracleasm is mounted: yes
[root@dbs ~]# /etc/init.d/oracleasm createdisk VOL1 /dev/sdc1
Marking disk "VOL1" as an ASM disk: [ OK ]
如果直接执行第二步,报错如下:
[root@dbp ~]# /etc/init.d/oracleasm createdisk VOL1 /dev/sdc1
Marking disk "VOL1" as an ASM disk: [FAILED]
检查配置
./runcluvfy.sh stage -pre crsinst -n dbp,dbs -verbose
rhel.vmx记载
disk.locking="FALSE"
scsi1.present = "TRUE"
scsi1.virtualDev = "lsilogic"
scsi1:1.present = "TRUE"
scsi1:1.fileName = "E:\sharedisk\sharedisk.vmdk"
scsi1:1.mode = "independent-persistent"
scsi1:1.deviceType = "plainDisk"