NTP时间服务器
yum安装ntp和ntpdate [root@localhost ~]# yum -y install ntp ntpdate 修改配置文件,加入以下两行,其他server#号注释 [root@localhost ~]# vim /etc/ntp.conf server 127.127.1.0 fudge 127.127.1.0 stratum 8 关闭防火墙和selinux [root@localhost ~]#systenctl stop firewalld [root@localhost ~]#vim /etc/sysconfig/selinux 开启服务并做开机自启动 [root@localhost ~]#systemctl start ntpd [root@localhost ~]#systemctl enable ntpd 开启另一个虚拟机,yum安装ntpdate,同步时间 [root@localhost ~]# yum -y install ntpdate [root@localhost ~]# ntpdate 192.168.1.38 26 Dec 04:46:49 ntpdate[2493]: step time server 192.168.1.38 offset 1.941458 sec 做计划任务,每天1分钟同步一次时间 [root@localhost ~