您的位置:首页 > 运维架构 > Linux

CentOS 4.4+10G_RAC安装

2012-11-23 17:53 127 查看
系统都已经安装好了,IP和主机名都设置好了。

1.配置OEL1的NTP服务:

a.[root@oel1 ~]# cat >>/etc/ntp.conf <<EOF

> restrict 0.0.0.0 mask 0.0.0.0 nomodify

> server 127.127.1.0

> fudge 127.127.1.0 stratum 10

> driftfile /var/lib/ntp/drift

> broadcastdelay 0.008

> authenticate no

> keys /etc/ntp/keys

> EOF

[root@oel1 ~]# service ntpd start #启动NTP服务

Starting ntpd: [ OK ]

[root@oel1 ~]# chkconfig ntpd on #

[root@oel1 ~]# chkconfig --list ntpd

ntpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off

b.配置OEL2的NTP服务:

[root@oel2 ~]# cat >>/etc/ntp.conf<<EOF

> server 128.192.0.1

> fudge 127.127.1.0 stratum 10

> driftfile /var/lib/ntp/drift

> broadcastdelay 0.008

> authenticate no

> keys /etc/ntp/keys

> EOF

[root@oel2 ~]# service ntpd stop

[root@oel2 ~]# ntpdate 128.192.0.1

23 Nov 16:23:28 ntpdate[5258]: step time server 128.192.0.1 offset -3.940062 sec

[root@oel2 ~]# service ntpd start

Starting ntpd: [ OK ]

2.配置HOSTS(OEL1,OEL2)

[root@oel1 ~]# vi /etc/hosts

# Do not remove the following line, or various programs

# that require network functionality will fail.

127.0.0.1 oel1 localhost.localdomain localhost

128.192.0.1 oel1

128.192.0.2 oel2

128.192.0.3 oel1-vip

128.192.0.4 oel2-vip

10.10.10.1 oel1-priv

10.10.10.2 oel2-priv

3.分区:(已经分好了)

[root@oel1 ~]# fdisk -l

4.在OEL1 和OEL2 上使用root 用户执行以下命令

cat >> /etc/profile << EOF

export PATH=$PATH:/u01/app/oracle/product/10.2/crs/bin

EOF

5。配置hang-checker 模块

在 OEL1 和OEL2 主机上,使用root 用户执行

cat >>/etc/modprobe.conf <<EOF

options hangcheck‐timer hangcheck_tick=30 hangcheck_margin=180

EOF

cat >>/etc/rc.local <<EOF

modprobe ‐v hangcheck‐timer

EOF

6.在OEL1和OEL2上配置内核参数

[root@oel1 ~]# vi /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

net.core.rmem_default = 1048576

net.core.rmem_max = 1048576

net.core.wmem_default = 262144

net.core.wmem_max = 262144

7.在OEL1和OEL2上配置oracle用户权限
[root@oel1 ~]# vi /etc/security/limits.conf

oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

vi /etc/pam.d/login
session required /lib/security/pam_limits.so

8.在OEL1和OEL2上创建oracle账户信息:

[root@oel1 ~]# groupadd -g 500 oinstall
[root@oel1 ~]# groupadd -g 501 dba
[root@oel1 ~]# groupadd -g 502 oper
[root@oel1 ~]# useradd -m -g oinstall -G dba,oper -u 500 oracle
修改ORacle用户密码:

[root@oel2 ~]# passwd oracle
Changing password for user oracle.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.

9.在OEl1和OEL2上配置ORacle用户环境变量

[root@oel1 ~]# su - oracle
[oracle@oel1 ~]$ vi .bash_profile

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH
unset USERNAME
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2/db
export CRS_HOME=$ORACLE_BASE/product/10.2/crs
export ORACLE_SID=prod1
export PATH=$PATH:$ORACLE_HOME/bin:$CRS_HOME/bin

10.在OEL1和OEL2上为ORacle配置SSH

