configure NTP server on debian
We had a client whereby the phones date & time was wrong as it can’t connect to an ntp server and they don’t have a local ntp server onsite. They don’t allow the phones to out to the internet and pull the information.
So we decided to install an ntp server on the Asterisk box itself. Below are the steps to on how to install an ntp server on a debian.
Steps:
- First, we need to install an ntp server on the box. Run the cmd:
apt-get install ntp ntpdate
- Next, we need to configure the ntp server config files to point to your nearest ntp server.You can refer to http://www.pool.ntp.org/zone/@ to check your nearest ntp server address. We need to modify the config files at /etc/ntp.conf. Leave everything default except the server info. I’m using Asia as my server pool.
# pool.ntp.org maps to more than 300 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.asia.pool.ntp.org iburst
server 1.asia.pool.ntp.org iburst
server 2.asia.pool.ntp.org iburst
server 3.asia.pool.ntp.org iburst - Save the files and then we need to update the ntp server.
ntpdate 0.asia.pool.ntp.org
- Then we need to restart the ntp server service.
/etc/init.d/ntp restart
- Now we need to check whether our ntp server is synchronized properly.
- A star by any one of the names means that the system clock is synchronising with the NTP clock. If you don’t have a star, it means that the clocks are unreachable, already synchronized to this server or has an outrageous synchronization distance. Try running ntpdate (you will need to stop the ntp server) with your first ntp server as an argument. This will set your system clock fairly accurately and mean that the server will be able to choose a clock to synchronize with.
- Once it is up and running, you can configure the phones and point the ntp server to your Asterisk box now.
![clip_image001[4]](http://intuitinnovations.com/blog/wp-content/uploads/2009/09/clip_image0014.png)
June 28th, 2010 at 11:32 pm
Thanks for this usefull information.