Home > Articles

  • Print
  • + Share This
This chapter is from the book

Lab Exercise 3.3: Implementing NTP

In this exercise, you will configure and run the NTP daemon on your server. Complete the following steps:


This lab assumes you have Internet access from your Linux server.

  1. The NTP package should have been installed by default when you installed your system. Verify that this is the case by doing the following:

    1. Open a terminal session.

    2. Change to your root user account by entering su – and supplying a password of novell.

    3. At the shell prompt, enter ls /etc/xntpd. If the xntpd init script is there, then the package has been installed. If not, use the skills you gained in this chapter to install the xntpd daemon using YaST.

  2. Configure NTP to synchronize time with a publicly available NTP server on the Internet by completing the following:

    1. At the shell prompt, enter vi /etc/ntp.conf.

    2. Scroll down to the line that reads "server # local clock.

    3. Add a new line beneath this line.

    4. Open a browser window and navigate to http://www.eecis.udel.edu/~mills/ntp/servers.html.

    5. Scroll to the bottom of the browser window and select the Public NTP Secondary (stratum 2) Time Servers link.

    6. From the list provided, identify the IP address of a time server that is located reasonably close to you.

    7. Switch back to your terminal session.

    8. On the new line you just created, enter server IP_address_of_time_server. For example, if you selected the time server at the University of Nevada, you would enter server

    9. Comment out the local clock line and the fudge line by placing an asterisk (#) character at the beginning of each line.

    10. Press Esc and then enter :exit.

    11. Configure your server's time zone by entering tzselect at a shell prompt. Follow the Time Zone Wizard prompts to set your time zone.

  3. Manually set your server's system time by entering date mmddhhmmyyyy. For example, if the current date and time is August 30, 2004, 8:30 p.m., you would enter date 083020302004.

  4. Perform a one-time synchronization with the NTP time provider by entering ntpdate time_server_IP_address. For example, if you selected the NTP time server at the University of Nevada, you would enter ntpdate

  5. Run this command several times until the offset reported by this command is less than 1 second.

  6. Start the xntpd daemon by entering /etc/init.d/xntpd start. You should see success messages displayed.

  7. Verify that the time is synchronized by entering ntpq –p. The offset parameter should be less than 1 second.

Congratulations! You now know how to synchronize time on your SLES 8 system using NTP.

  • + Share This
  • 🔖 Save To Your Account