Linux Upgrade NTPD server-compile and install NTP-4.2.8P9 and configure NTPD server

Source: Internet
Author: User

1. system and software versions

1.1 System Version

CentOS6.5 x86_64

1.2 NTPD software version

Ntp-4.2.8p9.tar.gz

1.3

official: http://support.ntp.org/bin/view/Main/SoftwareDownloads

Reference Documentation: http://www.linuxfromscratch.org/blfs/view/svn/basicnet/ntp.html

2. Installation Prerequisites

2.1 Install dependent packages

[email protected] ~]# Yum install gcc gcc-c++ openssl-devel libstdc++* libcap*


2.2 backing up older versions of configuration files

[Email protected] ~]# cp-ar/etc/ntp/etc/ntp.bak[[email protected] ~]# cp/etc/ntp.conf/etc/ntp.conf.bak[[email Protec Ted] ~]# Cp/etc/init.d/ntpd/etc/init.d/ntpd.bak[[email protected] ~]# cp/etc/sysconfig/ntpd/etc/sysconfig/ntpd.bak[ [Email protected] ~]# Cp/etc/sysconfig/ntpdate/etc/sysconfig/ntpdate.bak

2.3 Uninstalling the yum installed ntpd service

[email protected] ~]# Yum erase NTP ntpdate


3. Compile and install ntp-4.2.8p9

3.1 Creating the /var/lib/ntp directory

[Email protected] ~]# install-v-m710-o ntp-g ntp-d/var/lib/ntp


3.2 Compiling and installing ntpd

[Email protected] ntp-4.2.8p9]#/configure--prefix=/usr--bindir=/usr/sbin--sysconfdir=/etc--enable-linuxcaps-- With-lineeditlibs=readline--docdir=/usr/share/doc/ntp-4.2.8p9--enable-all-clocks--enable-parse-clocks-- Enable-clockctl make && make install

[Email protected] ~]# ntpntpd ntpdate ntpdc ntp-keygen ntpq ntptime ntptrace ntp-wait

4. Create a configuration file

[Email protected] ~]# cp/etc/init.d/ntpd.bak/etc/init.d/ntpd[[email protected] ~]# cp/etc/sysconfig/ntpd.bak/etc/ Sysconfig/ntpd[[email protected] ~]# cp/etc/sysconfig/ntpdate.bak/etc/sysconfig/ntpdate[[email protected] ~]# mv/etc /ntp.bak/etc/ntp[[email protected] ~]# cp/etc/ntp.conf.bak/etc/ntp.conf


5. Configure ntp.conf

Add the following parameters to the /etc/ntp.conf configuration file

Server 127.127.1.0

Fudge 127.127.1.0 Stratum 10

Start the NTPD service

[[Email protected] ~]# service NTPD start


6. Client Configuration

[Email protected] ~]# DATESAT 8 08:08:13 CST 2015


/etc/ntp.conf Add a server-side IP address

Server 10.17.83.106


[[email protected] ~]# ntpq-p remote refID St T when poll reach delay offset jitter============== ================================================================ 10.17.83.106 10.17.82.25 u 3 64 1 0. 628 4279381 0.001

Wait a few minutesfor the ntpd client to automatically synchronize the service-side time

[[email protected] ~]# Datesat 8 08:11:10 CST 2015[[email protected] ~]# datethu Dec 15:28:41 CST 2016


Windows Client Configuration

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/8B/97/wKioL1hSShHS_jrmAAm0ZEPSbho699.png "title=" Picture 1.png "alt=" Wkiol1hsshhs_jrmaam0zepsbho699.png "/>



650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/8B/9B/wKiom1hSSe2S5a9hAAAc-IDXo7I434.png "title=" Picture 2.png "alt=" Wkiom1hsse2s5a9haaac-idxo7i434.png "/>

This article is from the "7414593" blog, please be sure to keep this source http://7424593.blog.51cto.com/7414593/1883058

Linux Upgrade NTPD server-compile and install NTP-4.2.8P9 and configure NTPD server

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.