+5 votes
189 views

How to configure an ntp server in Debian


in Linux / Unix by (551k points) | 189 views

1 Answer

+3 votes
Best answer

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


by (551k points)

Related questions

+4 votes
1 answer
asked Sep 28, 2019 in Linux / Unix by backtothefuture (551k points) | 441 views
+4 votes
1 answer
asked Nov 17, 2019 in Linux / Unix by backtothefuture (551k points) | 249 views
+4 votes
1 answer
asked Nov 16, 2019 in Linux / Unix by backtothefuture (551k points) | 258 views
+3 votes
1 answer
asked Nov 4, 2019 in Linux / Unix by backtothefuture (551k points) | 247 views
+4 votes
1 answer
asked Oct 10, 2019 in Linux / Unix by backtothefuture (551k points) | 270 views
Sponsored articles cost $40 per post. You can contact us via Feedback

Most popular questions within the last 30 days

  1. Cell phone location by number: How easy it is to do it in Latam
10,634 questions
10,766 answers
510 comments
3 users