11g rac Configuring the NTP server TIP01 IP:162.20.1.228  NTP service-side TIP02 ip:162.20.1.229 Before the NTP client configures the NTP server, verify that the server is installed with the NTP package [[email protected] ~]# rpm -qa | grep ntpntp-4.2.2p1-9.el5_4.1chkfontpath-1.10.1-1.1 then synchronize the server's system clock with the hardware time to see the system first [[email protected] ~]# date2012 May 20 Sunday 22:07:01 cst view hardware clock [[email protected] ~]# hwclock May 20, 2012 Sunday 13 33 minutes 46 seconds -0.415712 seconds here, the system clock is not synchronized with the hardware clock, and we use the following command to synchronize the hardware clock with the system clock [[ EMAIL PROTECTED] ~]# CLOCK --SYSTOHC in view of the system clock with the hardware clock, has been synchronized [[email protected] ~]# date2012 05 Month 20th Sunday 22:08:07 CST[[email protected] ~]# hwclock 2012  05 Month 20th Sunday 22 08 minutes 12 seconds -0.154372 seconds[[email protected] ~]# Edit the configuration file for the TIP01 node # vi /etc/ntp.conf restrict default kod nomodify notrap nopeer noqueryrestrict -6 default kod nomodify notrap nopeer noqueryrestrict 127.0.0.1 restrict -6 ::1server 162.20.1.228 #server 127.127.1.0 #local clockfudge 127.127.1.0 stratum 10driftfile /var/lib/ntp/driftkeys /etc/ntp/keysrestrict 162.20.1.228 mask 255.255.255.255 nomodify notrap noquery Edit tip02 node ntp.conf file # vi /etc/ntp.conf server tip01restrict tip01 mask 255.255.255.255 nomodify notrap Noquery3. Modify the ntpd parameter file on TIP01,TIP02 respectively #vi /etc/sysconfig/ntpdsync_hwclock=yesoptions= "-X -U NTP:NTP -p /var/run/ntpd.pid "#RAC安装时需要检测的-x parameter # cd /etc/ntp# lskeys ntpservers step-tickers# more ntpservers #This file contains a list of ntp servers to show&Nbsp;in the system-config-date user interface. #It is not recommended That you modify this file by hand. #添加ntp server address or host name TIP01 Note: Note that viewing step-tickers content, if the Step-tickers error also causes NTP to be out of sync # more step-tickers # in Tip01, Perform chkconfig on TIP02 to enable the NTP service to boot [[email protected] ~]# chkconfig ntpd on[[email protected] ~]# chkconfig ntpd on[[email protected] ~]# service ntpd restart shutdown ntpd:[determine]ntpd: sync time server: [failed] start ntpd:[OK] Make sure the port is open UDP. [[email protected] ~]# netstat -an |grep 123udp 0 0 192.168.99.228:123 0.0.0.0:* &Nbsp; udp 0 0 162.20.1.228:123 0.0.0.0:* udp 0 0 127.0.0.1:123 0.0.0.0 :* udp 0 0 0.0.0.0:123 0.0.0.0:* udp 0 0 : :1:123 :::* udp 0 0 fe80::250:56ff:fe9d:123 :::* udp 0 0 :::123 :::* View NTP status [[email protected] ~]# Ntpstat synchronised to local net at stratum 11 time correct to within 11 ms polling server every 1024 s start NTP service [[email protected] ~]# service ntpd startntpd: sync time server on TIP02 node: [OK ] Sync hardware clock to system clock [OK] start ntpd:[OK] switch to the pre-provisioned grid user to verify the two-node time [[email protected] ~]$ ssh tip01 date2012 05 month 20 day Sunday 22:21:46 CST[[email protected] ~]$ ssh tip02 date2012 05 month 20 day Sunday 22:21:48 cst[[email protected] ~] $
This article is from the "O Record" blog, so be sure to keep this source http://evils798.blog.51cto.com/8983296/1420924