هذا الجزء لم يُترجم بعد. أنت ترى النص الإنجليزي.
الهدف
Set the time zone, make server1 a time server for the lab network, and make server2 sync from server1.
قبل أن تبدأ
- Work as root on both servers.
المهام
ضع علامة على المهمة عندما تنتهي منها. متصفحك فقط يتذكر ذلك.
- On both servers, show all time settings. Set the time zone to
Asia/Riyadh. - On server1, allow NTP clients from 192.168.122.0/24 and open the firewall for NTP.
- On server2, remove the default pool and use only server1 as time source.
- On server2, check that server1 is the selected source and that the clock is synchronized.
- On server2, write the system time to the hardware clock and compare both clocks.
تحقّق من عملك
timedatectl | grep -E 'Time zone|synchronized|NTP service'
chronyc sources
chronyc tracking | grep -E 'Reference|Leap'
hwclock; date- Time zone: Asia/Riyadh (+03).
- On server2,
chronyc sourcesshows^* server1. System clock synchronized: yes.
تلميحات
اعرض التلميحات
timedatectl set-timezone.- server1:
allow 192.168.122.0/24in /etc/chrony.conf, firewall servicentp. - server2: comment the
poolline, addserver server1 iburst. hwclock --systohc.
الحل
اعرض الحل
- Time zone (both servers).
timedatectl timedatectl set-timezone Asia/Riyadh - server1 as NTP server.
echo "allow 192.168.122.0/24" >> /etc/chrony.conf systemctl restart chronyd firewall-cmd --add-service=ntp --permanent; firewall-cmd --reload - server2 as client.
- Check on server2.
- Hardware clock.
ملاحظاتي
لا توجد ملاحظات بعد.