Size: 2139
Comment:
|
Size: 2151
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 92: | Line 92: |
* timeconfig # set HW clock to UTC * /etc/rc.d/rc.ntpd stop * ntpdate pt.pool.ntp.org * /etc/rc.d/rc.ntpd start |
{{{#!highlight sh timeconfig # set HW clock to UTC /etc/rc.d/rc.ntpd stop ntpdate pt.pool.ntp.org /etc/rc.d/rc.ntpd start }}} |
NTP
NTP is a TCP/IP protocol for synchronizing time over a network.
Slackware
Update clock
Run the command as superuser:
Toggle line numbers
1 ntpdate pool.ntp.org
2 sudo ntpdate pool.ntp.org
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
Toggle line numbers
1 ntpdate -q pt.pool.ntp.org # offset in seconds
2 ntpq -pn
CentOS
Ubuntu / Debian
FreeBSD 9.0
Run the command:
Toggle line numbers
1 ntpdate pool.ntp.org
Check the UTC date:
Toggle line numbers
1 date -u
Edit the file /etc/rc.conf:
Toggle line numbers
1 ntpd_enabled="YES"
Start and check the NTPD service status:
Toggle line numbers
1 /etc/rc.d/ntpd start
2 /etc/rc.d/ntpd status
Sync summer time Slackware
Toggle line numbers
1 timeconfig # set HW clock to UTC
2 /etc/rc.d/rc.ntpd stop
3 ntpdate pt.pool.ntp.org
4 /etc/rc.d/rc.ntpd start
Windows
- net start w32time
- w32tm /config /manualpeerlist:pt.pool.ntp.org
- w32tm /resync /force