RAC 安装 简单步骤

这几天都有网友询问有关RAC的安装的过程,现整理了一下简洁的步骤,希望网友们能有方便的进行RAC安装

1. 检验包(如果uname一致的话,有差异。以Oracle文档为准,这里是以RHEL AS 4为例)

binutils-2.15.92.0.2-13.EL4
compat-db-4.1.25-9
compat-libstdc++-296-2.96-132.7.2
control-center-2.8.0-12
gcc-3.4.3-22.1.EL4
gcc-c++-3.4.3-22.1.EL44
glibc-2.3.4-2.9
glibc-common-2.3.4-2.9
gnome-libs-1.4.1.2.90-44.1
libstdc++-3.4.3-22.1
libstdc++-devel-3.4.3-22.1
make-3.80-5
pdksh-5.2.14-30
sysstat-5.0.5-1
xscreensaver-4.18-5.rhel4.2
setarch-1.6-1

2. 建立用户
#groupadd dba //数据库系统管理理组
#groupadd oinstall //Oracle文件所有者的组
#useradd -g oinstall -G dba -m -s /bin/bash oracle
#passwd oracle

3. 准备安装目录
mkdir -p /u01/app/oracle
chown -R oracle:oinstall /u01/app/oracle
chmod -R 775 /u01/app/oracle

4. 修改/etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

5. 修改/etc/sysctl.conf
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000

6. 修改/etc/pam.d/login
session required /lib/security/pam_limits.so

7. 修改/etc/profile
if [ /$USER = "oracle" ]; then
if [ /$SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi

8. 修改/etc/csh.login
if ( /$USER == "oracle" ) then
limit maxproc 16384
limit descriptors 65536
umask 022
endif

9. Hangcheck 计时器
modprobe hangcheck-timer hangcheck_tick=30 hangcheck_margin=180

10. 配置 /etc/hosts
127.0.0.1 localhost.localdomain localhost ### 不要出现主机名,否则安装的时候回路出错

192.168.137.132 inthrac01
192.168.137.32 inth-vip01 #### 虚拟ip,在安装以后,才由crs产生的虚拟ip
172.16.10.128 inth-pri01

192.168.137.135 inthrac02
192.168.137.35 inth-vip02 #### 虚拟ip,在安装以后,才由crs产生的虚拟ip
172.16.10.135 inth-pri02

11. 时间同步,可以用ntp来实现

12. ssh等效性
分别在两个节点执行以oracle用户身份
chmod 755 .ssh
/usr/bin/ssh-keygen -t rsa
/usr/bin/ssh-keygen -t dsa
如下
节点1
[oracle@inthrac01 ~]$ chmod 755 .ssh
[oracle@inthrac01 ~]$ /usr/bin/ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/oracle/.ssh/id_rsa.
Your public key has been saved in /home/oracle/.ssh/id_rsa.pub.
The key fingerprint is:
4a:0d:92:c3:92:7f:6d:cf:8b:7d:cb:55:c1:06:55:3e oracle@inthrac01
[oracle@inthrac01 ~]$ /usr/bin/ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/oracle/.ssh/id_dsa.
Your public key has been saved in /home/oracle/.ssh/id_dsa.pub.
The key fingerprint is:
a4:d4:96:2d:8d:cd:d2:dc:1c:a0:a9:64:90:60:70:09 oracle@inthrac01

节点2
[oracle@inthrac02 ~]$ chmod 755 .ssh
[oracle@inthrac02 ~]$ /usr/bin/ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/oracle/.ssh/id_rsa.
Your public key has been saved in /home/oracle/.ssh/id_rsa.pub.
The key fingerprint is:
97:06:a6:01:9a:77:9f:9d:ce:cc:c0:de:23:7b:03:c7 oracle@inthrac02
[oracle@inthrac02 ~]$ /usr/bin/ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/oracle/.ssh/id_dsa.
Your public key has been saved in /home/oracle/.ssh/id_dsa.pub.
The key fingerprint is:
c8:71:73:d3:d8:6e:e6:4d:7f:89:5b:52:3a:f2:28:a9 oracle@inthrac02

在分别在两个节点上执行
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
ssh oracle@inthrac02 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
ssh oracle@inthrac02 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys

执行过程如下
节点1
[oracle@inthrac01 ~]$ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
[oracle@inthrac01 ~]$ cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
[oracle@inthrac01 ~]$ ssh oracle@inthrac02 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
oracle@inthrac02's password:
[oracle@inthrac01 ~]$ ssh oracle@inthrac02 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
oracle@inthrac02's password:

节点2
[oracle@inthrac02 ~]$ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
[oracle@inthrac02 ~]$ cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
[oracle@inthrac02 ~]$ ssh oracle@inthrac01 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
The authenticity of host 'inthrac01 (192.168.137.132)' can't be established.
RSA key fingerprint is a7:26:43:7e:4b:cb:99:e8:62:f0:da:9e:3b:53:ec:d4.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'inthrac01,192.168.137.132' (RSA) to the list of known hosts.
Enter passphrase for key '/home/oracle/.ssh/id_rsa':
[oracle@inthrac02 ~]$ ssh oracle@inthrac01 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
Enter passphrase for key '/home/oracle/.ssh/id_rsa':
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

inthirties

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值