DEV Community

Rümeysa Öz for Açıklab

Posted on • Edited on

3

Ubuntu 22.04'te systemd-timesyncd ile NTP İstemcisi Yapılandırma

Birçok modern Linux dağıtımı, ağ zaman senkronizasyonunu yönetmek için systemd-timesyncd servisini kullanır.

1. systemd-timesyncd Servis Durumunu Kontrol Etme:

Öncelikle, servisin çalışıp çalışmadığını kontrol edin:

sudo systemctl status systemd-timesyncd 
Enter fullscreen mode Exit fullscreen mode

2. NTP Sunucusunun Ayarlanması:

Varsayılan olarak, systemd-timesyncd Ubuntu'nun NTP sunucularını kullanacaktır. Ancak özel bir NTP sunucusu kullanmak istiyorsanız:

Yapılandırma dosyasını açın:

sudo nano /etc/systemd/timesyncd.conf
Enter fullscreen mode Exit fullscreen mode

Dosyanın sonuna aşağıdaki satırı ekleyin. Bu örnekte "ntp.ulakbim.gov.tr" adlı NTP sunucusunu kullanıyoruz (NTP Server IP'si de girilebilir.):

NTP=ntp.ulakbim.gov.tr
Enter fullscreen mode Exit fullscreen mode

3. Servisi Yeniden Başlatma:

Yapılandırmayı tamamladıktan sonra, değişikliklerin etkili olması için systemd-timesyncd servisini yeniden başlatın:

sudo systemctl restart systemd-timesyncd 
Enter fullscreen mode Exit fullscreen mode

4. Senkronizasyon Durumunu Kontrol Etme:

timedatectl komutu ile NTP senkronizasyonunun durumunu kontrol edebilirsiniz:

timedatectl timesync-status
Enter fullscreen mode Exit fullscreen mode

Bu komut, istemcinin NTP sunucusuyla olan senkronizasyon durumu hakkında ayrıntılı bilgi verecektir.

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay