How do I update a CentOS server's time from an authoritative time server?
Solution 1:
Use the ntp
daemon. Run yum install ntp
and ensure that the service is started via ntsysv
or chkconfig ntpd on
.
To get an immediate sync, run ntpdate time.apple.com
(or something similar).
Solution 2:
You need to install and configure ntp.
yum install ntp
chkconfig ntpd on
ntpdate pool.ntp.org
service ntpd start
should get things set up and running. You may find that the ntp package is already installed and just needs configuring.
Solution 3:
Yes.
NTP.
yum install ntp
chkconfig ntpd on
Do an initial sync, with
ntpdate pool.ntp.org
and start the time daemon with:
/etc/init.d/ntpd start
Solution 4:
You'll need to configure ntpd for the server. I suspect it is already installed but needs to be configured. Note: if it is a virtual server, you probably have the option of syncing with the virtual host.
Solution 5:
For centos 7.x installation:
yum install ntp
systemctl enable ntpd
initial sync, with:
ntpdate pool.ntp.org
start the daemon with:
systemctl start ntpd