NTP 升级6

2022-04-25 00:05:12 浏览数 (1)

成功升级,只是运行用户和组是root,可能会有安全隐患


解决方法二

重编译,并且配置时加入参数 --enable-clockctl

代码语言:javascript复制
[root@h101 ntp-4.2.8p4]# ./configure    --enable-clockctl 
...
...
[root@h101 ntp-4.2.8p4]# echo $?
0
[root@h101 ntp-4.2.8p4]# make 
...
...
[root@h101 ntp-4.2.8p4]# echo $?
0
[root@h101 ntp-4.2.8p4]# make install
[root@h101 ntp-4.2.8p4]# echo $?
0
[root@h101 ntp-4.2.8p4]# 
[root@h101 ntp-4.2.8p4]# ll /usr/local/bin/ntp*
-rwxr-xr-x 1 root root 2633989 Nov 10 10:01 /usr/local/bin/ntpd
-rwxr-xr-x 1 root root  413656 Nov 10 10:01 /usr/local/bin/ntpdate
-rwxr-xr-x 1 root root  859156 Nov 10 10:01 /usr/local/bin/ntpdc
-rwxr-xr-x 1 root root  632477 Nov 10 10:01 /usr/local/bin/ntp-keygen
-rwxr-xr-x 1 root root  911897 Nov 10 10:01 /usr/local/bin/ntpq
-rwxr-xr-x 1 root root  228107 Nov 10 10:01 /usr/local/bin/ntptime
-rwxr-xr-x 1 root root    3567 Nov 10 10:00 /usr/local/bin/ntptrace
-rwxr-xr-x 1 root root    3207 Nov 10 10:00 /usr/local/bin/ntp-wait
[root@h101 ntp-4.2.8p4]# /usr/local/bin/ntpd --help
ntpd - NTP daemon program - Ver. 4.2.8p4
Usage:  ntpd [ -<flag> [<val>] | --<name>[{=| }<val>] ]... 
		[ <server1> ... <serverN> ]
  Flg Arg Option-Name    Description
   -4 no  ipv4           Force IPv4 DNS name resolution
				- prohibits the option 'ipv6'
   -6 no  ipv6           Force IPv6 DNS name resolution
				- prohibits the option 'ipv4'
   -a no  authreq        Require crypto authentication
				- prohibits the option 'authnoreq'
   -A no  authnoreq      Do not require crypto authentication
				- prohibits the option 'authreq'
   -b no  bcastsync      Allow us to sync to broadcast servers
   -c Str configfile     configuration file name
   -d no  debug-level    Increase debug verbosity level
				- may appear multiple times
   -D Num set-debug-level Set the debug verbosity level
				- may appear multiple times
   -f Str driftfile      frequency drift file name
   -g no  panicgate      Allow the first adjustment to be Big
				- may appear multiple times
   -G no  force-step-once Step any initial offset correction.
   -i Str jaildir        Jail directory
   -I Str interface      Listen on an interface name or address
				- may appear multiple times
   -k Str keyfile        path to symmetric keys
   -l Str logfile        path to the log file
   -L no  novirtualips   Do not listen to virtual interfaces
   -n no  nofork         Do not fork
				- prohibits the option 'wait-sync'
   -N no  nice           Run at high priority
   -p Str pidfile        path to the PID file
   -P Num priority       Process priority
   -q no  quit           Set the time and quit
				- prohibits these options:
				saveconfigquit
				wait-sync
   -r Str propagationdelay Broadcast/propagation delay
      Str saveconfigquit Save parsed configuration and quit
				- prohibits these options:
				quit
				wait-sync
   -s Str statsdir       Statistics file location
   -t Str trustedkey     Trusted key number
				- may appear multiple times
   -u Str user           Run as userid (or userid:groupid)
   -U Num updateinterval interval in seconds between scans for new or dropped interfaces
      Str var            make ARG an ntp variable (RW)
				- may appear multiple times
      Str dvar           make ARG an ntp variable (RW|DEF)
				- may appear multiple times
   -w Num wait-sync      Seconds to wait for first clock sync
				- prohibits these options:
				nofork
				quit
				saveconfigquit
   -x no  slew           Slew up to 600 seconds
      opt version        output version information and exit
   -? no  help           display extended usage information and exit
   -! no  more-help      extended usage information passed thru pager

Options are specified by doubled hyphens and their name or by a single
hyphen and the flag character.


The following option preset mechanisms are supported:
 - examining environment variables named NTPD_*

Please send bug reports to:  <http://bugs.ntp.org, bugs@ntp.org>
[root@h101 ntp-4.2.8p4]# 

0 人点赞