Linux and cloud Computing--Phase two: NTP server Setup

Source: Internet
Author: User
Tags chrony

Linux and cloud Computing--the second phase of Linux Server Setup


The first chapter: NTP Server Setup

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M02/84/7C/wKiom1eR3EWj8CJjAAECGMnPQ_I264.jpg-wh_500x0-wm_3 -wmp_4-s_2524553483.jpg "title=" server. jpg "alt=" wkiom1er3ewj8cjjaaecgmnpq_i264.jpg-wh_50 "/>

1.NTP Server (NTPd) Install the NTPD and configure the NTP server to complete the time adjustment.


[1] install the NTPd.

[[email protected] ~]# yum-y install NTP

[Email protected] ~]# vim/etc/ntp.conf

refer to Line 17, add the network segment in line 18th to allow access to your NTP server :

Restrict 192.168.96.0 mask 255.255.255.0 nomodify notrap

# Modifying a synchronized server

#server 0.centos.pool.ntp.org Iburst

#server 1.cen tos.pool.ntp.org Iburst

#server 2.centos.pool.ntp.org Iburst

#server 3.centos.pool.ntp.org Iburst

Server asia.pool.ntp.org Iburst

[Email protected] ~]# systemctl start ntpd

[email protected] ~]# Systemctl enable NTPD  


[2] If the firewall Firewalld is running , Note that the NTP service is released, and NTP uses UDP 123 port for communication.  

[Email protected] ~]# firewall-cmd--add-service=ntp--permanent

Success

[Email protected] ~]# Firewall-cmd--reload

Success


[3] Verify that NTP is working correctly .

[email protected] ~]# N tpq-p

Remote refID St T when poll reach delay offset jitter

==============================================================================

*210-140-66-77.J 133.243.238.163 2 U 33 64 7 209.189 53.766 58.151


2. NTP server (chrony) installs the Chrony and configures the NTP servers to complete the time adjustment. [1] installation Chrony.

[Email protected] ~]# yum-y install Chrony

[Email protected] ~]# vim/etc/chrony.conf

# Third line : Modify the synchronization time of the server  

#server 0.centos.pool.ntp.org Iburst

#server 1.centos.pool.ntp.org Iburst

#server 2.centos.pool.ntp.org Iburst

#server 3.centos.pool.ntp.org Iburst

Server asia.pool.ntp.org Iburst

# Section - Line : Configure the access requests that you intend to allow to receive the network segment

Allow 192.168.96.0/24

[Email protected] ~]# systemctl start chronyd

[email protected] ~]# Systemctl enable Chronyd  


[2] If the firewall Firewalld is running , Note that the NTP service is released, and NTP uses UDP 123 port for communication.  

[Email protected] ~]# firewall-cmd--add-service=ntp--permanent

Success

[Email protected] ~]# Firewall-cmd--reload

Success


[3] Verify the working status .

[Email protected] ~]# CHRONYC sources

Sources = 1

MS NAME/IP address stratum Poll Reach Lastrx Last sample

===============================================================================

^? 210.23.25.77 2 7 98-107ms[ -107ms] +/-193ms

3.NTP Client

[1] CentOS Client synchronization Time .

[Email protected] ~]# ntpdate asia.pool.ntp.org

7 Jul 17:47:40 ntpdate[12683]: Adjust time server 110.75.190.198 offset 0.079993 sec


How to configure date synchronization on Windows7:

Open the lower right corner date and time

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M00/84/7C/wKioL1eR2tbhdW_cAADR9XLTApw509.png-wh_500x0-wm_3 -wmp_4-s_3049411495.png "style=" Float:none; "title=" Picture 1.png "alt=" Wkiol1er2tbhdw_caadr9xltapw509.png-wh_50 "/>


Select Internet time and modify settings

650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M02/84/7C/wKioL1eR2wKCa6PqAABaZwSGKBI509.png-wh_500x0-wm_3 -wmp_4-s_3051308951.png "title=" image 2.png "alt=" Wkiol1er2wkca6pqaabazwsgkbi509.png-wh_50 "/>

Enter the server address you just configured and try to synchronize.


For more video, please click-→http://edu.51cto.com/lesson/id-113651.html

This article is from the "11830455" blog, please be sure to keep this source http://11840455.blog.51cto.com/11830455/1828864

Linux and cloud Computing--Phase two: NTP server Setup

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.