+5 votes
205 views

How to configure an ntp server in Debian


in Linux / Unix by (552k points) | 205 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 (552k points)

Related questions

+4 votes
1 answer
asked Sep 28, 2019 in Linux / Unix by backtothefuture (552k points) | 455 views
+4 votes
1 answer
asked Nov 17, 2019 in Linux / Unix by backtothefuture (552k points) | 261 views
+4 votes
1 answer
asked Nov 16, 2019 in Linux / Unix by backtothefuture (552k points) | 271 views
+3 votes
1 answer
asked Nov 4, 2019 in Linux / Unix by backtothefuture (552k points) | 261 views
+4 votes
1 answer
asked Oct 10, 2019 in Linux / Unix by backtothefuture (552k points) | 282 views
Sponsored articles cost $40 per post. You can contact us via Feedback

Most popular questions within the last 30 days

10,659 questions
10,791 answers
510 comments
3 users