Linux Build local time server
Pre-Experiment Description:
Lab Machine: VMware 10
Experimental system: CentOS6.6
Experimental purpose: To make all CentOS systems on VMware the same time, convenient to do cluster experiment;
#
1, compile and install NTP (on the machine you want to do time server) I this machine IP: 172.16.249.135
# Install the GCC compiler
Yum Install Gcc-y
# Download Packages
wget http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-4.2.6p4.tar.gz
# Unzip Package
Tar XF ntp-4.2.6p4.tar.gz
# Enter the extracted directory to prepare the installation
CD NTP-4.2.6P4
# Detect compiled installation environment
./configure--PREFIX=/USR/LOCAL/NTP--enable-all-clocks--enable-parse-clocks
# installation
Make && make install
2. Configure the NTP server
# Modify the NFP configuration file
Vim/etc/ntp.conf
Comment on the line,
# Restrict default Kod nomodify notrap nopeer noquery
Restrict default nomodify
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/58/2A/wKiom1SqgriTE-1GAAB6QlncmR4835.jpg "title=" 2015-01-05_202459.png "alt=" Wkiom1sqgrite-1gaab6qlncmr4835.jpg "/>
3. Start the NTP service;
#/usr/local/ntp/bin/ntpd-c/etc/ntp.conf-p/tmp/ntpd.pid
And then...
And then you wait, like, 15 minutes or so,
Use commands on other virtual machines after a period of time
# ntpdate 172.16.249.135 can synchronize time;
1, where the IP is the IP as the time server
2, recommended more than 20 minutes in sync, otherwise it will prompt "No server suitable for synchronization found" this error;
#####################
In some cases, you may wait 15 minutes after the update, or will prompt the above error;
At this point, you add the following two lines to the/etc/ntp.conf file, casually find a place to add in, waiting for 5 minutes; OK;
Server 127.127.1.0
Fudge 127.127.1.0 Stratum 8
Linux build local NTP time server