Configuration of the CentOS6.5 NTP service
The first requirements are as follows:
There are three servers, respectively: hadoop01.shiluo.com 192.168.239.133
Hadoop02.shiluo.com 192.168.239.134
Hadoop03.shiluo.com 192.168.239.135
Now to synchronize the time of the other two machines with the time of hadoop01.shiluo.com this machine, all of the following steps are tested effectively, and there are problems to communicate.
1. Configure hadoop01.shiluo.com
1> Use Rpm-qa | grep NTP to see if the machine has the service installed without installing the Yum-y install NTP ntpdate command.
2> installation is complete, run vi/etc/ntp.conf command edit the file, modify the contents of the screenshot as follows, the machine is different, may be a little bit the same, please follow their own machine to configure the actual situation
3> run vi/etc/sysconfig/ntpd Command Edit content: Add the following: Sync--hwclock=yes
4> Run service ntpd start the NTP service, run Chkconfig ntpd on is the next boot automatically start the service, hadoop01.shiluo.com this machine all configuration has been completed
2. Configure hadoop02.shiluo.com
1> Run the Crontab-e edit file and add the following: Indicates that every 10 minutes sync time
0-59/10 * * * * * */usr/sbin/ntpdate hadoop01.shiluo.com (Note: This configures its own host name or IP)
The 2>hadoop03.shiluo.com configuration is the same as the hadoop02.shiluo.com step
Summary: In the Hadoop cluster, time synchronization is very important, all the machines must be synchronized time, please be sure to pay attention to ... Also, modify a table
The time order of the machine is as follows: Date-s 2017/3/25 17:23:33