1.问题
yum -y install ntp
将ntpd安装完成后,systemctl enable ntpd
将 ntpd 设置为开机启动。
检查ntpd是否被设置为自动开机启动:
systemctl status ntpd
重启后,看到 ntpd 已经被设置成自动开机启动了。但事实上,在开机后,启动并未成功。
2.解决
引起这个问题常见的原因有可能是系统上安装了一个与 ntpd 相冲突的工具:chrony
。
检查 chronyd 是否被设置为开机自动启动:
systemctl status chronyd
下图可以看到,chronyd 确实被设置为开机自动启动了:
禁止 chronyd 开机启动:
systemctl disable chronyd
FEATURED TAGS
algorithm
algorithmproblem
architecturalpattern
architecture
aws
c#
cachesystem
codis
compile
concurrentcontrol
database
dataformat
datastructure
debug
design
designpattern
distributedsystem
django
docker
domain
engineering
freebsd
git
golang
grafana
hackintosh
hadoop
hardware
hexo
http
hugo
ios
iot
java
javaee
javascript
kafka
kubernetes
linux
linuxcommand
linuxio
lock
macos
markdown
microservices
mysql
nas
network
networkprogramming
nginx
node.js
npm
oop
openwrt
operatingsystem
padavan
performance
programming
prometheus
protobuf
python
redis
router
security
shell
software testing
spring
sql
systemdesign
truenas
ubuntu
vmware
vpn
windows
wmware
wordpress
xml
zookeeper