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