Configuring the Linux 11G R2 RAC NTP service

Source: Internet
Author: User

When installing an Oracle 11g RAC, we need to configure the NTP service. There are many ways to configure clock synchronization in the case of virtual machines, either using the VMware-brought clock synchronization feature or directly using a local node as a time server. This article describes a clock server that directly configures NTP mode.

[Python]View PlainCopyprint?
  1. 1. View the two-node hosts configuration
  2. [[Email protected] ~] # cat/etc/hosts
  3. # Don't remove the following line, or various programs
  4. # that require network functionality would fail.
  5. #127.0.0.1 localhost.localdomain localhost
  6. #::1 localhost6.localdomain6 Localhost6
  7. 127.0.0.1 localhost.szdb.com localhost
  8. # public Eth0
  9. 192.168.7.71 node1.szdb.com node1
  10. 192.168.7.72 node2.szdb.com node2
  11. #Private eth1
  12. 10.10.7.71 node1-priv.szdb.com node1-priv
  13. 10.10.7.72 node2-priv.szdb.com node2-priv
  14. #Virtual
  15. 192.168.7.81 node1-vip.szdb.com node1-vip
  16. 192.168.7.82 node2-vip.szdb.com node2-vip
  17. 2. Verify that the NTP packets for each node are installed
  18. [Email protected] ~]$ Rpm-qa | grep NTP
  19. ntp-4.2. 2p1-9.el5_4. 1
  20. chkfontpath-1.10. 1-1.1 #这个是和字体有关, non-NTP package
  21. [[email protected] ~]$ ssh node2 Rpm-qa | grep NTP
  22. ntp-4.2. 2p1-9.el5_4. 1
  23. chkfontpath-1.10. 1-1.1 #这个是和字体有关, non-NTP package
  24. 3. Edit the two-node ntp.conf file
  25. [Email protected] ~]$ Su-root
  26. Password:
  27. [[Email protected] ~] # vi/etc/ntp.conf
  28. #New NTP server added by Robinson
  29. Server 127.127. 1.0 prefer # Add a preferred clock server
  30. Restrict 192.168. 7.0 Mask 255.255. 255.255 nomodify notrap #只允许192.168.7.* Network Segment Client for time synchronization
  31. Broadcastdelay 0.008
  32. [[Email protected] ~] # vi/etc/ntp.conf
  33. #New NTP server added by Robinson
  34. Server 192.168. 7.71 prefer
  35. Broadcastdelay 0.008
  36. 4. Edit the ntpd parameters of the two node
  37. [[Email protected] ~] # vi/etc/sysconfig/ntpd
  38. #The following item added by Robinson
  39. #Set to ' yes ' to SYCN HW clock after successful ntpdate
  40. Sync_hwclock=yes #此选项用于自动校准系统时钟与硬件时钟
  41. options="-x-u ntp:ntp-p/var/run/ntpd.pid"
  42. #注意理解Linux的时钟类型.  In the Linux system is divided into the system clock and hardware clock.
  43. #系统时钟指当前Linux The clock in the kernel, while the hardware clock refers to the BIOS clock, the clock that is powered by the motherboard battery
  44. #当Linux启动时, the hardware clock reads the settings of the system clock, and then the system clock operates independently of the hardware clock
  45. [[Email protected] ~] # vi/etc/sysconfig/ntpd
  46. The following item added by Robinson
  47. Sync_hwclock=yes
  48. options="-x-u ntp:ntp-p/var/run/ntpd.pid"
  49. 5. Configure NTP self-start service
  50. [[Email protected] ~] # chkconfig NTPD on
  51. [[Email protected] ~] # chkconfig NTPD on
  52. 6. Start the NTP service on the two node
  53. [[Email protected] ~] # service NTPD Stop
  54. Shutting down NTPD: [FAILED]
  55. [[Email protected] ~] # service NTPD start
  56. Ntpd:synchronizing with Time server: [FAILED]
  57. Starting ntpd: [OK]
  58. [[Email protected] ~] # service NTPD Restart
  59. Shutting down NTPD: [OK]
  60. Ntpd:synchronizing with Time server: [OK]
  61. Syncing hardware clock to System time [OK]
  62. Starting ntpd: [OK]
  63. 7. View NTP status
  64. [[Email protected] ~] # ntpq-p
  65. Remote refID St T when poll reach delay offset jitter
  66. ==============================================================================
  67. LOCAL (0).          Locl. ten L 1 0.000 0.000 0.001
  68. [[Email protected] ~] # ntpq-p
  69. Remote refID St T when poll reach delay offset jitter
  70. ==============================================================================
  71. Node1.szdb.com.          Init. 0 0.000 0.000 0.000
  72. LOCAL (0).          Locl. 1 L 0.000 0.000 0.001
  73. #Author: Robinson
  74. #Blog: http://blog.csdn.net/robinson_0612
  75. You can also use watch ntpq-p to view real-time status
  76. 8. NTP related logs
  77. [[email protected] tmp] # Cat/var/log/messages | grep ntpd
  78. Ext.: http://blog.csdn.net/leshami/article/details/8268079

Configuring the Linux 11G R2 RAC NTP service

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.