Configure Local NTP Server
· One min read
- install NTP package
# CentOS
$ sudo yum install -y ntp
# Ubuntu
$ sudo apt install -y ntp
- Edit
ntp.conf
$ vim /etc/ntp.conf
# Add local server
server 192.168.5.104
# Set access restrict
restrict 192.168.5.0 mask 255.255.254.0 notrap
# Set logfile
logfile /var/log/ntpservice.log
- Start NTP server
$ ntpd
- Verify NTP Server
$ ntpq -p