[oracle@oel1 ~]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_rsa):
Created directory '/home/oracle/.ssh'.
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:
c9:4f:d0:88:4e:23:61:f1:70:21:bb:b0:df:ed:72:4a oracle@oel1
[oracle@oel1 ~]$ 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:
a7:6e:31:02:e5:eb:a4:9a:f7:4c:9a:72:98:25:26:30 oracle@oel1

[oracle@oel1 ~]$ cd .ssh
[oracle@oel1 .ssh]$ ls
id_dsa id_dsa.pub id_rsa id_rsa.pub
[oracle@oel1 .ssh]$ cat id_rsa.pub >>authorized_keys
[oracle@oel1 .ssh]$ cat id_dsa.pub >>authorized_keys
[oracle@oel1 .ssh]$ ls
authorized_keys id_dsa id_dsa.pub id_rsa id_rsa.pub
[oracle@oel1 .ssh]$ ssh oracle@oel2 cat /home/oracle/.ssh/id_dsa.pub >>authorized_keys
The authenticity of host 'oel2 (128.192.0.2)' can't be established.
RSA key fingerprint is 24:51:79:a2:a3:a5:4d:ab:a1:98:cd:6b:ea:d6:58:cd.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'oel2,128.192.0.2' (RSA) to the list of known hosts.
oracle@oel2's password:
[oracle@oel1 .ssh]$ ssh oracle@oel2 cat /home/oracle/.ssh/id_dsa.pub >>authorized_keys
oracle@oel2's password:
[oracle@oel1 .ssh]$ scp authorized_keys oel2:/home/oracle/.ssh
oracle@oel2's password:
authorized_keys 100% 2024 2.0KB/s 00:00
10.在OEL1和OEl2上配置裸设备
[root@oel1 ~]# vi /etc/sysconfig/rawdevices

/dev/raw/raw1 /dev/sdb1
/dev/raw/raw2 /dev/sdb2
/dev/raw/raw3 /dev/sdc1
/dev/raw/raw4 /dev/sdc2
/dev/raw/raw5 /dev/sdc3
/dev/raw/raw6 /dev/sdc4

[root@oel1 ~]# service rawdevices restart
Assigning devices:
/dev/raw/raw1 --> /dev/sdb1
/dev/raw/raw1: bound to major 8, minor 17
/dev/raw/raw2 --> /dev/sdb2
/dev/raw/raw2: bound to major 8, minor 18
/dev/raw/raw3 --> /dev/sdc1
/dev/raw/raw3: bound to major 8, minor 33
/dev/raw/raw4 --> /dev/sdc2
/dev/raw/raw4: bound to major 8, minor 34
/dev/raw/raw5 --> /dev/sdc3
/dev/raw/raw5: bound to major 8, minor 35
/dev/raw/raw6 --> /dev/sdc4
/dev/raw/raw6: bound to major 8, minor 36
done
[root@oel1 ~]# raw -qa
/dev/raw/raw1: bound to major 8, minor 17
/dev/raw/raw2: bound to major 8, minor 18
/dev/raw/raw3: bound to major 8, minor 33
/dev/raw/raw4: bound to major 8, minor 34
/dev/raw/raw5: bound to major 8, minor 35
/dev/raw/raw6: bound to major 8, minor 36

[root@oel1 ~]# cat >>/etc/rc.local <<EOF
> chown -R oracle:dba /dev/raw/raw*
> EOF

[root@oel1 ~]# mkdir -p /u01/app/oracle/product/10.2/crs
[root@oel1 ~]# chown -R oracle:oinstall /u01
[root@oel1 ~]# su - oracle
[oracle@oel1 ~]$ cd $CRS_HOME
[oracle@oel1 crs]$ cd ..
[oracle@oel1 10.2]$ ls
crs
[oracle@oel1 10.2]$ mkdir -p db

下面就可以正式安装cluster软件了
[oracle@oel1 10.2]$ /mnt/cluvfy/runcluvfy.sh stage -pre crsinst -n oel1,oel2

本文出自 “ciscoandlinux” 博客,请务必保留此出处http://rslinux.blog.51cto.com/679052/1068754
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: