TIPS & TRICKS
To search the contents of the man pages
# man -k searchterm |
Configure NTP
To keep in mind. If necessary:
# yum install chrony -y |
# systemctl restart chronyd.service |
# vim /etc/chrony.conf |
Configure NTP 1
| Configure your system so that it is an NTP pool of 2.centos.pool.ntp.org
NTP is a service that is using chrony deamon. It should be already installed in the system but it does not cost You to issue:
# yum install -y chrony |
There is a list of servers being used to get time from. The lines start with server. In order to use only one of the
servers (the one that is provided in question) You should comment all others and just put new line there:
# vim /etc/chrony.conf |
# systemctl restart chronyd.service |
Verify:
# timedatectl |
User command to interfere with chronyd is chronyc. To list the NTP sources being used we issue:
# chronyc sources -v |
Configure NTP 2
| Configure NTP service, Synchronize the server time, NTP server: classroom.example.com
Configure the client:
# dnf -y install chrony |
# vim /etc/chrony.conf |
Start:
# systemctl enable chronyd |
Verifr:
timedatectl status |
Configure NTP 3
| Set the system time zone in Paris and configure the system to use NTP
Check if the chrony service is up and running:
# systemctl status chronyd.service |
# timedatectl list-timezones // choose the apropriate timezone |
Configure NTP 4
| Make node1 server as NTP server to utility.server9.example.com (172.24.9.40)
# vim /etc/chrony.conf |
# systemctl daemon-reload |
Finally add ntp service to firewall
# firewall-cmd --add-service=ntp --permanent // Applique de façon permanente (Prochain reboot) |
Configure NTP 5
| Configure your system to be an NTP client for materials.example.com
.
| (Note: materials.example.com is a DNS alias for classroom.example.com)
# vim /etc/chrony.conf |
Restart the service, let the modification of the configuration file take effect, and set the boot to start automatically:
# systemctl restart chronyd.service |
Verify:
# chronyc sources -v |
# timedatectl |
Documentations
Internet
Git
ChatGPT