About the installation and configuration of NTP time synchronization service under Linux

Source: Internet
Author: User

1, the installation of NTP service, to use time synchronization, then the server and the client need to use the following command to install the NTP package

[Email protected]5201351yuminstall ntp-y

2, if only as a client, the configuration can be very simple, edit the/etc/ntp.conf file, comment out the default of the following default 4 lines

together with our time synchronization server IP address or domain name, where the prefer option indicates that it is preferred

0123. centos.pool.ntp.org iburst          //  Where Iburst: When a transport NTP server is unavailable, it sends a series of concurrent packets for detection.  server 192.168.0.2server 192.168.0.1  prefer/var/log/ntpd.log                     //  Add on log information, this is not a required option

3, and then restart the Ntpd.service service, you can synchronize time with the upper NTP server

=======================>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>

4, of course, in the work, maybe we have to configure their own server for the NTP time synchronization server, let other clients synchronize

5, the same first step is also required to install the NTP service, as the NTP server, we need to add those IP can be time synchronization, here edit/etc/ntp.conf

192.168. 0.3                                          // Add this after the default restrict 127.0.0.1 192.168. 0.0 255.255. 255.0 nomodify notrap       // can also be added in this format

6, the last is also restart Ntpd.service service, you can let the designated network host and network segment to take time two steps.

----------------------------------------------------------------------------------

Finally, I would add the knowledge about time in Linux >>>>>>>>

1, Linux time is divided into the system time and hardware time, the system time can be viewed through the date command

Hardware time needs to be viewed using the hwclock or hwclock-r command

2, set the system time:date-s "2016-01-15 15:58:00"

Set hardware time:hwclock--set--date "2016-01-15 15:58:00"

-----------------------------------------------------------------------------

3, System time-to-date hardware time:hwclock-w

4, hardware time---sync to--system time:hwclock-s

About the installation and configuration of NTP time synchronization service under Linux

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.