NTP service configuration in Linux

Source: Internet
Author: User

The NTP service is divided into two servers: server and client. Select one server and the other three servers as client. For example, if 18.2.4.4 is ntpserver, the other servers are ntpclient.

Ntpserver
1. log on to the server through SSH and go to the/etc directory. We recommend that you back up the NTP. conf file first, and then modify the NTP. conf file to keep the following content:
Server 127.127.1.0
Fudge 127.127.1.0 stratum 8
Restrict 18.2.4.0 mask limit 254.0 nomodify notrap # allowed network segment

2. Run service ntpd restart to restart the NTP service.

3. Run chkconfig -- level 345 ntpd on to enable the NTP service to start with the system.

Ntpclient
1. After the ntpserver end is restarted, execute ntpdate ntpserverip (the IP address of ntpserver is written here) about 5-10 minutes later. A similar case indicates that the synchronization is successful.
----------------------
[Root @ hscbu-tx39 ~] # Ntpdate 18.2.4.4
31 Dec 11:14:50 ntpdate [16457]: Step time server 18.2.4.4 offset 1622240.103462 Sec
----------------------
2. Add system scheduled tasks to ntpclient
[Root @ hscbu-tx39 ~] # Crontab-e
1 ***/usr/sbin/ntpdate 18.2.4.4

3. Other ntpclient operations

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.