求学快递网 oracle认证
发布资讯
您当前的位置:首页 > oracle认证 > Oracle性能调优:安装RAC时间同步简单方法2

Oracle性能调优:安装RAC时间同步简单方法2

上传时间: 2018-04-09 16:22:55 来源:用户上传
浏览量:1819 评论数:0 举报
导读: 想要第几时间获得Oracle认证考试报考信息,想要充分利用各种精华资讯资源备考,想要海量高质量、高含金量的习题练习,关注“求学快递网”公众号,你不能错过的考试利器!

  5 May 19:56:25 ntpdate[27227]: adjust time server 192.168.2.28 offset 0.000300 sec

  E. 启动客户端的ntp服务

  [root@localhost ~]# service ntpd status

  ntpd dead but pid file exists

  [root@localhost ~]# service ntpd start

  Starting ntpd: [ OK ]

  [root@localhost ~]# service ntpd status

  ntpd (pid 27248) is running…

  [root@localhost ~]#

  配置其自启动的级别

  [root@localhost ~]# chkconfig --list |grep ntp

  ntpd 0:关闭 1:关闭 2:关闭 3:关闭 4:关闭 5:关闭 6:关闭

  [root@localhost ~]# chkconfig --level 5 ntpd on

  [root@localhost ~]# chkconfig --list |grep ntp

  ntpd 0:关闭 1:关闭 2:关闭 3:关闭 4:关闭 5:启用 6:关闭

  [root@localhost ~]#

  ##########################################################################

  方法二:

  环境:ntp server是redhat4

  client是centos5

  除了用上面的ntp协议来实现时间的同步外,还可以用date和ntpdate命令做定时任务来实现和远程服务器同步时间。例如

  (一)。ntp server端的配置:

  1.查看ntp协议是否安装

  2.修改ntp.conf

  3.启动ntp服务

  实际步骤:

  1.查看ntp协议是否安装

  [root@svr-db-test ~]# rpm -qa | grep ntp

  ntp-4.2.2p1-5.el5

  chkfontpath-1.10.1-1.1

  You have new mail in /var/spool/mail/root

  如果没有安装,可以用rpm -Uvh ntp*.rpm或者yum命令安装

  2.修改ntp.conf

  修改这个配置文件是为了让远程客户端有权来同步时间

  [root@svr-db-test ~]# vi /etc/ntp.conf

  # Permit time synchronization with our time source, but do not

  # permit the source to query or modify the service on this system.

  #skate modify

  #restrict default kod nomodify notrap nopeer noquery

  #restrict -6 default kod nomodify notrap nopeer noquery

  #skate modify

  #skate add

  restrict default kod nomodify nopeer noquery

  restrict -6 default kod nomodify nopeer noquery

  #skate add

  # Permit all access over the loopback interface. This could

  # be tightened as well, but to do so would effect some of

  # the administrative functions.

  restrict 127.0.0.1

  restrict -6 ::1

  # Hosts on local network are less restricted.

  #restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap

  # Use public servers from the pool.ntp.org project.

  # Please consider joining the pool .

  server 0.rhel.pool.ntp.org

  server 1.rhel.pool.ntp.org

  server 2.rhel.pool.ntp.org

  #broadcast 192.168.1.255 key 42 # broadcast server

  #broadcastclient # broadcast client

  #broadcast 224.0.1.1 key 42 # multicast server

  #multicastclient 224.0.1.1 # multicast client

  #manycastserver 239.255.254.254 # manycast server

  #manycastclient 239.255.254.254 key 42 # manycast client

  # Undisciplined Local Clock. This is a fake driver intended for backup

  # and when no outside source of synchronized time is available.

  server 127.127.1.0 # local clock

  server 192.168.2.245

  fudge 127.127.1.0 stratum 10

  # Drift file. Put this in a directory which the daemon can write to.

  # No symbolic links allowed, either, since the daemon updates the file

  # by creating a temporary in the same directory and then rename()'ing

  # it to the file.

  driftfile /var/lib/ntp/drift

  # Key file containing the keys and key identifiers used when operating

  # with symmetric key cryptography.

  keys /etc/ntp/keys

  # Specify the key identifiers which are trusted.

  #trustedkey 4 8 42

  # Specify the key identifier to use with the ntpdc utility.

  #requestkey 8

  # Specify the key identifier to use with the ntpq utility.

  #controlkey 8

  [root@svr-db-test ~]#

  注意:这个文件这里有两种修改方法:

  A、第几种配置:允许任何IP的客户机都可以进行时间同步

  将"restrict default kod nomodify notrap nopeer noquery"这行修改成:

  restrict default kod nomodify notrap nopeer

  B、第二种配置:只允许192.168.211.***网段的客户机进行时间同步

  在restrict default kod nomodify notrap nopeer noquery(表示默认拒绝所有IP的时间同步)之后增加一行:

  restrict 192.168.211.0 mask 255.255.255.0 nomodify notrap

  但是在我的修改中我只是把"restrict default kod nomodify notrap nopeer noquery"改为

  "restrict default kod nomodify nopeer noquery"

  为什么这么做呢?如果不去掉notrap的话,在客户端同步时间会报错,例如:

  [root@localhost ~]# ntpdate 192.168.2.203

  5 May 21:35:14 ntpdate[27467]: no server suitable for synchronization found

  [root@localhost ~]# ntpdate -u 192.168.2.203

  5 May 21:35:07 ntpdate[27466]: no server suitable for synchronization found

  [root@localhost ~]# ntpdate -d 192.168.2.203

  5 May 21:35:20 ntpdate[27470]: ntpdate 4.2.0a@1.1190-r Mon Jul 28 11:06:17 EDT 2008 (1)

  Looking for host 192.168.2.203 and service ntp

  host found : 192.168.2.203

  transmit(192.168.2.203)

  transmit(192.168.2.203)

  transmit(192.168.2.203)

  transmit(192.168.2.203)

  transmit(192.168.2.203)

  192.168.2.203: Server dropped: no data

  server 192.168.2.203, port 123

  stratum 0, precision 0, leap 00, trust 000

  refid [192.168.2.203], delay 0.00000, dispersion 64.00000

  transmitted 4, in filter 4

  reference time: 00000000.00000000 Thu, Feb 7 2036 14:28:16.000

  originate timestamp: 00000000.00000000 Thu, Feb 7 2036 14:28:16.000

  transmit timestamp: cf8bf29b.578ef34d Wed, May 5 2010 21:35:23.342

  filter delay: 0.00000 0.00000 0.00000 0.00000

  0.00000 0.00000 0.00000 0.00000

  filter offset: 0.000000 0.000000 0.000000 0.000000

  0.000000 0.000000 0.000000 0.000000

  delay 0.00000, dispersion 64.00000

  offset 0.000000

  5 May 21:35:24 ntpdate[27470]: no server suitable for synchronization found

