ntp服务搭建(时间同步器)

搭建ntp服务
准备环境:
服务端 192.168.124.117
客户端 192.168.124.109
服务端配置:
yum install ntp ntpdate -y
备份配置文件
cp /etc/ntp.conf /etc/ntp.conf.bak
编辑配置文件
vim /etc/ntp.conf

在里面  
    将#restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap前面的注释去掉
    再在下面添加一行  server 192.168.124.117(服务端Ip)

ntp服务搭建(时间同步器)

启动服务
service ntpd start

关闭防火墙
systemctl stop firewalld
setenforce 0

客户端配置

下载
yum install ntp ntpdate -y
2.编辑文件
vim /etc/ntp.conf

在里面添加
server 192.168.124.109(客户端Ip)
ntp服务搭建(时间同步器)

关闭防火墙
systemctl stop firewalld
setenforce 0

实现同步

ntpdate 192.168.124.117(服务端ip)

猜你喜欢

转载自blog.51cto.com/14354119/2427880
今日推荐