Online Learning Academy - LearnAcad.com

... Sharing Knowledge

  • Increase font size
  • Default font size
  • Decrease font size
Home Submit Your Articles and HowTos

How to configure time server on CENTOS?

E-mail Print PDF

How to configure time server on CENTOS?

yum install ntpd

Go to ntp.conf file

Vi /etc/ntp.conf

Define the pool as I live in Pakistan so I have to define the Asia pool in conf file like this

http://www.pool.ntp.org/en/

server 0.asia.pool.ntp.org

server 1.asia.pool.ntp.org

server 2.asia.pool.ntp.org

server 3.asia.pool.ntp.org

after that Add asia pool in conf file like that

Restrict 0.asia.pool.ntp.org mask 255.255.255.255 nomodify notrap no query
restrict 1.asia.pool.ntp.org mask 255.255.255.255 nomodify notrap no query
restrict 2.asia.pool.ntp.org mask 255.255.255.255 nomodify notrap no query

Restrict 3.asia.pool.ntp.org mask 255.255.255.255 nomodify notrap no query

 

That’s all

 

Starting NTP

ntpdate -b pool.ntp.org

 chkconfig --level 2345 ntpd on
/etc/init.d/ntpd restart

 chkconfig --list ntpd

 To see if the service started successfully, you should check the system log file.

grep ntpd /var/log/messages

output

galaxy ntpd[1110]: ntpd 4.2.0a@1.1196-r Thu Feb 23 04:42:00 EST 2006 (1)

Client Configuration

Go on client pc of linux

vi /etc/ntp.conf

server 192.168.1.1 **************** I have ip 203.175.75…….
restrict default ignore
restrict 127.0.0.1
restrict 192.168.1.1 mask 255.255.255.255 nomodify notrap noquery
driftfile /var/lib/ntp/drift

 give the server of Your time Server

 ntpdate 192.168.1.1 I have 203.175.75….

automatically time is synchronies with the time server

 Thanks

Kashif shah

Last Updated on Wednesday, 15 February 2012 06:44  

Our valuable member kashifshah has been with us since Monday, 21 March 2011.

Show Other Articles Of This Author

Add comment


Security code
Refresh

Follow us on Twitter

Main Menu

Linux

Islam

Windows

Interview Questions

Database

Internet

Cisco

Entertainment

Networking

Graduate Courses

Psychology

Feed Burner

Subscribe to Welcome to Online Learning Academy by Email

Enter your email address:

Delivered by FeedBurner


Google Groups
Subscribe to LearnAcad
Email:
Visit this group

Login Form

JoomImages for JoomGallery

There are no images available in the gallery.

JoomCategories for JoomGallery

No categories found