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
Centos7系统、Hadoop集群上部署ntp服务器相关推荐
- 在阿里云Serverless K8S集群上部署Spark任务并连接OSS(详细步骤)
在阿里云ASK集群上部署Spark任务并连接OSS 简介 ASK是阿里云的一个产品,属于Serverless Kubernetes 集群,这次实验是要在ASK集群上运行Spark计算任务(以WordC ...
- 在Linux集群上部署Spark之前准备
在Linux集群上部署Spark Spark安装部署比较简单, 用户可以登录其官方网站(http://spark.apache.org/downloads.html) 下载Spark最新版本或历史版本 ...
- Hadoop集群上使用JNI,调用资源文件
hadoop是基于java的数据计算平台,引入第三方库,例如C语言实现的开发包将会大大增强数据分析的效率和能力. 通常在是用一些工具的时候都要用到一些配置文件.资源文件等.接下来,借一个例子来说明ha ...
- 在Kubernetes集群上部署高可用Harbor镜像仓库
这里主要介绍使用kubectl部署Harbor镜像仓库到Kubernetes集群中. 使用Helm部署,参考: https://my.oschina.net/u/2306127/blog/181969 ...
- 如何在tomcat下应用部署日志_如何在kubernete集群上部署springboot应用
1.打包springboot镜像 2.在kubernete上发布镜像 3.测试 在之前的文章中,我讲了使用kubeadm从0到1搭建kubernete集群,今天我们来聊一下如何在这套k8s集群上部署s ...
- 在Kubernetes集群上部署和管理JFrog Artifactory
JFrog Artifactory是一个artifacts仓库管理平台,它支持所有的主流打包格式.构建工具和持续集成(CI)服务器.它将所有二进制内容保存在一个单一位置并提供一个接口,这使得用户在整个 ...
- 华为云Centos7搭建hadoop集群二:yum源替换,ssh免密处理,hadoop用户sudo
华为云Centos7搭建hadoop集群二:yum源替换,ssh免密处理,hadoop用户sudo 新建hadoop用户并设置密码,密码不要设置为简单的123456等,我这里已经创建过了hadoop用 ...
- k8s和harbor的集成_在Kubernetes集群上部署高可用Harbor镜像仓库
在Kubernetes集群上部署高可用Harbor镜像仓库 一.Kubernetes上的高可用Harbor方案 首先,我可以肯定给出一个回答:Harbor支持在Kubernetes部署.只不过Harb ...
- Hadoop系列一:Hadoop集群分布式部署
1.环境准备 VirtualBox虚拟机上分布部署三套Ubuntu15.10操作系统(Linux 64位),命名为Ubuntu_Hadoop(用户名hp).Ubuntu_C(用户名c).Ubuntu_ ...
最新文章
- Java Web 项目配置 环境搭建 如何安装jdk jre
- 暑假集训8.10-网络流套树剖套线段树
- 步进电机正反转实验_电工基础:帮你学会电机正反转双重互锁控制
- python源代码不需要编译成什么-python需要编译么
- 华为诺亚方舟实验室主任李航:神经符号处理开启自然语言处理新篇章
- 错误代码1500什么意思_啊早安打工人是什么梗???
- 数字孪生营销_如何通过数字营销增加您的自由职业收入
- 涵盖各种编程语言的深度学习库整理大全!
- java.rmi.server.port_java.rmi.server.ExportException: internal error: ObjID already in use报错处理...
- android 字符串转字节数组,java – 在Android中将字节数组转换为Charsequence
- tensorflow分类的loss函数_tensorflow中loss函数
- bzoj 3361: [Usaco2004 Jan]培根距离
- Leetcode-714. 买卖股票的最佳时机含手续费
- Vue3路由,VueX3,Vue3生命周期函数
- 解决eWebEditor上传图片提示:请选择一个有效的文件,支持的格式有(GIF|JPG|JPEG|BMP|PNG)!
- 工程经济作业1答案_国开电大工程经济与管理阶段作业1答案
- 计算机培训有假期吗,教师假期计算机培训心得体会
- Ubuntu上安装R和rstudio-server
- mac 修改本地数据库密码 忘记密码
- SonarQube安装以及结合idea使用详细步骤