Basic information
A set of servers or virtual machines is used separately for each component.
Step 1: Configure host names
Configure host names:
sudo hostnamectl set-hostname server1.your_domain --static
sudo hostnamectl set-hostname server2.your_domain --static
sudo hostnamectl set-hostname server3.your_domain --static
Step 2: Configure time synchronization
- If your DHCP server doesn’t provide time synchronization information, add IP addresses of NTP servers you want to synchronize the system with. For example:
sudo echo 'NTP=0.pool.ntp.org server 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org' >> /etc/systemd/timesyncd.conf
- Restart the
timesyncd
service:
sudo systemctl restart systemd-timesyncd
- To view the current time synchronization status, run the following command:
sudo timedatectl status
- You can view detailed information about time synchronization status by running the following command:
sudo timedatectl timesync-status
Was this helpful?