Last active
January 2, 2016 21:29
-
-
Save TrevorS/8363461 to your computer and use it in GitHub Desktop.
Setting the timezone and correcting the time on a RHEL server. Example uses MTD timezone.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Set the timezone in the system configuration. | |
| sudo vim /etc/sysconfig/clock | |
| # Symlink the correct timezone (in this case MDT) into /etc/localtime | |
| sudo ln -sf /usr/share/zoneinfo/America/Denver /etc/localtime | |
| # Correct the date/time using ntpdate. | |
| sudo ntpdate 0.north-america.pool.ntp.org | |
| # Make sure ntpd is running. | |
| sudo service ntpd restart | |
| # Configure ntpd to run at boot-up. | |
| sudo chkconfig ntpd on | |
| # Set the hardware clock to the corrected system clock. | |
| sudo hwclock -w | |
| # To check your system clock: | |
| date | |
| # To check your hardware clock: | |
| sudo hwclock --show |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment