FreeBSD Install OpenNTPD NTP Server / Client To Synchronize The Local Clock
OpenNTPD is a free and easy-to-use implementation of the Network Time Protocol (NTP) that provides accurate time synchronization between servers and clients on a network. Here are the steps to install OpenNTPD on FreeBSD:
- Update the package repository:
# pkg update - Install OpenNTPD:
# pkg install openntpd - Edit the configuration file
/etc/ntpd.confto specify the time servers that you want to use for time synchronization:server time.server.comReplace
time.server.comwith the name or IP address of the time server that you want to use. - Start the OpenNTPD service and enable it to start at boot time:
# service openntpd onestart # sysrc openntpd_enable="YES" - Verify that the OpenNTPD service is running and synchronizing the local clock:
# ntpctl -s allThis command should display the status of the time synchronization, including the time server that is being used and the offset between the local clock and the time server.
