NTP server configuration in RHEL6

Source: Internet
Author: User
Experiment environment for configuring NTP server under RHEL6: [root@www.linuxidc.com ~] # Cat/etc/RedHat-releaseRedHatEnterpriseLinuxServerrelease6.0 (Santiago) [root@www.linuxidc.com ~] # Uname-r2.6.32-71.el6.x86_64 I. Principle of NTP service 1. Principle N

NTP server configuration in RHEL6

Lab environment:
Root@www.linuxidc.com ~ # Cat/etc/RedHat-release
Red Hat Enterprise Linux Server release 6.0 (Santiago)
Root@www.linuxidc.com ~ # Uname-r
2.6.32-71. el6.x86 _ 64

I. Principles of NTP service
1. Principle
Network Time Protocol (NTP) is a Protocol used to synchronize computer Time. It can enable computers to access their servers or clock sources (such as quartzels and GPS) for synchronization, it can provide high-precision time correction (the difference between the LAN and the standard is less than 1 millisecond, And the WAN is dozens of milliseconds ), encryption validation can be used to prevent malicious protocol attacks.
2. Port
TCP 123

Ii. NTP service configuration
1. Install the NTP Software Package
Root@www.linuxidc.com ~ # Yum-y install ntp
2. NTP service configuration
Root@www.linuxidc.com ~ # Grep-v "^ #"/etc/ntp. conf
Driftfile/var/lib/ntp/drift
Restrict 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
Restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
Server 192.168.0.254
Server 127.127.1.0 # local clock
Fudge 127.127.1.0 stratum 10
Includefile/etc/ntp/crypto/pw
Keys/etc/ntp/keys
Logfile/var/log/ntp
Root@www.linuxidc.com ~ # Cat/etc/ntp/step-tickers // when the NTP service is started, the time will be automatically proofread with the upper-layer NTP service recorded in the file
# List of servers used for initial synchronization.
192.168.0.254
Root@www.linuxidc.com ~ # Cat/etc/sysconfig/ntpd // allows the BIOS to synchronize time with the System
# 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@www.linuxidc.com ~ # Service ntpd start
Root@www.linuxidc.com ~ # Chkconfig ntpd on
4. NTP Testing
Root@www.linuxidc.com ~ # Ntpstat
Synchronised to NTP server (192.168.0.254) at stratum 12 // NTP server for time verification
Time correct to within 958 MS // time difference between local and upper-layer NTP servers
Polling server every 64 s // next synchronization time
Root@www.linuxidc.com ~ # Ntpq-p
Remote refid st t when poll reach delay offset jitter
========================================================== ==============================================
* Instructor. exam LOCAL (0) 11 u 26 64 377 0.807 0.030 0.219
LOCAL (0). LOCL. 10 l 27 64 377 0.000 0.000

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.