How to sync time on Linux servers with Chrony

Jack Wallen shows you how to keep your Linux servers running at the correct time, using Chrony.

Closeup of hands on clock face
Image: Stillfx/Adobe Stock

Recently, I ran into an issue where I discovered a few Linux servers I work with were operating under an assumed time zone. Because of that time drift, certain services wouldn’t function properly. In particular, two servers both served as nodes on a Docker Swarm cluster and were unable to perform their duties and MariaDB database replication failed. After fixing that simple issue, I realized it was time to start paying closer attention to the time on my servers.

With that, I was reminded of a tool that helps make this simple. Said tool is Chrony, which will constantly keep your time in sync on your servers and desktops.

SEE: 40+ open source and Linux terms you need to know (TechRepublic Premium)

Let’s get Chrony installed on Linux. I’ll demonstrate on both Ubuntu Server 22.04 and Rocky Linux 9.

What you’ll need

The only things you’ll need are one or Linux Server installations and a user with sudo privileges. That’s it — let’s get our time in sync.

How to set your time zone

Before we install and use Chrony, we’ll want to make sure the time zones are configured properly. Before you set your time zone, you’ll want to know the exact format. For that, issue the command:

timedatectl list-timezones

Scan through the list of time zones and find the correct one for your area. Once you know your time zone, set it with the command:

sudo timedatectl set-timezone TIMEZONE

Where TIMEZONE is the correct time zone for your area.

How to install Chrony

Next, we can install Chrony. On Ubuntu Server (or any Debian derivative), the command for that installation is:

sudo apt-get install chrony -y

On Rocky Linux or any RHEL derivative, that command is:

sudo dnf install chrony -y

Start and enable Chrony with:

sudo systemctl enable --now chronyd

Enable the Chrony NTP service and check the time

Finally, we can enable the Chrony NTP service and verify the time on the server.

Enable Chrony NTP with the command:

sudo timedatectl set-ntp yes

You can now view the time data on your system with:


You should see, in the output (Figure A), that NTP service is active and the time and time zone are correct.

Figure A

Chrony is working and keeping your server time on-time.

And there you have it, the simplest way to keep your Linux servers’ time in sync. If you ever run into an issue where a service or app fails for no apparent reason, check your time. If you find time incorrectly set or drifts, Chrony and timedatectl are always there to help you out.

Subscribe to TechRepublic’s How To Make Tech Work on YouTube for all the latest tech advice for business pros from Jack Wallen.

Source link

istanbul escort aksaray escort arnavutköy escort ataköy escort avcılar escort avcılar türbanlı escort avrupa yakası escort bağcılar escort bahçelievler escort bahçeşehir escort bakırköy escort başakşehir escort bayrampaşa escort beşiktaş escort beykent escort beylikdüzü escort beylikdüzü türbanlı escort beyoğlu escort büyükçekmece escort cevizlibağ escort çapa escort çatalca escort esenler escort esenyurt escort esenyurt türbanlı escort etiler escort eyüp escort fatih escort fındıkzade escort florya escort gaziosmanpaşa escort güneşli escort güngören escort halkalı escort ikitelli escort istanbul escort kağıthane escort kayaşehir escort küçükçekmece escort mecidiyeköy escort merter escort nişantaşı escort sarıyer escort sefaköy escort silivri escort sultangazi escort suriyeli escort şirinevler escort şişli escort taksim escort topkapı escort yenibosna escort zeytinburnu escort porno 1080p porno izle 4k porno izle 720p porno izle abella danger alman alman porno alman porno izle aloha tube porno amatör amatör porno amatör porno izle anal anal porno anal porno izle arap porno asa akira porno asyalı porno bangbros porno bangbros porno izle banyoda sikis başörtülü porno beeg porno izle beyaz tenli porno izle biseksuel porno izle bisexsuel porno brandi love porno brazzers brazzers porno izle canli porno canli porno izle çinli porno çinli porno izle ensest porno ensest porno izle ensest seks erotik porno erotik porno izle esmer porno esmer porno izle etek altı fake agent fake taxi fake taxi porno fantazi pornoları fantezi porno izle fetiş porno fetiş porno izle fetish fransız porno fransız porno izle full hd hg porno izle gangbang porno genç kız porno izle genç kız sikişi genç teen porno izle gizli çekim porno gizli çekim pornosu grup pornosu grup porno grup porno izle hd pornolar hd porno hd porno izle hemşire porno hemşire pornosu hizmetçi porno hizmetçi porno izle ingiliz porno japon pornoları japon porno kızlık bozma kızlık bozma porno izle konulu porno konulu porno izle koreli porno köylü pornoları kumral porno kumral porno izle latin pornoları latin porno latin porno izle lezbiyen pornoları lezbiyen porno lezbiyen porno izle lisa ann porno liseli pornoları liseli porno liseli porno izle manken porno manken porno izle masaj porno izle masturbasyon porno izle masturbasyon pornoları mature porno mia khalifa porno mia malkova porno milf porno izle mobil porno mobil porno izle öğrenci porno izle öğretmen porno izle okul porno izle olgun kadın pornosu olgun porno oral porno oral porno izle oral seks porna izle pornhub pornhub porno izle porno film izle porno indir porno izle porno resimler porno star porntube porno izle redtube redtube pornoları riley reid porno rokettube rus pornoları rus porno rus porno izle sakso blowjob porno izle sarışın pornoları sarışın porno sarışın porno izle sarışın pornoları sekreter porno shemale sikiş sikiş sikiş izle şişman porno siyahi pornoları suriyeli pornoları swinger porno tecavüz porno teen porn türbanlı pornoları türbanlı porno türk pornoları türk porno türk porno izle türkçe altyazılı porno türkçe altyazılı porno izle xhamster pornoları xhamster porno xhamster porno izle xnxx xnxx porno xnxx porno izle xvideos xvideos porno izle yaşlı porno yeşilçam porno izle youjizz youporn youporn porno izle zenci porno güvenilir bahis siteleri bahis siteleri casino deneme bonusu casino siteleri deneme bonusu para yatırma bonusu bahis siteleri casino siteleribahis sitesi para yatırma