Ivan Asked: 2012-08-23 04:23:42 +0800 CST2012-08-23 04:23:42 +0800 CST 2012-08-23 04:23:42 +0800 CST How to configure NTP time synchronization on a server? 772 I would like to configure my Ubuntu 12.04 server to synchronize its clock with a specific NTP server. Where to set this up? server 2 Answers Voted Rinzwind 2012-08-23T04:34:35+08:002012-08-23T04:34:35+08:00 Installation or if you prefer command line ... sudo apt-get install ntp Configuration sudo nano /etc/ntp.conf This file will probably have the default Ubuntu server activated. You can check http://www.pool.ntp.org/zone/europe or http://www.pool.ntp.org/zone/north-america or http://www.pool.ntp.org/zone/asia for local (country based) servers. Just comment out all of the servers by adding a # in front of it and add in the one you want to use. Activating the new changes sudo service ntp restart Checking if it synchs sudo ntpq -c lpeer This will show a list of all the servers and when they where last checked. Random example from the web: See logging sudo tail -f /var/log/syslog Do make sure, if you are using a firewall, to open UDP 123. Mitch 2012-08-23T04:33:18+08:002012-08-23T04:33:18+08:00 First, make sure that you have NTP installed, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command below. sudo apt-get install ntp Then edit the file below to add time servers. sudo nano /etc/ntp.conf To add time-servers to synchronize with, use USA Servers or Europe Servers. Then, restart NTP service sudo service ntp restart
or if you prefer command line ...
This file will probably have the default Ubuntu server activated. You can check http://www.pool.ntp.org/zone/europe or http://www.pool.ntp.org/zone/north-america or http://www.pool.ntp.org/zone/asia for local (country based) servers. Just comment out all of the servers by adding a
#
in front of it and add in the one you want to use.This will show a list of all the servers and when they where last checked. Random example from the web:
Do make sure, if you are using a firewall, to open UDP 123.
First, make sure that you have NTP installed, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command below.
Then edit the file below to add time servers.
To add time-servers to synchronize with, use USA Servers or Europe Servers.
Then, restart NTP service