linux hadoop本地集群时间同步
来源:互联网 发布:提醒软件reminder 编辑:程序博客网 时间:2024/06/15 22:11
1. 查看时间和日期
命令 : "date"、"date -R"
2.设置时间和日期
例如:将系统日期设定成2009年11月3日的命令
命令 : "date -s 11/03/2009"
将系统时间设定成下午5点55分55秒的命令
命令 : "date -s 17:55:55"
3. 将当前时间和日期写入BIOS,避免重启后失效
命令 : "hwclock -w"
4、安装NTP:
yum install ntp
配置时间源(需要能够联网的机器,如无可以不设置,已集群中某一台主机server本地时间也可)
vi /etc/ntp.conf
server 210.72.145.44
server ntp.api.bz
server 2.centos.pool.ntp.org
配置对客户端(例如172.16.0.0/24的网段机器)提供NTP服务
# vi /etc/ntp.conf
restrict 192.168.10.101 mask 255.255.255.0 nomodify notrap
配置NTP Server的层数提供本地服务
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 2
启动或停止时间服务
# service ntpd start
# service ntpd stop
# service ntpd restart
验证ntp服务已经运行
pgrep ntpd
5、更新本服务器的时间(如果设置了web时间服务器,没有不需要)
ntpdate -u 210.72.145.44
配置iptable规则允许客户端访问本机NTP Sever
vi /etc/sysconfig/iptables
增加一行(NTP Server使用UDP 123端口)
-A INPUT -m state --state NEW -m udp -p udp --dport 123 -j ACCEPT
重启iptables
service iptables restart
6、其他主机同步时间
ntpd 192.168.10.101(时间服务器)
ntpdate IP地址(主机的。时间服务器)
7、设置开机时自动运行时间服务
chkconfig ntpd on
命令 : "date"、"date -R"
2.设置时间和日期
例如:将系统日期设定成2009年11月3日的命令
命令 : "date -s 11/03/2009"
将系统时间设定成下午5点55分55秒的命令
命令 : "date -s 17:55:55"
3. 将当前时间和日期写入BIOS,避免重启后失效
命令 : "hwclock -w"
4、安装NTP:
yum install ntp
配置时间源(需要能够联网的机器,如无可以不设置,已集群中某一台主机server本地时间也可)
vi /etc/ntp.conf
server 210.72.145.44
server ntp.api.bz
server 2.centos.pool.ntp.org
配置对客户端(例如172.16.0.0/24的网段机器)提供NTP服务
# vi /etc/ntp.conf
restrict 192.168.10.101 mask 255.255.255.0 nomodify notrap
配置NTP Server的层数提供本地服务
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 2
启动或停止时间服务
# service ntpd start
# service ntpd stop
# service ntpd restart
验证ntp服务已经运行
pgrep ntpd
5、更新本服务器的时间(如果设置了web时间服务器,没有不需要)
ntpdate -u 210.72.145.44
配置iptable规则允许客户端访问本机NTP Sever
vi /etc/sysconfig/iptables
增加一行(NTP Server使用UDP 123端口)
-A INPUT -m state --state NEW -m udp -p udp --dport 123 -j ACCEPT
重启iptables
service iptables restart
6、其他主机同步时间
ntpd 192.168.10.101(时间服务器)
ntpdate IP地址(主机的。时间服务器)
7、设置开机时自动运行时间服务
chkconfig ntpd on
0 0
- linux hadoop本地集群时间同步
- hadoop集群时间同步
- hadoop集群中的时间同步
- hadoop集群 NTP时间同步
- hadoop在linux系统下的集群时间同步
- Hadoop在linux系统下的集群时间同步
- linux集群时间同步
- Linux集群时间同步
- linux集群时间同步
- linux集群时间同步
- linux集群时间同步
- linux集群时间同步
- Hadoop集群服务器的时间同步
- linux集群时间同步搭建
- Linux下集群时间同步
- Linux集群时间同步设置
- linux集群服务器时间同步
- linux集群时间同步,ntpd、ntpdate
- css画一个三角形
- ToggleButton(开关按钮)
- sql server中,N''表示什么意思?
- 智能指针与memmove同时使用,造成程序崩溃
- RxJava处理网络连接失败和timer()、interval()、delay()之间的区别
- linux hadoop本地集群时间同步
- StringProblem(for lab)
- Android学习之 adb被占用解决办法
- Kafka性能测试方法及Benchmark报告
- ScratchView:一步步打造万能的 Android 刮奖效果控件
- 欢迎使用CSDN-markdown编辑器
- TCP/IP详解,卷1:协议,第六章:ICMP,Internet控制报文协议
- 浅谈最短路径Floyed算法(c)
- 富文本编辑器UEditor <div>自动转换成<p>标签解决方法