集群时间同步的配置
来源:互联网 发布:淘宝优惠券模板 编辑:程序博客网 时间:2024/06/05 21:32
集群时间同步
时间同步的方式:找一个机器,作为时间服务器,所有的机器与这台集群时间进行定时的同步,比如,每日十分钟,同步一次时间。
配置时间同步:
1)时间服务器配置
(1)检查ntp是否安装
[root@hadoop102桌面]# rpm -qa|grep ntp
ntp-4.2.6p5-10.el6.centos.x86_64
fontpackages-filesystem-1.41-1.1.el6.noarch
ntpdate-4.2.6p5-10.el6.centos.x86_64
(2)修改ntp配置文件
vi /etc/ntp.conf
修改内容如下
a)修改1
#restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap为
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
b)修改2
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为
#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
c)添加3
server 127.127.1.0
fudge 127.127.1.0 stratum 10
3)修改/etc/sysconfig/ntpd文件
vim /etc/sysconfig/ntpd
增加内容如下
SYNC_HWCLOCK=yes
4)重新启动ntpd
[root@hadoop102桌面]#service ntpd status
ntpd已停
[root@hadoop102桌面]#service ntpd start
正在启动ntpd: [确定]
5)执行:
chkconfig ntpd on
2)其他机器配置(必须root用户)
(1)在其他机器配置10分钟与时间服务器同步一次
[root@hadoop103hadoop-2.7.2]#crontab -e
编写脚本
*/10 * * * * /usr/sbin/ntpdate hadoop102
(2)修改任意机器时间
date -s "2015-9-11"
(3)十分钟后查看机器是否与时间服务器同步
date
阅读全文
1 0
- 集群时间同步的配置
- CentOS集群配置时间同步
- ntp配置内网集群时间同步
- Hadoop集群服务器的时间同步
- 分布式系统、集群的时间同步
- linux集群时间同步
- 集群时间同步
- Linux集群时间同步
- linux集群时间同步
- cendos集群时间同步
- 集群时间同步
- linux集群时间同步
- 集群服务器同步时间
- linux集群时间同步
- 集群机器时间同步
- hadoop集群时间同步
- 集群时间同步
- linux集群时间同步
- Docker + Ubuntu 安装 nodejs,redis 生成新镜像
- 后量子密码技术代码即将面世下的骚动,区块链安心了!
- 3.linux/windows下安装redis
- Swift学习笔记(14)——类和结构体
- 我来了,菜鸡来了!
- 集群时间同步的配置
- Popupwindow 适配25版本与简单跟踪
- 负载均衡
- 网络编程
- 基础练习 字母图形
- 递归
- ElasticSearch核心基础之聚合
- ADTF软件介绍
- GBDT:梯度提升决策树