Set the Linux system time server-Linux Enterprise Application-Linux server application information in the LAN. The following is a detailed description.
I. Overview:
This article aims to briefly introduce how to set a Linux time server on the LAN to synchronize with the
Linux server time verification 1. View server time drift [root @ localhost ~] # Ntpdate-dpool.ntp.org3Jun12: 23: 02 ntpdate [23209]: ntpdate4.2.2p1@1.1570-oThuJan2202: 50: 41UTC2009 (1) Looking... linux server time verification 1.
If multiple CentOS servers run the same service and have high requirements on time accuracy, the time of multiple servers must be consistent. The simplest thing is that each server uses ntpdate to synchronize the time of the same network time
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
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
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
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
46) Turkmenistan
13) Hong Kong 30) Mongolia 47) United Arab Emirates
14) India 31) Myanmar (Burma) 48) Uzbekistan
15) Indonesia 32) Nepal 49) Vietnam
16) Iran 33) Oman 50) Yemen
17) Iraq 34) Pakistan
#9 输入9,选择中国
Please select one of the following time zone regions.
1) east China - Beijing, Guangdong, Shanghai, etc.
2) Heilongjiang (except Mohe), Jilin
3) central China - Sichuan, Yunnan,
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 '
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.