Centos 5.5 NTP server configuration

Source: Internet
Author: User

1.NTP Server Configuration

1,NTP, Network Time protocol, is a network protocol used to synchronize computer clocks, which allows the computer to synchronize time with other servers or clock sources. The transmission of time information uses the UDP protocol 123 port.

2, installation of NTP service

Yum-y Install NTP// use the yum command to download the installation package from the Internet, provided that the host can connect to the network.


650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6E/73/wKiom1V9BtzDVShSAAIuH3FGd1U080.jpg "style=" float: none; "title=" Centos-2015-06-14-10-01-10.png "alt=" Wkiom1v9btzdvshsaaiuh3fgd1u080.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6E/6F/wKioL1V9CIfCvuFBAAI2v5atpeg310.jpg "style=" float: none; "title=" Centos-2015-06-14-10-02-08.png "alt=" Wkiol1v9cifcvufbaai2v5atpeg310.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6E/6F/wKioL1V9CIeAt6VgAAK35QvoXso056.jpg "style=" float: none; "title=" Centos-2015-06-14-10-02-29.png "alt=" Wkiol1v9cieat6vgaak35qvoxso056.jpg "/>

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/6E/6F/wKioL1V9CP2hqSiSAAJDHT1MFj8934.jpg "title=" Centos-2015-06-14-10-02-46.png "alt=" Wkiol1v9cp2hqsisaajdht1mfj8934.jpg "/>

Complete the download and install!

3. Restart the NTP service

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6E/73/wKiom1V9B5fgwQKvAACHU7OvCtQ478.jpg "title=" Centos-2015-06-14-10-10-10.png "alt=" Wkiom1v9b5fgwqkvaachu7ovctq478.jpg "/>

Restart success!

4, NTP service its start, suspend related commands

Service NTPD Start # startup

Service NTPD Stop # stops

Service ntpd Restart # restart

Service NTPD Reload # Reload

Service NTPD starts # view current boot status

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/6E/73/wKiom1V9CHDS2VQtAAFTkUIDw7o007.jpg "title=" Centos-2015-06-14-10-36-05.png "alt=" Wkiom1v9chds2vqtaaftkuidw7o007.jpg "/>

5 . set the operating level of the NTP service

Chkconfig ntpd on # set to run automatically on system run level 2,3,4,5

Chkconfig ntpd off # set to not autorun on system runlevel 2,3,4,5

Chkconfig ntpd--level on # set to run automatically at system run level 3,5

Chkconfg ntpd--level off # set to not run automatically at system run level 3,5

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6E/6F/wKioL1V9CmigUk3xAADen6_sW9M343.jpg "title=" centos-2015-06-14-10-38-18-copy. png "alt=" wkiol1v9cmiguk3xaaden6_sw9m343.jpg "/>

use chkconfig ntpd–list to view the operating level of the NTP service

6. Use the NTSYSV command to set the NTP service to start automatically on the next boot

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6E/73/wKiom1V9CPDBxGu0AAFIBbFcKPw196.jpg "title=" Centos-2015-06-14-10-29-01.png "alt=" Wkiom1v9cpdbxgu0aafibbfckpw196.jpg "/>

Locate ntpd, press space to set it to boot, and then press Tab to select OK to enter

7, configuration of the NTP service

7.1 The main configuration file for NTP service in /etc/ntp.conf

the third line is the default rejection so So the NTP client operates, and the Kod feature is turned on

Line Nineth allows local users so action

Line 13th Specifies the client

Line 14th and line 20 Specify the Internet NTP Server Address

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6E/73/wKiom1V9CUjj_XWAAANTTJBB-cw049.jpg "title=" CENTOS-2015-06-14-11-07-01-copy. png "alt=" wkiom1v9cujj_xwaaanttjbb-cw049.jpg "/>

line 33rd cannot be compared to the upper layer defined before this line When the NTP server communicates, the local time is the standard time

Line 34th Specifies the local layer of NTP server

Line 41st Specifies NTP Server log file location

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6E/6F/wKioL1V9C0HyyqhtAAOUtGG9aiQ943.jpg "title=" Centos-2015-06-14-11-45-14.png "alt=" Wkiol1v9c0hyyqhtaaoutgg9aiq943.jpg "/>

7.2 Modify The/etc/ntp/step-tickers file to add the following ( when the NTP service starts, it automatically takes time with the upper NTP service of the record in the file )

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/6E/6F/wKioL1V9C4Cx2DllAABw9XJFpoI892.jpg "title=" Centos-2015-06-14-12-02-58.png "alt=" Wkiol1v9c4cx2dllaabw9xjfpoi892.jpg "/>

7.3 Modify /etc/sysconfig/ntpd file, will Sync_hwclock=yes, allow BIOS to synchronize with system time

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/6E/6F/wKioL1V9C72Smel8AADtkCD1RWk900.jpg "title=" Centos-2015-06-14-12-04-27.png "alt=" Wkiol1v9c72smel8aadtkcd1rwk900.jpg "/>

7.4 Restarting the NTP server

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/6E/73/wKiom1V9ClOj8RXLAADHmi32weM213.jpg "title=" centos-2015-06-14-12-09-56-copy. png "alt=" wkiom1v9cloj8rxlaadhmi32wem213.jpg "/>

7.4 The last time the computer synchronizes with the upper NTP server by ntpstat command

the first line for time proofing NTP Server

second row local host and Upper Time difference of NTP server

Third line next sync time

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6E/70/wKioL1V9DJuiZevIAACrjioKmnw896.jpg "title=" Centos-2015-06-14-12-17-24.png "alt=" Wkiol1v9djuizeviaacrjiokmnw896.jpg "/>

8. Complete the configuration of the NTP server


This article from "ZJC" blog, reproduced please contact the author!

Centos 5.5 NTP server configuration

Related Article

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.