By using this site, you agree to the Privacy Policy, Cookie Policy and Terms of Service.
Accept
TRENDING
  • Linux
  • Shell Script
  • Cloud
  • DevOps
  • About US
SUBSCRIBE
  • CLOUD
  • DEVOPS
  • LINUX
  • SHELL SCRIPT
Reading: How to Sync Time with Timezone on AlmaLinux / Rocky Linux
Share
TechBrownTechBrown
Aa
  • CLOUD
  • DEVOPS
  • LINUX
  • SHELL SCRIPT
Search
  • CLOUD
  • DEVOPS
  • LINUX
  • SHELL SCRIPT
Follow US
© 2014 - 2022 TechBrown. All Rights Reserved.
Linux

How to Sync Time with Timezone on AlmaLinux / Rocky Linux

Published August 8, 2018
Share
3 Min Read
SHARE

Time synchronization is the most vital part of on AlmaLinux / Rocky Linux / Amazon Linux. The configuration of time sync is straight forward using NTP (Network Time Protocol). It includes some couple of commands that works fine with the time synchronization. Keeping different clocks running into a same severs is a quite interesting task to keep running your system time up to date.

When any user login to your system so it is so important task to note the user login time according to the local time of that system time zone. Most of the services are running in different time zones so it is vital need to run the system with accurate time.

Step-1 : Check the different available time zones and Set your Time Zone from different timezone

List the timezone that are available

$ sudo timedatectl list-timezones

Set your location timezone

$ sudo timedatectl Asia/Kolkata

Step-2 : Sync time using NTP daemons

There are two types of NTP daemons including chronyd and ntpd. You should select and use only one to avoid running two NTP daemons at a same time on same machine this cause ntp incompatibility and instability using two NTP daemons at same time.

This tutorial includes two NTP daemons you should select any one:

  1. Sync time using chronyd and it is suitable for virtual system.
  2. Sync time using ntpd and it is suitable for networking system.

Step-3 : Sync time using chronyd

Install the chronyd package

$ sudo yum install chrony

Start the chronyd services

$ sudo systemctl start chrnoyd

Edit the configuration file

$ sudo vi /etc/chrony.conf

Add these lines

1st Option

server 0.centos.pool.ntp.org iburst
server 1.centos.pool.ntp.org iburst
server 2.centos.pool.ntp.org iburst
server 3.centos.pool.ntp.org iburst

2nd Option

server 0.rhel.pool.ntp.org iburst
server 1.rhel.pool.ntp.org iburst
server 2.rhel.pool.ntp.org iburst
server 3.rhel.pool.ntp.org iburst

After adding these lines simply save and exit.

Restart the services to make changes in effect.

$ sudo systemctl restart chrnoyd

Enable this services to run at every boot.

$ sudo systemctl enable chrnoyd

Step-4 : Sync time using ntpd

Install the ntpd package

$ sudo yum install ntp

Start the ntpd services

$ sudo systemctl start ntpd

Edit the configuration file

$ sudo vi /etc/ntp.conf

Add these lines

1st Options

server 0.centos.pool.ntp.org iburst
server 1.centos.pool.ntp.org iburst
server 2.centos.pool.ntp.org iburst
server 3.centos.pool.ntp.org iburst

2nd Options

server 0.rhel.pool.ntp.org iburst
server 1.rhel.pool.ntp.org iburst
server 2.rhel.pool.ntp.org iburst
server 3.rhel.pool.ntp.org iburst

After adding these lines simply save and exit.

Restart the services to make changes in effect.

$ sudo systemctl restart ntpd

Enable this services to run at every boot.

$ sudo systemctl enable ntpd

Congratulations now you have configured sync time with timezone on AlmaLinux / Rocky Linux / Amazon Linux.

You Might Also Like

How to Optimize MySQL Performance on AlmaLinux / Rocky Linux

How to Enable TLS 1.3 on Apache and Nginx

5 Security Tips to Protect your WordPress Website from Hackers

How to Enable AES-128 Bit SSL Cipher with TLS 1.3 on Nginx Web Server

How to Set Up NGINX Web Server on AlmaLinux / Rocky Linux

TechBrown Solutions August 8, 2018
Share this Article
Facebook Twitter Email Print
Leave a comment Leave a comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

TRENDING

Linux

How to Hide Server Signature of Nginx and PHP Version on Ubuntu / AlmaLinux / Rocky Linux

Linux

How to Install Sphinx-Doc on Ubuntu / AlmaLinux / Rocky Linux

Linux

How to Install Bitdefender Antivirus Scanner on Ubuntu / Debian

Linux

How to Install Vesta Control Panel on Ubuntu / AlmaLinux / Rocky Linux

You Might Also Like

Linux

How to Optimize MySQL Performance on AlmaLinux / Rocky Linux

October 19, 2021
Linux

How to Enable TLS 1.3 on Apache and Nginx

March 14, 2021
Linux

5 Security Tips to Protect your WordPress Website from Hackers

November 8, 2020
Linux

How to Enable AES-128 Bit SSL Cipher with TLS 1.3 on Nginx Web Server

November 7, 2020

Follow US on Social Media

Facebook Twitter Youtube Rss

© 2014 - 2022 TechBrown. All Rights Reserved.

  • About Us
  • Terms of Service
  • Cookie Policy
  • Privacy Policy

Removed from reading list

Undo
Go to mobile version
Welcome Back!

Sign in to your account

Lost your password?