examples: update configuration examples
This commit is contained in:
parent
ddcc28f726
commit
46a178cf48
2 changed files with 29 additions and 25 deletions
|
@ -1,46 +1,40 @@
|
||||||
# Use public servers from the pool.ntp.org project.
|
# Use public servers from the pool.ntp.org project.
|
||||||
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
|
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
|
||||||
server 0.pool.ntp.org iburst
|
pool pool.ntp.org iburst
|
||||||
server 1.pool.ntp.org iburst
|
|
||||||
server 2.pool.ntp.org iburst
|
|
||||||
server 3.pool.ntp.org iburst
|
|
||||||
|
|
||||||
# Ignore stratum in source selection.
|
|
||||||
stratumweight 0
|
|
||||||
|
|
||||||
# Record the rate at which the system clock gains/losses time.
|
# Record the rate at which the system clock gains/losses time.
|
||||||
driftfile /var/lib/chrony/drift
|
driftfile /var/lib/chrony/drift
|
||||||
|
|
||||||
# Enable kernel RTC synchronization.
|
|
||||||
rtcsync
|
|
||||||
|
|
||||||
# In first three updates step the system clock instead of slew
|
# In first three updates step the system clock instead of slew
|
||||||
# if the adjustment is larger than 10 seconds.
|
# if the adjustment is larger than 10 seconds.
|
||||||
makestep 10 3
|
makestep 10 3
|
||||||
|
|
||||||
|
# Enable kernel synchronization of the real-time clock (RTC).
|
||||||
|
rtcsync
|
||||||
|
|
||||||
# Allow NTP client access from local network.
|
# Allow NTP client access from local network.
|
||||||
#allow 192.168/16
|
#allow 192.168/16
|
||||||
|
|
||||||
# Listen for commands only on localhost.
|
|
||||||
bindcmdaddress 127.0.0.1
|
|
||||||
bindcmdaddress ::1
|
|
||||||
|
|
||||||
# Serve time even if not synchronized to any NTP server.
|
# Serve time even if not synchronized to any NTP server.
|
||||||
#local stratum 10
|
#local stratum 10
|
||||||
|
|
||||||
|
# Specify file containing keys for NTP and command authentication.
|
||||||
keyfile /etc/chrony.keys
|
keyfile /etc/chrony.keys
|
||||||
|
|
||||||
# Specify the key used as password for chronyc.
|
# Specify key number for command authentication.
|
||||||
commandkey 1
|
commandkey 1
|
||||||
|
|
||||||
# Generate command key if missing.
|
# Generate new command key on start if missing.
|
||||||
generatecommandkey
|
generatecommandkey
|
||||||
|
|
||||||
# Disable logging of client accesses.
|
# Disable logging of client accesses.
|
||||||
noclientlog
|
noclientlog
|
||||||
|
|
||||||
# Send a message to syslog if a clock adjustment is larger than 0.5 seconds.
|
# Send message to syslog when clock adjustment is larger than 0.5 seconds.
|
||||||
logchange 0.5
|
logchange 0.5
|
||||||
|
|
||||||
|
# Specify directory for log files.
|
||||||
logdir /var/log/chrony
|
logdir /var/log/chrony
|
||||||
|
|
||||||
|
# Select which information is logged.
|
||||||
#log measurements statistics tracking
|
#log measurements statistics tracking
|
||||||
|
|
|
@ -43,25 +43,29 @@
|
||||||
# you can access at http://support.ntp.org/bin/view/Servers/WebHome or
|
# you can access at http://support.ntp.org/bin/view/Servers/WebHome or
|
||||||
# you can use servers from the pool.ntp.org project.
|
# you can use servers from the pool.ntp.org project.
|
||||||
|
|
||||||
! server 0.pool.ntp.org iburst
|
! server foo.example.net iburst
|
||||||
! server 1.pool.ntp.org iburst
|
! server bar.example.net iburst
|
||||||
! server 2.pool.ntp.org iburst
|
! server baz.example.net iburst
|
||||||
|
|
||||||
|
! pool pool.ntp.org iburst
|
||||||
|
|
||||||
# However, for dial-up use you probably want these instead. The word
|
# However, for dial-up use you probably want these instead. The word
|
||||||
# 'offline' means that the server is not visible at boot time. Use
|
# 'offline' means that the server is not visible at boot time. Use
|
||||||
# chronyc's 'online' command to tell chronyd that these servers have
|
# chronyc's 'online' command to tell chronyd that these servers have
|
||||||
# become visible after you go on-line.
|
# become visible after you go on-line.
|
||||||
|
|
||||||
! server 0.pool.ntp.org offline
|
! server foo.example.net offline
|
||||||
! server 1.pool.ntp.org offline
|
! server bar.example.net offline
|
||||||
! server 2.pool.ntp.org offline
|
! server baz.example.net offline
|
||||||
|
|
||||||
|
! pool pool.ntp.org offline
|
||||||
|
|
||||||
# You may want to specify NTP 'peers' instead. If you run a network
|
# You may want to specify NTP 'peers' instead. If you run a network
|
||||||
# with a lot of computers and want several computers running chrony to
|
# with a lot of computers and want several computers running chrony to
|
||||||
# have the 'front-line' interface to the public NTP servers, you can
|
# have the 'front-line' interface to the public NTP servers, you can
|
||||||
# 'peer' these machines together to increase robustness.
|
# 'peer' these machines together to increase robustness.
|
||||||
|
|
||||||
! peer ntp0.my-company.com
|
! peer foo.example.net
|
||||||
|
|
||||||
# There are other options to the 'server' and 'peer' directives that you
|
# There are other options to the 'server' and 'peer' directives that you
|
||||||
# might want to use. For example, you can ignore measurements whose
|
# might want to use. For example, you can ignore measurements whose
|
||||||
|
@ -107,6 +111,7 @@ keyfile /etc/chrony.keys
|
||||||
commandkey 1
|
commandkey 1
|
||||||
|
|
||||||
# With this directive a random password will be generated automatically.
|
# With this directive a random password will be generated automatically.
|
||||||
|
|
||||||
generatecommandkey
|
generatecommandkey
|
||||||
|
|
||||||
# chronyd can save the measurement history for the servers to files when
|
# chronyd can save the measurement history for the servers to files when
|
||||||
|
@ -233,13 +238,18 @@ generatecommandkey
|
||||||
# several people, you need to set up a mailing list or sendmail alias
|
# several people, you need to set up a mailing list or sendmail alias
|
||||||
# for them and use the address of that.)
|
# for them and use the address of that.)
|
||||||
|
|
||||||
! mailonchange wibble@foobar.org 0.5
|
! mailonchange wibble@foo.example.net 0.5
|
||||||
|
|
||||||
#######################################################################
|
#######################################################################
|
||||||
### COMMAND ACCESS
|
### COMMAND ACCESS
|
||||||
# The program chronyc is used to show the current operation of chronyd
|
# The program chronyc is used to show the current operation of chronyd
|
||||||
# and to change parts of its configuration whilst it is running.
|
# and to change parts of its configuration whilst it is running.
|
||||||
|
|
||||||
|
# By default chronyd binds to the loopback interface. Uncomment the
|
||||||
|
# following lines to allow receiving command packets from remote hosts.
|
||||||
|
! bindcmdaddress 0.0.0.0
|
||||||
|
! bindcmdaddress ::
|
||||||
|
|
||||||
# Normally, chronyd will only allow connections from chronyc on the same
|
# Normally, chronyd will only allow connections from chronyc on the same
|
||||||
# machine as itself. This is for security. If you have a subnet
|
# machine as itself. This is for security. If you have a subnet
|
||||||
# 192.168.*.* and you want to be able to use chronyc from any machine on
|
# 192.168.*.* and you want to be able to use chronyc from any machine on
|
||||||
|
|
Loading…
Reference in a new issue