Dorokhov.codes

Setting up a time zone and NTP

Time zone

Show a list of time zones:

sudo timedatectl list-timezones

Set a time zone:

sudo timedatectl set-timezone Europe/Kiev

Check if everything is set up:

sudo timedatectl

NTP synchronization

This will allow your server to stay in sync with other servers.

For NTP synchronization, we will use a service called ntp, which we can install from CentOS’s default repositories:

sudo yum install ntp

Start the service for this session:

sudo systemctl start ntpd

Enable the service so that it is automatically started each time the server boots:

sudo systemctl enable ntpd