To install ntpd, you can do it a couple different ways (such as downloading it from ntp.org and installing it manually) or you can use your favorite installer (I use apt-get):
sudo apt-get install ntp
Then you need to edit the /etc/ntp.conf file to point to the server you want to grab the time from. Since the installation started the process for me, I wanted to stop it before editing the conf file:
service ntp stop
Also, you might need to chmod the file first to allow writing to the file:
cd /etc chmod 777 ntp.conf vi ntp.conf
Add a line with your server to the config, I added mine above the defaults in they had listed:
server 10.2.1.4
Save your changes with :wq
Now undo the chmod command to put it back to rw-r-r:
sudo chmod 644 ntp.conf
Now start the ntp service back up:
service ntp start
That's all there was to it. Type "date" to see the current time and date on your box. It should be current after the service starts.
No comments:
Post a Comment