设为首页 - 加入收藏 ASP站长网(Aspzz.Cn)- 科技、建站、经验、云计算、5G、大数据,站长网!
热搜: 创业者 手机 数据
当前位置: 首页 > 服务器 > 系统 > 正文

Linux操作系统的时间服务器配置方法

发布时间:2018-04-22 12:23 所属栏目:52 来源:IT专家网论坛
导读:时间服务器的IP为:192.168.10.1 1). # rpm -ivh ntp-4.1.2-4.EL3.1.i386.rpm 2). # vi /etc/ntp.conf 注释一行 restrict default ignore 加入一行 restrict 192.168.10.0 mask 255.255.255.0 notrust nomodify notrap 3). # vi /etc/ntp/step-tickers 加入

时间服务器的IP为:192.168.10.1 1). # rpm -ivh ntp-4.1.2-4.EL3.1.i386.rpm 2). # vi /etc/ntp.conf 注释一行 restrict default ignore 加入一行 restrict 192.168.10.0 mask 255.255.255.0 notrust nomodify notrap 3). # vi /etc/ntp/step-tickers 加入一行 pool

时间服务器的IP为:192.168.10.1

1). # rpm -ivh ntp-4.1.2-4.EL3.1.i386.rpm

2). # vi /etc/ntp.conf

注释一行

restrict default ignore

加入一行

restrict 192.168.10.0 mask 255.255.255.0 notrust nomodify notrap

3). # vi /etc/ntp/step-tickers

加入一行

pool.ntp.org

这样每次ntpd启动时,会自动连接该国际标准时间服务器;

4). # service ntpd start

5). # netstat -an |grep 123

确保该端口以udp方式开放

时间客户端配置(192.168.10.2)

a. # ntpdate 192.168.10.2

应该显示同步成功

b. # crond -e

加入

0-59/10 * * * * /usr/sbin/ntpdate 192.168.10.1

表示每隔10分钟同步一次时间。

(编辑:ASP站长网)

    网友评论
    推荐文章
      热点阅读