Article Title: Configure NTP in Linux to set up a local time server. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Configure NTP to set up a local time server
NTP is a protocol used to synchronize time between the system an
NTP-based multi-server time synchronization script
The server updates the time every hour. The synchronization server of the server synchronizes the time every five seconds. The synchronization server does not interact with the Internet, and the synchronization time is performed by the server. Therefore, ensure that the time of each synchronization server is consistent.
# Vi ud_ntp.sh
#! /Bin/bashTime = 5Ip (){Echo "192.168.48.114"Echo "192.168.28.233
Time synchronization is achieved through the NTP service.1: First build local Yum source URL (http://www.cnblogs.com/zj21/p/6223462.html)2: First install NTP service[email protected] ~]# Yum install ntp-y3: Modify the NTP configuration file# For more information on this file, see the "the Man pages"# ntp.conf (5), NTP_
1: Experimental environmentPrerequisites: Virtual machine environment, Windows client, shutdown firewall, linux Server shut down firewall, turn off SELinux.Cent OS:NTP Server ip:192.168.80.134/255.255.255.0Windows 7: Client ip:192.168.80.133/255.255.255.02:NTP Service Installation① generally comes with:1 grep NTP 2 ntp-4.2. 6p5-1. el6.centos.x86_643 fontpackages-
1, the installation of NTP service, to use time synchronization, then the server and the client need to use the following command to install the NTP package[Email protected]5201351yuminstall ntp-y2, if only as a client, the configuration can be very simple, edit the/etc/ntp.conf file, comment out the default of the following default 4 lines together with our time
The computer's system time is generated by a fixed oscillation frequency in the quartz crystal oscillator circuit in the computer.Date View current time zoneVim/etc/sysconfig/clock Modifying the time zone configuration fileZone= "America/new_york"#改为Zone= "Asia/shanghai"cover/etc/localtimecp-a/usr/share/zoneinfo/asia/shanghai/etc/localtimeCp:overwrite '/etc/localtime '? YDate 111317402016 Modify system timeHwclock-w synchronizing system time to hardware timeRpm-qa |grep
The time for all nodes must be synchronized, which is usually achieved by configuring the NTP server. If the user already has a time server in the network, then all nodes can point to it, otherwise you can pick a node from the cluster as the time server and let the other nodes synchronize with it. These two methods are shown below:(1) If a time server is already in the corporate networkExample: 192.168.11.10 is an
Tags: Linux NTP linux system NTP service1, installationNTPyum-y Install NTP (Direct Yum installation can be)2 , Modify The configuration of the ntp.conf1 ) vim/etc/ntp.conf① Configuration method One: only allow The client of the 192.168.100.0 network segment to synchronize timein the restrict default Kod nomodify notrap nopeer noquery (indicates default deny
Install and configure the NTP server in CentOSIntroduction
See wikipedia: Network Time Protocol (NTP) is a networking protocol for clock synchronization between computer systems over packet-switched, variable-latency data networks.Refer to Baidu Encyclopedia: NTP is a Network Time Protocol used to synchronize the Time of each computer in the Network.
Environment2
recently, found that the company domain member user time and the domain server time is not synchronized, to achieve: 1, the domain member server and intra-domain client and domain NTP server synchronization, 2, the domain NTP server as the client and the external NTP server synchronization ( configure Windows Time service to use an external time source ).Workarou
1 . The importance of time synchronizationTime synchronization can ensure the normal operation of the business, such as data synchronization, such as the batch execution of the system planning task. such as2. Check your system time .[[Email protected] ~]# Date3. System modification Time# date-s "2015-10-17 19:00:00"After the modification, remember to execute the CLOCK-W, write the system time to the CMOS, to ensure that the restart will take effect.4 . Setup of hardware time View: [[email protec
When installing Oracle 11g RAC, we need to configure the NTP service. In the case of a virtual machine, there are many ways to configure the clock synchronization method, either using VMware's own clock synchronization feature or directly using a local node as a time server. This article describes the clock server that configures the NTP method directly.
1, view the two-node hosts configuration
[Root@node
Linux time synchronization configuration.I. Using the Ntpdate command1.1 When the server can link to the extranet# CRONTAB-EAdd a line:*/1 * * * * ntpdate 210.72.145.44210.72.145.44 is the China National Time Service Center server address, so that the machine every 1 minutes can be synchronized with the National Time Service center.Note: When using the Ntpdate command, the NTPD service must be turned off, otherwise the NTP socket is used, exiting erro
();
*}
*
*/
Public class sntpclient
{
Private Static final string tag = "sntpclient ";
Private Static final int reference_time_offset = 16;
Private Static final int originate_time_offset = 24;
Private Static final int receive_time_offset = 32;
Private Static final int transmit_time_offset = 40;
Private Static final int ntp_packet_size = 48;
Private Static final int ntp_port = 123;
Private Static final int ntp_mode_client = 3;
Private Static final int ntp_version = 3;
// Number of seconds be
About NTPNTP ( networktime Protocol UTC 0.1ms In most places on the Internet its accuracy can be achieved 1-50ms . NTP The server is using NTP the protocol provides time synchronization services. NTP Server InstallationView system comes with NTP[Email protected] ~]# Rpm-qa ntpntp-4.2.6p5-5.el6.centos.x86_64If
[Excellent] NTP clock synchronization creation process
The two host host1 and host2 are used for clock synchronization. host1 is the clock source, host2 is the client, OS Version: v5.1 actions on host1: 1. Edit the/etc/hosts file and add the host2 address. 2. edit/etc/NTP. CONF file, add a line peer 127.127
NTP Service time synchronizationTurn off firewalls and SELinux or turn on all firewall services[Email protected] ~]# firewall-cmd --set-default-zone=trusted NTP service[[email protected] ~]# yum–y install NTP[email protected] ~]# cat /etc/ntp. conf //Modify configuration file
//define native sync time w
Work needs ah, need to transplant open source NTP to arm926 platform.(1) Now Source: http://www.ntp.org/downloads.htmlI'm under version: 4.2.8P1(2) Unzip and place it where you like.(3) Read the Readme file carefully and follow the steps it says to start compiling(4) configuration./configure, you can add some parameters, I use a script to do this process:#!/bin/bash. /configure cc=/opt/sourcery-arm-201203/bin/arm-none-linux-gnueabi-gcc cppflags=-i/hom
1. Extract the source code to /USR/LOCAL/SRCCd/usr/local/srcTar-zxvf/root/ntp-4.2.4p7.tar.gz2. View readme/instll filecdntp-4.2.4p7/Moreinstall3.generate The makefile file, specifying that it will be installed in the/USR/LOCAL/NTP directory in the future. If not specified, it is installed to the/usr/local directory by default . ./configure--help|more Viewing the parameters available at compile time./configu
Test machine: CentOS 6.5ipaddr=192.168.1.229Rqm-qa |grep NTPNot installed, first installedYum-y Intall NTPConfiguration file LocationVim/etc/ntp.confDriftfile/var/lib/ntp/drift #这个代表上层服务与本机主板时钟之间时间差别记录在这个文件里Restrict #管理权限Restrict default kod nomodify notrap nopeer noquery #拒绝IPV4用户restrict-6 default kod nomodify notrap nopeer noquery #拒绝IPV6用户The parameters are as follows:Ignore: Turn off all NTP Online Ser
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.