RHEL6NTP server configuration and troubleshooting

Source: Internet
Author: User
Environment: RHEL6.0 I. Configure the NTP server 1. Install the NTP Software Package [root @ client ~] # The configuration of yuminstallntp-y2 and NTP service [root @ server ~] # Grep-v "^ #"/etc/ntp. confdriftfile/var/lib/ntp/driftrestrictdefakokodnomodifynotrapnopeern

Environment: RHEL6.0

1. Configure the NTP server
1. Install the NTP Software Package
[Root @ client ~] # Yum install ntp-y
2. NTP service configuration
[Root @ server ~] # Grep-v "^ #"/etc/ntp. conf
Driftfile/var/lib/ntp/drift
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.0.0 mask 255.255.255.0 nomodify notrap
Server 192.168.0.254
Server 0.rhel.pool.ntp.org
Server 1.rhel.pool.ntp.org
Server 2.rhel.pool.ntp.org
Server 127.127.1.0 # local clock
Fudge 127.127.1.0 stratum 10
Includefile/etc/ntp/crypto/pw
Keys/etc/ntp/keys
[Root @ server ~] # Cat/etc/ntp/step-tickers)
# List of servers used for initial synchronization.
192.168.0.254

[Root @ server ~] # Cat/etc/sysconfig/ntpd
# Drop root to id 'ntp: ntp 'by default.
SYNC_HWCLOCK = yes
OPTIONS = "-u ntp: ntp-p/var/run/ntpd. pid-g"
3. Start the ntp service
[Root @ server ~] # Chkconfig ntpd on
[Root @ server ~] # Service ntpd start
Starting ntpd: [OK]
4. ntp Test
[Root @ server ~] # Ntpstat
Synchronised to local net at stratum 11
Time correct to within 950 MS
Polling server every 64 s

[Root @ server ~] # Ntpq-p
Remote refid st t when poll reach delay offset jitter
========================================================== ==============================================
Server. INIT. 16 USB-64 0 0.000 0.000 0.000
* LOCAL (0). LOCL. 10 l 50 64 177 0.000 0.000

Client synchronization time:
1. windows

2. linux

[Root @ client ~] # Date
Wed Apr 11 10:43:30 CST 2012

Related Article

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.