1、将系统时区改成上海时区
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
2、写个脚本
ntp.cron
#!/bin/bash
/usr/sbin/ntpdate ntp.fudan.edu.cn | logger -t NTP
将该脚本 放到/etc/cron.daily 这个目录中
即可实现每天自动同步时间
1、将系统时区改成上海时区
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
2、写个脚本
ntp.cron
#!/bin/bash
/usr/sbin/ntpdate ntp.fudan.edu.cn | logger -t NTP
将该脚本 放到/etc/cron.daily 这个目录中
即可实现每天自动同步时间