qshinoの日記

Powershell関係と徒然なこと

ntp server and client configurarion

centos7 ntp server

yum -y install ntp

sudo echo <<EOS >> /etc/ntp.conf
restrict 192.168.0.0 mask 255.255.255.0 nomodify notrap
EOS

centos7 ntp client

yum -y install ntp
echo <<EOS >> /etc/ntp.conf
server 192.168.0.1 iburst 
EOS

centos7 ntp start and enable

systemctl start ntpd
systemctl status ntpd

systemctl enable ntpd

systemctl list-unit-files -t service

ntp check

ntpq -p

ref

https://qiita.com/taro0219/items/e3d80029e085730e3516