日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > windows >内容正文

windows

Centos7系统、Hadoop集群上部署ntp服务器

發布時間:2025/3/16 windows 15 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Centos7系统、Hadoop集群上部署ntp服务器 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

集群情況:

三臺機器分別:

master:180.201.163.46

slave1:180.201.156.76
slave2:180.201.130.17

網關:255.255.192.0

在slave1配置ntpserver,在master和slave2上配置ntpclient。

1、檢查ntp軟件包是否安裝
# rpm -qa | grep ntp
ntp-4.2.4p8-3.el6.centos.x86_64
# yum -y install ntp --如果沒有安裝需要安裝ntp

2、修改slave1上的ntp配置文件(ntpserver)
# vi /etc/ntp.conf,如下

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 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 127.0.0.1 restrict ::1# Hosts on local network are less restricted. restrict 180.201.0.0 mask 255.255.192.0 nomodify notrap# Use public servers from the pool.ntp.org project. # Please consider joining the pool (http://www.pool.ntp.org/join.html).server 210.72.145.44 iburst prefer server 202.112.10.36 iburst server 59.124.196.83 iburstrestrict 210.72.145.44 modify notrap noquery restrict 202.112.10.36 modify notrap noquery restrict 59.124.196.83 modify notrap noqueryserver 127.127.1.0 fudge 127.127.1.0 stratum 10#broadcast 192.168.1.255 autokey # broadcast server #broadcastclient # broadcast client #broadcast 224.0.1.1 autokey # multicast server #multicastclient 224.0.1.1 # multicast client #manycastserver 239.255.254.254 # manycast server #manycastclient 239.255.254.254 autokey # manycast client# Enable public key cryptography. #cryptoincludefile /etc/ntp/crypto/pw# Key file containing the keys and key identifiers used when operating # with symmetric key cryptography. keys /etc/ntp/keys# Specify the key identifiers which are trusted. #trustedkey 4 8 42# Specify the key identifier to use with the ntpdc utility. #requestkey 8# Specify the key identifier to use with the ntpq utility. #controlkey 8# Enable writing of statistics records. #statistics clockstats cryptostats loopstats peerstats# Disable the monitoring facility to prevent amplification attacks using ntpdc # monlist command when default restrict does not include the noquery flag. See # CVE-2013-5211 for more details. # Note: Monitoring will not be disabled with the limited restriction flag. disable monitor

介紹請見

3、修改master和slave2上的ntp配置文件(ntpclient)
# vi /etc/ntp.conf,如下

# 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 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 127.0.0.1 restrict ::1# Hosts on local network are less restricted. #restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap# Use public servers from the pool.ntp.org project. # Please consider joining the pool (http://www.pool.ntp.org/join.html).server slave1 iburst restrict slave1 mask nomodify notrap noqueryserver 127.127.1.0 fudge 127.127.1.0 stratum 10#broadcast 192.168.1.255 autokey # broadcast server #broadcastclient # broadcast client #broadcast 224.0.1.1 autokey # multicast server #multicastclient 224.0.1.1 # multicast client #manycastserver 239.255.254.254 # manycast server #manycastclient 239.255.254.254 autokey # manycast client# Enable public key cryptography. #cryptoincludefile /etc/ntp/crypto/pw# Key file containing the keys and key identifiers used when operating # with symmetric key cryptography. keys /etc/ntp/keys# Specify the key identifiers which are trusted. #trustedkey 4 8 42# Specify the key identifier to use with the ntpdc utility. #requestkey 8# Specify the key identifier to use with the ntpq utility. #controlkey 8# Enable writing of statistics records. #statistics clockstats cryptostats loopstats peerstats# Disable the monitoring facility to prevent amplification attacks using ntpdc # monlist command when default restrict does not include the noquery flag. See # CVE-2013-5211 for more details. # Note: Monitoring will not be disabled with the limited restriction flag. disable monitor

介紹如下:

4、啟動

# service ntpd start -- 啟動ntp
# chkconfig ntpd on --開機啟動
# service ntpd status --查看狀態

# ntpstat查看同步情況,如下則表示啟動成功

synchronised to NTP server (85.199.214.101) at stratum 2 time correct to within 155 mspolling server every 64 s

?

與50位技術專家面對面20年技術見證,附贈技術全景圖

總結

以上是生活随笔為你收集整理的Centos7系统、Hadoop集群上部署ntp服务器的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。