Настройка ntpd

Материал из Eugene Paniot Wiki
Перейти к: навигация, поиск

Конфиг

/etc/ntp.conf

restrict default ignore
restrict -6 default ignore

restrict localhost
restrict 127.0.0.1
restrict 127.127.1.0

restrict 0.pool.ntp.org nomodify notrap noquery
restrict 1.pool.ntp.org nomodify notrap noquery
restrict 2.pool.ntp.org nomodify notrap noquery
restrict 3.pool.ntp.org nomodify notrap noquery

server 0.pool.ntp.org iburst burst
server 1.pool.ntp.org iburst burst 
server 2.pool.ntp.org iburst burst 
server 3.pool.ntp.org iburst burst 

server	127.127.1.0
fudge	127.127.1.0 stratum 10	

driftfile /var/lib/ntp/drift
disable auth

Настройка

FreeBSD

/etc/rc.conf

ntpd_enable="YES"
ntpdate_enable="YES"

Centos

chkconfig ntpd on

/etc/sysconfig/ntpdate

...
SYNC_HWCLOCK=yes
chkconfig ntpdate on

<seealso> Смена временной зоны Zoneinfo </seealso>

Solaris

cat /etc/inet/ntp.conf 
restrict default ignore
restrict -6 default ignore

restrict localhost
restrict 127.0.0.1
restrict 127.127.1.0

restrict 172.16.101.1
restrict 172.16.101.2
restrict 172.16.102.1

restrict 172.16.0.0 mask 255.255.0.0 nomodify nopeer notrap

server 172.16.101.1 iburst burst
server 172.16.101.2 iburst burst
server 172.16.102.1 iburst burst

server  127.127.1.0
fudge   127.127.1.0 stratum 10  

driftfile /var/ntp/ntp.drift
disable auth
svcadm restart svc:/network/ntp