暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

Linux时间服务器的配置

云自由 2022-10-24
164

#安装时间服务器
yum install ntp -y  

# 配置时间服务器
vi etc/ntp.conf   

restrict 192.168.85.0 mask 255.255.255.0 nomodify notrap
server 127.127.1.0

#启动时间服务器
systemctl start ntpd        


#客户机安装
yum install ntpdate -y

#同步时间服务器的时间
ntpdate -u 主机名        

#定时任务
crontab -e 然后添加相应的任务,wq存盘退出

* * * * * usr/sbin/ntpdate -u d01 >/dev/null 2>&1
#执行某个命令将不会有任何日志输出


文章转载自云自由,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论