|
Step 6: Configure the /etc/ntp.conf file to add your NTPBog'liq NTP serverStep 6: Configure the /etc/ntp.conf file to add your NTP
server as the new time server
Now we want our client machine to use our own NTP host server to be used as
the default time server. For this, we need to edit the /etc/ntp.conf file on the
client machine.
Run the following command as sudo in order to open the file in the Nano editor:
$ sudo nano /etc/ntp.conf
Then, add the following line in the file, where NTP-server-host is the hostname
you specified for your NTP server:
server NTP-server-host prefer iburst
This is how my file looks like after I have specified the time server:
Step 7: Restart the NTP server
In order for the above changes to take effect, you need to restart the NTP
service. Run the following command as sudo in order to do so:
$ sudo service ntp restart
Step 8: View the Time Synchronization Queue
Now your client and server machines are configured to be time-synced. You can
view the time synchronization queue by running the following command:
$ ntpq -ps
You should be able to see NTP-server-host as the time synchronization
host/source in the queue.
Document Outline - NTP Server and Client(s) on Ubuntu/Debian
- Step 1: Update repository index
- Step 2: Install NTP Server with apt-get
- Step 3: Verify installation (optional)
- Step 4: Switch to an NTP server pool closest to your location
- Step 5: Restart the NTP server
- Step 6: Verify that the NTP Server is running
- Step 1: Install ntpdate
- Step 2: Specify IP and hostname of the NTP server in the hosts file
- Step 3: Check if the client machine’s time is synchronized with NTP server
- Step 5: Install NTP on your client
- Step 6: Configure the /etc/ntp.conf file to add your NTP server as the new time server
- Step 7: Restart the NTP server
- Step 8: View the Time Synchronization Queue
|
| |