Ben's notes

Linux, Unix, network, radio...

User Tools

Site Tools


compile_ntp_on_centos7

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
compile_ntp_on_centos7 [2017/06/01 11:46] admincompile_ntp_on_centos7 [2017/06/01 12:25] – [Leapfile] admin
Line 25: Line 25:
   * Extract NTPd sources:<code># tar zxf ntp-4.2.8p10.tar.gz</code>   * Extract NTPd sources:<code># tar zxf ntp-4.2.8p10.tar.gz</code>
   * Configure:<code># cd ntp-4.2.8p10   * Configure:<code># cd ntp-4.2.8p10
-# ./configure --enable-linuxcaps --docdir=/usr/share/doc/ntp-4.2.8p9+# ./configure --enable-linuxcaps --docdir=/usr/share/doc/ntp-4.2.8p10
 </code> </code>
   * Compile:<code># make</code>   * Compile:<code># make</code>
Line 57: Line 57:
  
 ====Install NTPd==== ====Install NTPd====
-  * Install NTPd:<code># cd ntp-4.2.8p9+  * Install NTPd:<code># cd ntp-4.2.8p10
 # make install # make install
 </code> </code>
Line 64: Line 64:
   * Start NTPd:<code># /usr/local/bin/ntpd -g -u ntp:ntp</code>   * Start NTPd:<code># /usr/local/bin/ntpd -g -u ntp:ntp</code>
   * Show version: <code># ntpd --version   * Show version: <code># ntpd --version
-ntpd 4.2.8p9@1.3265-o Tue Nov 22 19:49:05 UTC 2016 (1)+ntpd 4.2.8p10@1.3728-o Thu Jun  1 12:37:34 UTC 2017 (1)
 </code> </code>
 ====Leapfile==== ====Leapfile====
 Make sure your server can reach time.nist.gov over FTP. Make sure your server can reach time.nist.gov over FTP.
 +
 +use Digest::SHA qw(sha1_hex);
 +use File::Copy qw(move);
 +use File::Fetch;
 +use Getopt::Long qw(:config auto_help no_ignore_case bundling);
 +use Sys::Syslog;
 +
 +
   * Schedule retrieval of leapfile using the ''update-leap'' script. For example put the script below in /etc/cron.weekly/leap.sh<code>   * Schedule retrieval of leapfile using the ''update-leap'' script. For example put the script below in /etc/cron.weekly/leap.sh<code>
 #!/bin/bash #!/bin/bash
Line 83: Line 91:
   systemctl start ntpd   systemctl start ntpd
 fi fi
- 
 </code> </code>
 ====SystemD service==== ====SystemD service====
compile_ntp_on_centos7.txt · Last modified: 2021/10/09 15:14 by 127.0.0.1