oracle配置linux系统时间,OracleLinuxNTP时间服务器配置同步方案.docx 4页【NTP时间同步服务器】...

OracleLinuxNTP时间服务器配置同步方案.docx 4页【NTP时间同步服务器】

文章出处:网络

责任编辑:edit007

人气:发表时间:2020-04-23 10:16【大 中 小】

2e8faff749a0b269a8cd5185127c4234.png

OracleLinux NTP时间服务器配置同步方案

? ?目标环境,Oracle linux6,作为内网的NTP时间服务器,局域网内的其他机器与这台服务做时间同步。

2、安装配置

Oracle linux6系统已经自带了NTPD服务,一般默认是安装了的,如果没有安装,先检查下,然后配置好yum仓库,yum方式安装下就OK,具体如下:

# rpm -q ntp

ntp-4.2.4p8-2.el6.x86_64 ? ?// 这表示已安装了,如果没有安装,这是空白。

如果没有安装,我们按照下

# yum install ntp

按上面的安装方式在内网每台服务器上都安装好NTP软件包。

完成后,都需要配置NTP服务为自启动

# chkconfig ntpd on

# chkconfig --list ntpd

ntpd ? ? ? ? ? 0:关闭 1:关闭 2:启用 3:启用 4:启用 5:启用 6:关闭

?

在配置前,先使用ntpdate手动同步下时间,免得本机与外部时间服务器时间差距太大,让ntpd不能正常同步。

# ntpdate -u 6

22 Dec 16:52:38 ntpdate[6400]: adjust time server 6 offset 0.012135 sec

?

配置内网NTP-Server

下面主要是配置内网的NPTD服务器, NTPD服务配置核心就在/etc/ntp.conf文件,配置好了就OK。先上配置文件再说,红色部分是修改部分,注意红色修改部分。

?

# For more information about this file, see the man pages

# ntp.conf(5), ntp_acc(5), ntp_auth(5), ntp_clock(5), ntp_misc(5), ntp_mon(5).

?

driftfile /var/lib/ntp/drift

?

# Permit time synchronization with our time source, but do not

# permit the source to query or modify the service on this system.

restrict default kod nomodify notrap nopeer noquery

restrict -6 default kod nomodify notrap nopeer noquery

?

# Permit all access over the loopback interface. ?This could

# be tightened as well, but to do so would effect some of

# the administrative functions.

restrict

restrict -6 ::1

?

# Hosts on local network are less restricted.

# 允许内网其他机器同步时间

restrict mask nomodify notrap

?

# Use public servers from the project.

# Please consider joining the pool (/join.html).

# 中国这边最活跃的时间服务器 :? HYPERLINK "/zone/cn" /zone/cn

server 4 perfer ? # 中国国家受时中心

server 6 ? ? ? ? ? ? #?1.

server 3 ? ? ? ? ? ? #?0.

?

#broadcast 55 autokey ? ? ? ?# broadcast server

#broadcastclient ? ? ? ? ? ? ? ? ? ? ? ?# broadcast client

#broadcast autokey ? ? ? ? ? ?# multicast server

#multicastclient ? ? ? ? ? ? ?# multicast client

#manycastserver 54 ? ? ? ? # manycast server

#manycastclient 54 autokey # manycast client

?

# allow update time by the upper server?

# 允许上层时间服务器主动修改本机时间

restrict 4 nomodify notrap noquery

restrict 6 nomodify notrap noquery

restrict 3 n

免责声明:文章《OracleLinuxNTP时间服务器配置同步方案.docx 4页【NTP时间同步服务器】》来至网络,文章表达观点不代表本站观点,文章版权属于原作者所有,若有侵权,请联系本站站长处理!

1c16daa4d514ca0b209b346909361e2a.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值