Tuesday, November 11, 2014

Setting up the correct timezone on CentOS 7

To list the available timezones:

# timedatectl list-timezones

To set timezone:

# timedatectl set-timezone America/Vancouver

To view the status of the change:

# timedatectl

To automatically synchronize your server internal clocks using ntp servers online, run the commands below to install NTP client:

# yum install ntpdate

After installing it, run the commands below to synchronize the clock to one of the many NTP servers online. Here’s one server listed for the US areas.

# ntpdate 0.us.pool.ntp.org

Finally, run the commands below to change the hardware clock.

# hwclock --systohc

https://www.liberiangeek.net/2014/09/configure-server-timezone-centos-7/

No comments: