Installing & Configuring NTP on RHEL or CentOS

| 0 Comments | 0 TrackBacks

The script below was used to configure the RHEL or CentOS host to act as an NTP client to the CentOS NTP pool. In summary, the script below does the following:

  1. Install ntp
  2. Setup the ntp.conf configuration file
  3. Enable ntp to startup upon bootup
  4. Startup ntp
  5. Execute ntpq to verify the box is acting as a ntp client



yum install ntp -y

cp /etc/ntp.conf /etc/ntp.conf.orig




cat > /etc/ntp.conf << EOF
restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery
restrict 127.0.0.1
restrict -6 ::1

server 0.centos.pool.ntp.org
server 1.centos.pool.ntp.org
server 2.centos.pool.ntp.org

fudge 127.127.1.0 stratum 10
driftfile /var/lib/ntp/drift
keys /etc/ntp/keys
EOF

chkconfig ntpd on
service ntpd restart
ntpq -p


No TrackBacks

TrackBack URL: http://baldwinsung.com/cgi-bin/mt-tb.cgi/134

Leave a comment

Recent Entries

Minimal Post Configuration for CentOS
service yum-updatesd stop chkconfig yum-updatesd off service avahi-daemon stop chkconfig avahi-daemon off service bluetooth stop chkconfig bluetooth off service…
15 Central Park West
The Real Deal details the buyers of the wonderful apartments at 15 CPW. http://therealdeal.com/newyork/articles/a-unit-by-unit-look-at-15-cpw http://s3.amazonaws.com/trd_three/images/17726/CPWBinder.pdf…
AJAX Toolkits
Prototype http://prototypejs.org Scriptaculous http://script.aculo.us Dojo http://dojotoolkit.org YUI http://developer.yahoo.com Ext http://extjs.com Sarissa http://sarissa.sf.net Mochikit http://mochikit.com jQuery http://jquery.com MooTools http://mootools.net GWT…