Linux server time verification 1. View server time drift [root @ localhost ~] # Ntpdate-d pool. ntp. org3 Jun 12:23:02 ntpdate [23209]: ntpdate 4.2.2p1@1.1570-o Thu Jan 22 02:50:41 UTC 2009 (1) Looking for host pool.ntp.org and service ntphost found: round (114.80.81.13) rec
Centos7 time synchronization server
It's a bit difficult today. Because of inconsistent server time, many log logs are missing during data synchronization.
So. Let's talk about the time server first.
Start:
Method 1: simple, ef
Encounter a situation, that is, the time between multiple servers is not synchronous, and some are fast slow, this time will need to use the network,Log on to the server, enter the command date can query the server time, need to synchronize the
1. When you execute this command, ntpdate us.pool.ntp.org has an error message. Name Server cannot be used: temporary failure in name resolution 2. solution (add DNS server) VI/etc/resolv. conf Add: nameserver 8.8.4.4 3. Common NTP server addresses and IP addresses in China 2011-09-07 15:06:08210.72.145.44 (IP add
1. Select one of the servers as the benchmark server, which provides the clock service. (1) First determine if NTP exists, and if it does not exist, install it by using the following command: Yum Install NTP (2) Modify the configuration file/etc/ntp.conf in which to insert: Restrict 192.168.20.0 mask 255.255.255.0 nomodify notrap which With restrict control autho
CentOS server cluster automatic synchronization time Method
There was a log that was a http://blog.csdn.net/bhq2010/article/details/8543946 for manual synchronization time
This is because only a part of the LAN in our lab can access the internet. The IP address used by the server cannot access the Internet and cannot
Let me introduce the relevant tutorials
The following commands need to be executed with root permission, or you will be prompted for insufficient permissions
First determine if the server has ntpdate this software:
Which ntpdate if not found, you will need to install a ntpdate.
Use this command under Redhat, CentOS:
The code is as follows
Copy Code
Yum Install-y NTP
Generally a slightly larger project will be deployed to several servers to do the cluster, the same application may be deployed to several servers, while the processing business must keep different servers on the same time, which requires time synchronization between servers. My approach is to:1, select one of the external network open server, with the root user
Because NTP often times out, so I wrote a simple time synchronization server, the client will synchronize the service side of the system time:Service side:#!/usr/local/python27/bin/python#coding:utf-8importtimeimportloggingimportsocketserverimport structfromdaemonizeimportDaemonizeSERVER_HOST= ' 0.0.0.0 ' server_port= 37123BUF_SIZE=1024pid= '/tmp/timeserver.pid '
-3.020089 Secondshint:somelineswereellipsized,uSe-ltoshowinfull. Do the following configuration as a time server:[[email protected] ~]# VIM/ETC/CHRONY.CONF25 # allow NTP Client access from local network.26 allow 192.168.231.0/2427 28 # Serve Time even if not synchronized to a time
Here are two machines rac01 and RAC02, now to keep RAC02 time and rac01 consistent---will be rac01 and RAC02 in sync.1. Manual synchronization Method:Execute on RAC02Service NTPD stop;Ntpdate 189.60.100.11Both machines (RAC01 as SERVER,RAC02 as client) are set to:Date--set= "1/14/2013 11:43" The initial time difference between the two machines is not a matter of
First install NTP:1 Yum Install -y ntpdateThen execute the NTP command:1 time. windows.comOr:1 ntpdate cn.pool.ntp.orgIf you want to be lazy and let the machine automatically calibrate the time, just add the command to cron.1 crontab-e2 * */1 * * */sbin/ntpdate cn.pool.ntp.org #每隔一个小时同步一次Save to exit.
The
Client time in AD domain synchronizes with server
A colleague was late for the meeting, the Moderator of the meeting criticized, the colleague said that according to his computer time is 5 minutes early, and the time of his computer is too inaccurate, so the conference hosted the Information Center, asked me this sad
1. The login machine is viewed using the date command.
2. Execute the following order:
#echo-E "0.asia.pool.ntp.orgn1.asia.pool.ntp.orgn2.asia.pool.ntp.orgn3.asia.pool.ntp.orgn210.72.145.44" >/etc /ntp/step-tickers
#ntpdate-U 0.asia.pool.ntp.org
#echo-E "server 0.asia.pool.ntp.org prefernserver 1.asia.pool.ntp.orgnserver 2.asia.pool.ntp.orgnserver 3. Asia.pool.ntp.orgnserver 210.72.145.44 ">>/etc/ntp.co
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.