HOWTO Stratum 1 NTP Server Under CentOS 7
Hello everyone,
If anyone is interested, I have created a HOWTO
on running a Motorola GPS receiver connected to a CentOS 7 box via serial port (com1), with 1PPS over DCD.
The trick here is that CentOS 7 uses systemd and setup was a bit different. Anyway, everything works.
The result is a highly accurate NTP server, Stratum 1.
Here is the documentation.
http://www.maximaphysics.com/CentOS_7_GPS_Setup.html
Let me know if something does not look right.
-George, N2FGX
9 thoughts on - HOWTO Stratum 1 NTP Server Under CentOS 7
Am 11.12.2014 um 21:57 schrieb xaos:
Hello George,
thanks for the interesting article.
Mind you one question: why did you replace the NTPd shipping with CentOS
7 by a source compilation? Is the NTPd version provided by CentOS
lacking some important feature for that usecase?
Regards
Alexander
Alexander,
First off, CentOS7 came with cronyd. Which was very annoying because when I tried to remove it, it had 2 prereqs:
anaconda initial-setup
Now, I don’t know why the setup program kept these
2 around. I think CentOS7 needs a bit growing up.
Anyway, I disabled chrony:
systemctl disable time-sync systemctl stop time-sync
Then I installed ntp. However, when I started it it seems that it was not compiled with: –enable-all-clocks
So, I downloaded the latest and re-compiled with:
./configure –with-crypto –enable-all-clocks –enable-step-slew
I built it as per the document and everything looks good
-G
The right thing to do next is to ask for this change upstream, so people can get regular updates and stay secure.
Lucian
+1 agree 100%
‘initial-setup’ is the program that runs on your first boot, and it requires ‘anaconda’. ‘anaconda’ requires the ‘chrony’ package. Services in the default install require a time-sync daemon, and chrony is the default, so this isn’t really unexpected. Once a system is set up, it doesn’t remove the initial-setup package.
That doesn’t seem to be the case. Looking at the NTP spec file, I
see:
%configure \
–sysconfdir=%{_sysconfdir}/ntp/crypto \
–with-openssl-libdir=%{_libdir} \
–without-ntpsnmpd \
–enable-all-clocks –enable-parse-clocks \
–enable-ntp-signd=%{_localstatedir}/run/ntp_signd \
–disable-local-libopts
(check the git.CentOS.org version yourself:
https://git.CentOS.org/blob/rpms!ntp.git/dbacec4466ee70248db634b110bfad8a2b74cd82/SPECS!ntp.spec
)
As far as I can tell, there is literally no reason why you can’t use the packaged ntpd.
If you are having a problem with getting the packaged ntpd working, I
suggest filing a bug against the RHEL package. The package has many patches, perhaps one of them is interfering with detecting your device.
Jonathan,
I would much prefer to run out-of-the box. No question!
BTW, on other machines that I installed CentOS7, chrony, was not there. Neither was anaconda or initial-setup. This was after the install, naturally.
Ok, so maybe this box was unlucky. It was installed the same day as CentOS7 came out. I will re-install, update and see what happens.
Quite often the problem lies between the computer and the chair.
Update to follow…
-George
Then it should just require a time-sync daemon, and not a specific one imho.
regards
Sven
—–BEGIN PGP SIGNATURE—
Perhaps both the ‘chrony’ and ‘ntp’ packages should Provide
‘server(smtp)’ (similar to how sendmail/postfix work with SMTP)? That way anaconda could just require ‘server(ntp)’.
Either way, this isn’t something that would need to be solved in the upstream distribution.
Errr… I meant:
Provide: server(ntp)