赞(47) 不喜欢(0) 收藏
免责声明 : 本站为免费网络服务提供商,为注册用户提供免费信息存储空间服务,网站所有信息均为用户自行发布并由用户承担相应法律责任,本站不对用户发布的信息进行修改及审核,不对发布信息的真实性及合法性负责,如涉及侵权或者信息违法的请你及时与本站联系进行删除以保障你的合法权益。详情可阅读本站免责声明

相关推荐:

发表评论 用户评价仅供其表达个人意见,与本站无关

还可以输入235个字

最热评论

new 最新评论

热门标签

大家都在看
>
热门课程培训

建议反馈表

非常感谢您给我们提出的问题或建议,我们会尽快处理! ×

反馈类型:

问题描述:

您的联系方式:

客服电话:

×
投诉举报
选择举报类型
×
投诉举报
填写并确认举报信息
为了确保问题能及时得到处理,请务必保证您提交的信息真实有效、清晰完整

*举报理由:

*举报描述:

截图证明:

×
投诉举报
填写并确认举报信息
为了确保问题能及时得到处理,请务必保证您提交的信息真实有效、清晰完整

*举报描述:

*原文链接:

联系方式:

截图证明:

×
投诉举报

当您发现本站有涉及个人的侵权内容时,建议您先尝试与当事人沟通解决问题。 如果您无法联系到当事人,您可通过此渠道提交举报诉求。

根据求学快递网侵权举报规范,您需要向我们提交您的个人信息,其中包括身份证明。如您确认已准备齐全,可点击下方按钮进入诉求提交页。

如果您举报的仅仅是辱骂等不友善内容,无需提交证明资料,可返回上一步点击【包含有害内容>辱骂、歧视、挑衅和诽谤等不友善信息】直接举报。
×
投诉举报

当您发现本站有涉及企业的侵权内容时,建议您先尝试与当事人沟通解决问题。 如果您无法联系到当事人,您可通过此渠道提交举报诉求。

根据求学快递网侵权举报规范,您需要向我们提交您企业和个人的证明材料。如您确认已准备齐全,可点击下方按钮进入诉求提交页。

如果您举报的仅仅是辱骂等不友善内容,无需提交证明资料,可返回上一步点击【包含有害内容>辱骂、歧视、挑衅和诽谤等不友善信息】直接举报。
×
投诉举报
填写并确认举报信息
为了确保问题能及时得到处理,请务必保证您提交的信息真实有效、清晰完整

*举报理由:

举报描述:

截图证明: