PDA

View Full Version : How to setup an UTC time & time synchronization on Linux quickly



Fli
11-14-2014, 12:37 PM
Setup UTC time (like GMT) on Linux server quickly and quickly setup synchronization of the time.

Check the current time:

date

change timezone to UTC

ln -sf /usr/share/zoneinfo/UTC /etc/localtime

install/update ntp (network time protocol) and then launch ntp on system boot:

yum install ntp -y;chkconfig ntpd on
or Debian
apt-get install ntp -y;update-rc.d ntp defaults

Synchronize time:

ntpdate pool.ntp.org

start the ntp synchronization service:

/etc/init.d/ntpd start

Check the current time:

date