If we need to configure a computer with debian or another linux distribution to be synchronized to an ntp (network time protocol) server, so that it keeps the time synchronized with a time server.
First of all we must install the packages or packages necessary to work with ntp, such as ntp and ntpdate.
apt-get install ntp ntpdate
Once installed, we have to proceed with the configuration, we edit the file /etc/ntp.conf
Adding as time servers we estimate, I have tried these two and they work well for me:
server ntp0.pipex.net
server ntp1.pipex.net
Adding in the line where we have the servers the following line:
# pool.ntp.org maps to about 1000 low-stratum NTP servers. Your server will
# pick a different set every time it starts up. Please consider joining the
# pool: <http://www.pool.ntp.org/join.html>
server 0.debian.pool.ntp.org iburst
server 1.debian.pool.ntp.org iburst
server 2.debian.pool.ntp.org iburst
server 3.debian.pool.ntp.org iburst
server ntp0.pipex.net
server ntp1.pipex.net
Once added, we save the configuration file, we proceed to perform an ntp execution, for example with the first time server that we have added,
After this, we restart the ntp service
/etc/init.d/ntp restart
And we already have it, if we make a date, we will have the time synchronized.
We can see a trace of the servers that are running and how they are accessed with the command line command:
ntpq -p
And we would have configured it correctly, it is very simple to configure and it works perfectly, we can find lists of time servers by many sites simply by doing a search by internet or by consulting the ntp pool project that offers a pool of servers to include in our file for ntp server configuration, /etc/ntp.conf, the ntp pool project url is: http://www.pool.ntp.org/en/zone/en