Projekt

Allgemein

Profil

Setup chronyd » Historie » Version 1

Jeremias Keihsler, 24.10.2023 19:04

1 1 Jeremias Keihsler
h1. Setup chronyd
2
3
h2. Requirements
4
5
To install chronyd you will need the following:
6
* a installed and supported operating system (e.g. CentOS 8.x)
7
* root-access
8
* a fast internet connection
9
10
h2. Preliminary Note
11
12
This procedure is based on a documentation taken from:
13
* https://www.redhat.com/sysadmin/chrony-time-services-linux
14
* https://www.ibm.com/docs/en/ess/6.1.0_ent?topic=guide-how-set-up-chronyd-time-server
15
16
h2. Install 
17
18
<pre><code class="bash">
19
yum install chronyd
20
</code></pre>
21
22
h2. Start/Enable Service
23
24
<pre><code class="bash">
25
systemctl enable chronyd
26
systemctl start chronyd
27
</code></pre>
28
29
When you are not running the CentOS Firewall yet, then start it:
30
31
<pre><code class="shell">
32
systemctl enable firewalld
33
systemctl start firewalld
34
</code></pre>
35
36
add chronyd to the firewall if you are going to serve ntp
37
38
<pre><code class="shell">
39
firewall-cmd --add-service=ntp --permanent
40
firewall-cmd --reload
41
</code></pre>
42
43
h2. config
44
45
Edit the @/etc/chrony.conf@ file.
46
47
<pre>
48
# add offset to source ... this shouldn't be necessary at all!
49
pool 2.fedora.pool.ntp.org iburst offset 7200
50
# add one specific ntp-server
51
server 10.11.12.14 iburst prefer
52
53
#allow clients to connect from
54
allow 10.12.100.0/24
55
56
#set local stratum in case no external source is available
57
#set it as low as possible to give clients a choice on better sources
58
local stratum 4
59
</pre>
60
61
h2. Status
62
63
<pre><code class="shell">
64
chronyc sources
65
chronyc burst 4/4
66
</code></pre>