- Managing Linux Users and Groups
- Managing File Ownership and Permissions
- Lab Exercise 3.1: Managing Linux Security
- Managing the Linux Networking Configuration
- Managing Linux Applications and Services
- Lab Exercise 3.2: Installing Linux Products and Managing Processes
- Implementing and Configuring NTP
- Lab Exercise 3.3: Implementing NTP
- Summary
Lab Exercise 3.3: Implementing NTP
In this exercise, you will configure and run the NTP daemon on your server. Complete the following steps:
CAUTION
This lab assumes you have Internet access from your Linux server.
The NTP package should have been installed by default when you installed your system. Verify that this is the case by doing the following:
-
Open a terminal session.
-
Change to your root user account by entering su and supplying a password of novell.
-
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.
-
Configure NTP to synchronize time with a publicly available NTP server on the Internet by completing the following:
-
At the shell prompt, enter vi /etc/ntp.conf.
-
Scroll down to the line that reads "server 127.127.1.0 # local clock.
-
Add a new line beneath this line.
-
Open a browser window and navigate to http://www.eecis.udel.edu/~mills/ntp/servers.html.
-
Scroll to the bottom of the browser window and select the Public NTP Secondary (stratum 2) Time Servers link.
-
From the list provided, identify the IP address of a time server that is located reasonably close to you.
-
Switch back to your terminal session.
-
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 131.216.1.101.
-
Comment out the local clock line and the fudge line by placing an asterisk (#) character at the beginning of each line.
-
Press Esc and then enter :exit.
-
Configure your server's time zone by entering tzselect at a shell prompt. Follow the Time Zone Wizard prompts to set your time zone.
-
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.
-
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 131.216.1.101.
-
Run this command several times until the offset reported by this command is less than 1 second.
-
Start the xntpd daemon by entering /etc/init.d/xntpd start. You should see success messages displayed.
-
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.