2. ntpd: Synchronizing with time server: [ OK ] 3. Syncing hardware clock to system time [ OK ] 4. Starting ntpd: [ OK ]
5. 系统启动自动加载
#chkconfig ntpd on
7、其它,非执行步骤
1. 查看ntp状态
2. [root@node1 ~]# ntpq -p
3. remote refid st t when poll reach delay offset jitter 4. ============================================================================== 5. LOCAL(0) .LOCL. 10 l 40 64 1 0.000 0.000 0.001 1. 查看ntp的相关日志
2. [root@bigboy tmp]# cat /var/log/messages | grep ntpd
3.2.9 安装 oracleasmlib 程序包
(执行节点rac3)
将mustlib目录下的包上传新增节点服务器,已root用户安装,执行如下命令: rpm -ivh oracleasm-support-2.1.8-1.el5.i386.rpm rpm -ivh oracleasm-2.6.18-308.el5-2.0.5-1.el5.i686.rpm rpm -ivh oracleasmlib-2.0.4-1.el5.i386.rpm
3.2.10 连接共享存储
本步骤内配置的IP地址192.251.1.30为参考地址,以当前所配置的共享存储实际IP地址为准,要对应修改
1、配置服务器iSCSI initiator,添加iSCSI 磁盘
26
(执行节点rac3)
开启initiator 服务: # chkconfig iscsid on # chkconfig iscsi on # service iscsi start # service iscsid start
2、发现可用的target:
#iscsiadm -m discovery -t sendtargets -p 192.251.1.30
3、添加iSCSI 磁盘:
iscsiadm -m node -T iqn.2006-01.com.openfiler:tsn.1699827b3764 -p 192.251.1.30 -l iscsiadm -m node -T iqn.2006-01.com.openfiler:tsn.e855d26cfca6 -p 192.251.1.30 -l iscsiadm -m node -T iqn.2006-01.com.openfiler:tsn.9de7e85c3514 -p 192.251.1.30 -l iscsiadm -m node -T iqn.2006-01.com.openfiler:tsn.7e822416cbcd -p 192.251.1.30 -l
4、查看: # fdisk -l
在三台节点上分别执行,共享存储的分区在三台节点上挂载的盘符必须一致。
5、将扫描磁盘加到系统自启动内,每次启动时重新扫描
执行 vi /etc/rc.d/rc.local 文件最后增加
iscsiadm -m discovery -t sendtargets -p 192.251.1.30
iscsiadm -m rac -T iqn.2006-01.com.openfiler:tsn.1699827b3764 -p 192.251.1.30 -l; iscsiadm -m rac -T iqn.2006-01.com.openfiler:tsn.e855d26cfca6 -p 192.251.1.30 -l; iscsiadm -m rac -T iqn.2006-01.com.openfiler:tsn.9de7e85c3514 -p 192.251.1.30 -l; iscsiadm -m rac -T iqn.2006-01.com.openfiler:tsn.7e822416cbcd -p 192.251.1.30 -l
27
3.2.11 配置裸设备
(执行节点rac3)
将分配给ocr 和 vot的分区,配置成裸设备 [root@rac1 ~]#vi /etc/udev/rules.d/60-raw.rules
增加如下内容:
ACTION==\KERNEL==\/dev/raw/raw1 %N\ACTION==\ENV{MAJOR}==\/dev/raw/raw1 %M %m\
ACTION==\KERNEL==\/dev/raw/raw2 %N\ACTION==\ENV{MAJOR}==\/dev/raw/raw2 %M %m\
KERNEL==\OWNER=\GROUP=\MODE=\ 提示:要根据你的实际情况来配置
重启下服务:
[root@rac1 ~]# start_udev Starting udev: [ OK ] 验证一下
[root@rac1 ~]# ls /dev/raw/ -l total 0
crw-r----- 1 oracle oinstall 162, 1 Jun 6 17:57 raw1 crw-r----- 1 oracle oinstall 162, 2 Jun 6 17:57 raw2
OK,前期设置完成。
3.2.12 建立用户等效性
要建立用户等效性,需要在三个节点上以 oracle 用户身份生成用户的公钥和私
28
钥,首先在rac3执行:
[root@rac2 opt]#su - oracle [oracle@rac2 ~]$ mkdir ~/.ssh [oracle@rac2 ~]$ chmod 700 ~/.ssh [oracle@rac2 ~]$ 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:
dd:be:7a:37:e4:b5:f0:b2:24:95:50:61:ea:a1:61:07 oracle@rac2 [oracle@rac2 ~]$ 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:
bc:b5:cb:43:c7:19:53:d6:f7:16:69:85:12:7f:aa:be oracle@rac2
切换回rac1,接着执行(只在rac1上执行以下步骤):
[oracle@rac1 ~]$ ssh rac3 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
The authenticity of host 'rac3 (192.168.100.102)' can't be established. RSA key fingerprint is 92:d1:ce:5b:c8:a1:52:d5:ac:00:5f:48:5d:12:06:e4.
29
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'rac3,192.168.100.102' (RSA) to the list of known hosts.
oracle@rac2's password:
[oracle@rac1 ~]$ ssh rac3 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
oracle@rac2's password:
[oracle@rac1 ~]$ scp ~/.ssh/authorized_keys rac2:~/.ssh/authorized_keys oracle@rac2's password:
authorized_keys 100% 1992 2.0KB/s 00:00
[oracle@rac1 ~]$ scp ~/.ssh/authorized_keys rac3:~/.ssh/authorized_keys
三机相互执行,看看是否还需要输入密码,在rac1/rac2/rac3上执行,正确为无需输入密码
[oracle@rac1 ~]$ ssh rac1 date [oracle@rac1 ~]$ ssh rac2 date [oracle@rac1 ~]$ ssh rac3 date [oracle@rac1 ~]$ ssh rac1-priv date [oracle@rac1 ~]$ ssh rac2-priv date [oracle@rac1 ~]$ ssh rac3-priv date
3.2.13 配置asm
注意:必须以root身份进行
30