Size: 1988
Comment:
|
Size: 2139
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 9: | Line 9: |
* ntpdate pool.ntp.org | {{{#!highlight sh ntpdate pool.ntp.org sudo ntpdate pool.ntp.org }}} |
Line 38: | Line 41: |
Line 40: | Line 42: |
* ntpdate -q pt.pool.ntp.org # offset in seconds * ntpq -pn |
{{{#!highlight sh ntpdate -q pt.pool.ntp.org # offset in seconds ntpq -pn }}} |
Line 44: | Line 48: |
* yum install ntp * service ntpd start * chkconfig ntpd on * service ntpd stop * ntpdate pt.pool.ntp.org # sync clock * service ntpd start * ntpdate -q pt.pool.ntp.org * ntpq -pn |
{{{#!highlight sh yum install ntp service ntpd start chkconfig ntpd on service ntpd stop ntpdate pt.pool.ntp.org # sync clock service ntpd start ntpdate -q pt.pool.ntp.org ntpq -pn }}} |
Line 54: | Line 60: |
* apt-get install ntp * ntpdate -q pt.pool.ntp.org * service ntp stop * ntpdate pt.pool.ntp.org * service ntp start * ntpq -pn |
{{{#!highlight sh apt-get install ntp ntpdate -q pt.pool.ntp.org service ntp stop ntpdate pt.pool.ntp.org service ntp start ntpq -pn }}} |
Line 63: | Line 71: |
* ntpdate pool.ntp.org | {{{#!highlight sh ntpdate pool.ntp.org }}} |
Line 66: | Line 76: |
* date -u | {{{#!highlight sh date -u }}} |
Line 69: | Line 81: |
* ntpd_enabled="YES" | {{{#!highlight sh ntpd_enabled="YES" }}} |
Line 72: | Line 86: |
* /etc/rc.d/ntpd start * /etc/rc.d/ntpd status |
{{{#!highlight sh /etc/rc.d/ntpd start /etc/rc.d/ntpd status }}} |
NTP
NTP is a TCP/IP protocol for synchronizing time over a network.
Slackware
Update clock
Run the command as superuser:
Date and time should be stored in UTC.
Info on slack docs:
Enable the service:
- chmod 755 /etc/rc.d/rc.ntpd
Start the service manually:
- /etc/rc.d/rc.ntpd start
- /etc/rc.d/rc.ntpd status
Add ntp server
- Edit /etc/ntp.conf
add server pt.pool.ntp.org
Check the offset in seconds
CentOS
Ubuntu / Debian
FreeBSD 9.0
Run the command:
1 ntpdate pool.ntp.org
Check the UTC date:
1 date -u
Edit the file /etc/rc.conf:
1 ntpd_enabled="YES"
Start and check the NTPD service status:
Sync summer time Slackware
- timeconfig # set HW clock to UTC
- /etc/rc.d/rc.ntpd stop
- ntpdate pt.pool.ntp.org
- /etc/rc.d/rc.ntpd start
Windows
- net start w32time
- w32tm /config /manualpeerlist:pt.pool.ntp.org
- w32tm /resync /force