ORAC RAC NTP时间服务器 配置  RVF-5436 : 在一个或多个节点上运行的 NTP 守护程序缺少快速定向选项 "-x"

来源:互联网 发布:内存卡误删恢复软件 编辑:程序博客网 时间:2024/06/06 02:57

NTP主服务器IP地址:192.168.33.13

NTP从服务器IP地址:192.168.33.12

(一)NTP服务器搭建  192.168.33.13服务器

1、配置ntp.conf

vi /etc/ntp.conf

restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery
restrict 127.0.0.1
restrict -6 ::1
restrict 192.168.33.0 mask 255.255.255.0 nomodify notrap
server 192.168.33.13
server 0.centos.pool.ntp.org
server 1.centos.pool.ntp.org
server 2.centos.pool.ntp.org
server  127.127.1.0     # local clock
fudge   127.127.1.0 stratum 10

2、vi /etc/sysconfig/ntpd

# Drop root to id 'ntp:ntp' by default.
OPTIONS="-u ntp:ntp -p /var/run/ntpd.pid -x"
# Set to 'yes' to sync hw clock after successful ntpdate
SYNC_HWCLOCK=yes
# Additional options for ntpdate
NTPDATE_OPTIONS=""


注意: 如果没有加-x,后面在做CVU检查的时候会报 RVF-5436 : 在一个或多个节点上运行的 NTP 守护程序缺少快速定向选项 "-x"

3、编辑 /etc/ntp/ntpservers

vi /etc/ntp/ntpservers

0.centos.pool.ntp.org
1.centos.pool.ntp.org
2.centos.pool.ntp.org

4、编辑 vi /etc/ntp/step-tickers文件,加入

 vi /etc/ntp/step-tickers

pool.ntp.org
5、上诉修改完成后,以root用户身份重启ntpd服务:

service ntpd restart


过5~10分钟之后启动客户端,就可以看到服务器端的效果了,可以在windows端进行测试。


(二)Linux NTP客户端搭建  192.168.33.12客户端

方法一

配置LINUX客户端
在linux客户端上执行ntpdate ntp_server_ip 就可以根据时间服务器统一局域网的时间了,将上面的命令放到cron里每天早上3点定期执行,

crontab –e 

然后输入

  0 3 * * * /usr/sbin/ntpdate 192.168.33.13

方法二

1、/etc/sysconfig/ntpd的配置

# Drop root to id 'ntp:ntp' by default.
OPTIONS="-u ntp:ntp -p /var/run/ntpd.pid -x"
SYNC_HWCLOCK=yes
# Additional options for ntpdate
TE_OPTIONS=""


2、配置 /etc/ntp/step-tickers

# vi /etc/ntp/step-tickers

192.168.33.13



3、/etc/ntp.conf的配置

restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery
restrict 127.0.0.1
restrict -6 ::1
restrict 192.168.33.0 mask 255.255.255.0 nomodify notrap
server 0.centos.pool.ntp.org
server 1.centos.pool.ntp.org
server 2.centos.pool.ntp.org
server  127.127.1.0     # local clock
fudge   127.127.1.0 stratum 10



4、 vi /etc/ntp/ntpservers

0.centos.pool.ntp.org
1.centos.pool.ntp.org
2.centos.pool.ntp.org

5、检查服务器同步状态
# ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 rac2            114.80.81.13     3 u    9   64    1    0.172    0.076   0.001

# ntptrace 192.168.33.13
rac2: stratum 3, offset 0.024355, synch distance 0.194971
114.80.81.13: stratum 2, offset 0.002255, synch distance 0.081637


clock.fmt.he.net: stratum 1, offset 0.000002, synch distance 0.000435, refid 'CDMA'

服务器端执行检查看有多少客户有过来请求
netstat -an | grep 123



客户端碰到的refid显示为 .INIT. 表示说NTP服务器没有设置好
原创粉丝点击