方法/步骤分步阅读
1时区的调整,多数都是调整为亚洲上海时区
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
2时间的设置
调整日期
date -s 09/21/18 —–9月21日
调整时间
date -s 17:06:50 —–下午17点6分50秒
时间日期一起调整
date 0921170618.50 ——–9月21日17时6分50秒
3时间的手动同步,与微软时间同步
/usr/sbin/ntpdate
4时间自动同步
crontab -e
*/10 * * * * /usr/sbin/ntpdate >> /tmp/crontab.log
5ntp服务同步,修改/etc/ntp.conf文件,
主服务器设置
server 127.127.1.0
fudge 127.127.1.0 stratum 10
6ntp服务节点服务器设置
vi /etc/ntp.conf
disable monitor
server master
7时间的查看输入:date即可。
unix时间的调整与linux有一些差别,要注意分开出来。