一 软件环境
- Oracle VM VirtualBox
- Oracle Linux 6.5
- p13390677_112040_Linux-x86-64
- 主机名称:node1,node2
- Xmanager Enterprise 5
二 主机设置
1、网络配置
--node1,node2分别配置
[root@node1 ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
#public ip
192.168.1.117 node1
192.168.1.118 node2
#private ip
10.10.10.11 node1-priv
10.10.10.12 node2-priv
#virtual ip
192.168.1.120 node1-vip
192.168.1.121 node2-vip
#scan ip
192.168.1.123 node-scan
192.168.1.124 node-scan
192.168.1.125 node-scan
[root@node1 ~]#
2、用户和组配置
--node1,node2分别配置
[root@node1 ~]# groupadd oinstall
[root@node1 ~]# groupadd -g 1002 dba
[root@node1 ~]# groupadd -g 1003 oper
[root@node1 ~]# groupadd -g 1004 asmadmin
[root@node1 ~]# groupadd -g 1005 asmdba
[root@node1 ~]# groupadd -g 1006 asmoper
[root@node1 ~]#
[root@node1 ~]# useradd -u 1001 -g oinstall -G dba,asmdba,oper oracle
[root@node1 ~]# passwd oracle
Changing password for user oracle.
New password:
BAD PASSWORD: The password is shorter than 8 characters
Retype new password:
passwd: all authentication tokens updated successfully.
[root@node1 ~]# useradd -u 1002 -g oinstall -G asmadmin,asmdba,asmoper,oper,dba grid
[root@node1 ~]# passwd grid
Changing password for user grid.
New password:
BAD PASSWORD: The password is shorter than 8 characters
Retype new password:
passwd: all authentication tokens updated successfully.
[root@node1 ~]#
3、目录配置
--node1,node2分别配置
[root@node1 ~]# mkdir -p /u01/app/grid
[root@node1 ~]# chown -R grid:oinstall /u01/app/
[root@node1 ~]# chmod -R 775 /u01/app/grid/
[root@node1 ~]#
[root@node1 ~]# mkdir -p /u01/app/oracle
[root@node1 ~]# chown -R oracle:oinstall /u01/app/oracle/
[root@node1 ~]# chmod -R 775 /u01/app/oracle/
[root@node1 ~]#
[root@node1 ~]# ll /u01/app/
total 8
drwxrwxr-x. 2 grid oinstall 4096 Apr 13 22:25 grid
drwxrwxr-x. 2 oracle oinstall 4096 Apr 13 22:26 oracle
[root@node1 ~]# ll /u01/
total 20
drwxr-xr-x. 4 grid oinstall 4096 Apr 13 22:26 app
drwx------. 2 root root 16384 Apr 12 23:30 lost+found
[root@node1 ~]#
4、安装rpm
--node1,node2分别配置
[root@node1 ~]# yum -y install binutils compat-libcap1 compat-libstdc* gcc gcc-c++* glibc glibc-devel ksh libgcc libstdc libaio libaio-devel make elfutils-libelf-devel sysstat
[root@node1 ~]# rpm -ivh pdksh-5.2.14-37.el5_8.1.x86_64.rpm --nodeps
5、内核参数配置
--node1,node2分别配置
[root@node1 ~]# vim /etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmmni = 4096
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 = 1048576
[root@node1 ~]# sysctl -p
[root@node1 ~]# vim /etc/security/limits.conf
grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
6、NTP(Network Time Protocol)和防火墙配置
--停用NTP
[root@node1 ~]# /sbin/service ntpd stop
Shutting down ntpd: [ OK ]
[root@node1 ~]# chkconfig ntpd off
[root@node1 ~]# mv /etc/ntp.conf /etc/ntp.conf.del --可直接删除
[root@node1 ~]# service ntpd status
ntpd is stopped
--禁用防火墙
[root@node1 ~]# service iptables stop
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Flushing firewall rules: [ OK ]
iptables: Unloading modules: [ OK ]
[root@node1 ~]# chkconfig iptables off
[root@node1 ~]#
--禁用Selinux
[root@node1 ~]# vim /etc/selinux/config
SELINUX=disabled
7、ASM配置
具体配置参照:使用UDEV SCSI规则配置ASM
--使用udev方式分别在node1、node2设置
[root@node1 ~]# cat /etc/udev/rules.d/99-oracle-as