How to config Time and date on CentOS 7 (NTP)
The Network Time Protocol (NTP) is a networking protocol for clock synchronization between computer systems over packet-switched, variable-latency data networks.
NTP time servers work within the TCP/IP suite and rely on User Datagram Protocol (UDP) port 123.
NTP servers are normally dedicated NTP devices that use a single time reference to which they can synchronize a network. … Dedicated NTP servers are required for Security, Protection, Accuracy, Legality, and Control.
NTP (Network Time Protocol) is a protocol which runs over port 123 UDP. NTP synchronize clients time and date with a master server.
Here in this tutorial the client side configuration is taken in to account where the server side configurations are not entirely different.
Here let us assume that you have root permission, otherwise, you may start commands with “sudo”.
Install and configure NTP Daemon
NTP package is provided by default from RHEL repositories, and can be installed by the following command:
yum install ntp
To make sure that the appropriate time zone is configured on the server please execute below command.
timedatectl
If you wish to change the timezone please follow following steps.
to get the list of all the available time zones:
timedatectl list-timezones
To set your time zone you can use command below: (e.g. Kolkata)
timedatectl set-timezone Asia/Kolkata
Now you need to active the NTPD service at boot:
systemctl enable ntpd
systemctl start ntpd
To get a basic report you can use
ntpstat
Or
date
And to get some information about the time synchronization process
ntpq -p
All of your NTP configurations are here:
/etc/ntp.conf
How to Find and Set Hardware Clock in Linux
To set your hardware clock to coordinated universal time, UTC, use the set-local-rtc boolean-value option as follows:
First Find out if your hardware clock is set to local timezone:
# timedatectl | grep local
Set your hardware clock to local timezone:
# timedatectl set-local-rtc 1
Set your hardware clock to coordinated universal time (UTC):
# timedatectl set-local-rtc 0
Synchronizing Linux System Clock with a Remote NTP Server
NTP stands for Network Time Protocol is an internet protocol, which is used to synchronize the system clock between computers. The timedatectl utility enables you to automatically sync your Linux system clock with a remote group of servers using NTP.
Please note that you must have NTP installed on the system to enable automatic time synchronization with NTP servers.
To start automatic time synchronization with a remote NTP server, type the following command at the terminal.
# timedatectl set-ntp true
To disable NTP time synchronization, type the following command at the terminal.
# timedatectl set-ntp false
Please share you valuable comments to improve us better.
To configure POP3 & IMAP Email account in Thunderbird click here