在Rocky Linux上配置和使用NTP服务进行时间同步的步骤如下:
sudo dnf install ntp
/etc/ntp.conf
文件:sudo vi /etc/ntp.conf
找到服务器列表部分,添加或修改NTP服务器,例如:
server 0.centos.pool.ntp.org
server 1.centos.pool.ntp.org
server 2.centos.pool.ntp.org
sudo systemctl start ntpd
sudo systemctl enable ntpd
sudo systemctl status ntpd
sudo ntpdate -u 0.centos.pool.ntp.org
至此,您已经成功在Rocky Linux上配置和使用NTP服务进行时间同步。现在,您的系统将会自动同步时间以保持准确。