Difference between revisions of "Package:Ntp"

m (hw clock info from gentoo)
m (Removed irritating white spaces between different sections.)
 
(4 intermediate revisions by 2 users not shown)
Line 4: Line 4:
 
|Homepage=http://www.ntp.org/
 
|Homepage=http://www.ntp.org/
 
}}
 
}}
 
 
=== Installation ===
 
=== Installation ===
 +
To install the NTP client and server, run the following command:
 
{{console|body=
 
{{console|body=
 
###i## emerge net-misc/ntp
 
###i## emerge net-misc/ntp
 
}}
 
}}
 
 
=== Configuration ===
 
=== Configuration ===
 
==== Client ====
 
==== Client ====
 +
The ntp-client command immediately synchronizes your clock, and has separate ntp sync settings from the daemon:
  
===== Hardware Clock =====
+
{{file|name=/etc/conf.d/ntp-client|lang=|desc=setting ntp-client upstream servers|body=
To write your NTP sync time to the hardware at shutdown, and read hw clock at start.
+
NTPCLIENT_OPTS="-s -b -u \
 
+
0.pool.ntp.org 1.pool.ntp.org \
{{console|body=
+
2.pool.ntp.org 3.pool.ntp.org"
###i## echo 'clock_hctosys="YES"' >> /etc/conf.d/hwclock
+
###i## echo 'clock_hctosys="YES"' >> /etc/conf.d/hwclock
+
###i## rc-service hwclock restart
+
###i## rc-update add hwclock boot
+
 
}}
 
}}
 
 
==== Server ====
 
==== Server ====
 +
The ntpd server is also an ntp-client of upstream servers.  Ntpd continuously, and gradually synchronizes the local clock.
  
 +
{{file|name=/etc/ntp.conf|lang=|desc=setting ntpd upstream servers|body=
 +
# Pools for Gentoo users
 +
server 0.pool.ntp.org
 +
server 1.pool.ntp.org
 +
server 2.pool.ntp.org
 +
server 3.pool.ntp.org
 +
}}
 
=== Runtime ===
 
=== Runtime ===
 +
If you are interested only in synchronizing your local clock against servers, then only add {{c|ntp-client}} to your list of services to start at boot:
 +
{{console|body=
 +
###i## rc-updated add ntp-client
 +
}}
 +
After adding the {{c|ntp-client}} service to the {{c|default}} runlevel, the service can be started by executing the {{c|rc}} command as root:
 
{{console|body=
 
{{console|body=
###i## rc-update add ntpd
 
###i## rc-update add ntp-client
 
 
###i## rc
 
###i## rc
 +
##g##* ##!g##Setting the clock via the NTP client 'ntpdate' ...  ##bl##[##!bl## ##g##OK##!g## ##bl##]##!bl##
 
}}
 
}}
 +
{{note|Executing the above command normally takes several seconds}}
  
 +
If you are instead interested in running an NTP server, add {{c|ntpd}} to your list of services to execute at boot:
 +
{{console|body=
 +
###i## rc-update add ntpd
 +
}}
 +
{{note|{{c|ntpd}} serves as both a client and a server}}
 +
==== Hardware Clock ====
 +
To write your NTP sync time to the hardware at shutdown, and read hw clock at start.
 +
 +
{{console|body=
 +
###i## echo 'clock_hctosys="YES"' >> /etc/conf.d/hwclock
 +
###i## echo 'clock_systohc="YES"' >> /etc/conf.d/hwclock
 +
###i## rc-service hwclock restart
 +
###i## rc-update add hwclock boot
 +
}}
 +
=== External Resources ===
 +
http://keetweej.vanheusden.com/query_ntp.php
 
{{EbuildFooter}}
 
{{EbuildFooter}}

Latest revision as of 16:06, June 21, 2015

net-misc/ntp


Source Repository:Repository:Gentoo Portage Tree

http://www.ntp.org/

Summary: Network Time Protocol suite/programs

Use Flags

openntpd
Allow ntp to be installed alongside openntpd
parse-clocks
Add support for PARSE clocks
samba
Provide support for Samba's signing daemon (needed for Active Directory domain controllers)

News

Drobbins

IP Space Migration Continues

All Funtoo user containers in the 8.28 IP space will be moving into our new IP space (172.97) over the next few days. If you have DNS set up -- be sure to watch your container and update to the new IP! container.host.funtoo.org DNS will be updated after the move.
2015-08-27 by Drobbins
Drobbins

Funtoo Hosting IP Move

Funtoo user containers with IPs in the 72.18.x.x range will be gradually migrating to new IP addresses this week. If you have DNS entries for your containers, please be aware that your DNS will need to be updated.
2015-08-11 by Drobbins
Drobbins

New ARM Stages

New ARM Stages, built with a new toolchain, are now hitting mirrors. Existing ARM users should re-install using these stages (dated Aug 3, 2015 or later,) rather than upgrade using emerge.
2015-08-06 by Drobbins
More...

Ntp

Tip

We welcome improvements to this page. To edit this page, Create a Funtoo account. Then log in and then click here to edit this page. See our editing guidelines to becoming a wiki-editing pro.

Installation

To install the NTP client and server, run the following command:

# emerge net-misc/ntp

Configuration

Client

The ntp-client command immediately synchronizes your clock, and has separate ntp sync settings from the daemon:

/etc/conf.d/ntp-client - setting ntp-client upstream servers
NTPCLIENT_OPTS="-s -b -u \
	0.pool.ntp.org 1.pool.ntp.org \
	2.pool.ntp.org 3.pool.ntp.org"

Server

The ntpd server is also an ntp-client of upstream servers. Ntpd continuously, and gradually synchronizes the local clock.

/etc/ntp.conf - setting ntpd upstream servers
# Pools for Gentoo users
server 0.pool.ntp.org
server 1.pool.ntp.org
server 2.pool.ntp.org
server 3.pool.ntp.org

Runtime

If you are interested only in synchronizing your local clock against servers, then only add ntp-client to your list of services to start at boot:

# rc-updated add ntp-client

After adding the ntp-client service to the default runlevel, the service can be started by executing the rc command as root:

# rc
* Setting the clock via the NTP client 'ntpdate' ...   [ OK ]
Note

Executing the above command normally takes several seconds

If you are instead interested in running an NTP server, add ntpd to your list of services to execute at boot:

# rc-update add ntpd
Note

ntpd serves as both a client and a server

Hardware Clock

To write your NTP sync time to the hardware at shutdown, and read hw clock at start.

# echo 'clock_hctosys="YES"' >> /etc/conf.d/hwclock
# echo 'clock_systohc="YES"' >> /etc/conf.d/hwclock
# rc-service hwclock restart
# rc-update add hwclock boot

External Resources

http://keetweej.vanheusden.com/query_ntp.php