Oleg Green wrote:

> I need some help to setup TimeServer NTP on Linux RedHat 7.2 run as Time Server.
> Please advise me how to configure "ntpdate service", and other settings.

Not hard. There are two different scenarios:

a) You want to sync one Linux machine's clock with the internet, or
b) You want to sync an entire network with the internet.

Let's start with case a:

First get a few (at least three) public time servers. There is a list around with
lots of public stratum 1 and stratum 2 time servers. My personal favorites are the
servers at USNO and NIST (specific server names ahead).

Now for the configuration, create the file /etc/ntp.conf with the following on it:
---------- /etc/ntp.conf ----------
# NTP servers configuration
# Expected to operate at stratum 2

server tick.usno.navy.mil
server tock.usno.navy.mil
server time-a.nist.gov
server time-b.nist.gov

driftfile /etc/ntp/drift
---------- EOF ----------

Once this is done, make sure the directory /etc/ntp exists. Next, set your system's
clock to "correct time" with:

# ntpdate tick.usno.navy.mil

Make sure you use one of the servers you used on your ntp.conf file. Now, start the
NTP datemon with:

# service ntpd start

and make sure it starts automatically with:

# chkconfig --level 345 ntpd on

Voila! You're sync'ed to the 'net. On to scenario b.

In this case, you start by choosing two servers (one is enough, but two is better)
on your site to act as time servers, and configure these boxes with the same
instructions used in scenario a.

Once you have your time servers working, configure the other machines to use these
servers. Also, configure them to exchange time info among themselves. This will
help you in case the time servers decide to crash at the same time. Your ntp.conf
file should be like the following:

---------- /etc/ntp.conf ----------
# NTP servers configuration
# Expected to operate at stratum 2

server time1.your.domain
server time2.your.domain

# NTP peers configuration

peer srv1.your.domain
peer srv2.your.domain
...

driftfile /etc/ntp/drift
---------- EOF ----------

The peer list should have all servers and workstations running NTP but itself.

In each computer, repeat the ntpdate/service start/chkconfig as shown in scenario
a, and your set. An entire network time sync'ed.

there is a lot more than this to NTP, but this should get you started quickly.

Cheers,

--
Javier Gostling
Ingeniero de Sistemas
Virtualia S.A.
[EMAIL PROTECTED]
Fono: +56 (2) 202-6264 x 130
Fax: +56 (2) 342-8763
Mobil: +56 (9) 824-5236

Av. Kennedy 5757, of 1502
Las Condes
Santiago
Chile





_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to