-
互联网安全法,互联网净网行动
-
”净网2020”落实好维护网络安全责任
-
关于端午节放假通知-宇众网络
-
宇众网络春节放假通知
-
关于公司收款银行账户变更通知函-宇众网络
-
关于网上有人冒充我公司名义进行诈骗的公告。
-
关于端午节放假通知,节日放假,但是我们业务不“放假”-宇众网络
-
工信部进一步加强未备案网站管理工作的通知-宇众网络
-
关于东莞市宇众网络科技有限公司香港数据中心(香港机房)路由优化通知
-
宇众网络庆祝五·一劳动节快乐
-
东莞东城机房网络升级通知
-
临近过年,互联网IDC贵圈也有被骗的,请认准宇众网络公司官方联系方式
-
我司已获得ISP/ICP/IDC三证资格,更好的为客户服务
-
关于浙江金华高防机房网络线路切割通知
-
工信部近日下发关于进一步规范域名备案工作的通知
ntp服务器如何进行配置和部署呢?
互联网时代,不同类型服务器作用有所差异,其中NTP服务器是用来使计算机时间同步化的一种协议,它可以使计算机对其服务器或时钟源做同步化,它可以提供高精准度的时间校正,且可介由加密确认的方式来防止恶毒的协议攻击,那么ntp服务器要怎么去配置和部署呢?
ntp服务器如何进行配置和部署呢?
一.NTP介绍
NTP(Network Time Protocol,网络时间协议)是用来使网络中的各个计算机时间同步的一种协议。它的用途是把计算机的时钟同步到世界协调时UTC,其精度在局域网内可达0.1ms,在互联网上绝大多数的地方其精度可以达到1-50ms,NTP服务器就是利用NTP协议提供时间同步服务的。
二.NTP服务器安装
1.查看本机系统版本
cat /etc/redhat-release
2.查看本机NTP软件包
rpm -qa ntp
三.NTP服务器配置
1.备份ntp服务器配置文件
cp /etc/ntp.conf /etc/ntp.conf.bak
ll /etc/ntp.conf*
2.精简优化配置文件
egrep -v "^$|#" /etc/ntp.conf.bak >/etc/ntp.conf
3.编辑配置文件
vim /etc/ntp.conf
配置文件文本:
driftfile /var/lib/ntp/drift
restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery
restrict 127.0.0.1
restrict -6 ::1
允许内网其他机器同步时间
restrict 172.16.1.0 mask 255.255.255.0 nomodify notr
#server 0.centos.pool.ntp.org iburst
#server 1.centos.pool.ntp.org iburst
#server 2.centos.pool.ntp.org iburst
#server 3.centos.pool.ntp.org iburst
定义使用的上游 ntp服务器,将原来的注释
server ntp1.aliyun.com
server time1.aliyun.com
允许上层时间服务器主动修改本机时间
restrict time1.aliyun.com nomodify notrap noquery
restrict ntp1.aliyun.com nomodify notrap noquery
外部时间服务器不可用时,以本地时间作为时间服务
server 127.127.1.0
fudge 127.127.1.0 stratum 10
includefile /etc/ntp/crypto/pw
keys /etc/ntp/keys
四.启动NTP服务器
Centos6: /etc/init.d/ntpd start centos7: systemctl start ntpd
ntpq -p 显示节点列表
五.客户端时间同步测试
ntpdate 10.0.0.111(ntp服务器)
租用服务器www.yuzhongidc.com宇众网络