Size: 367
Comment:
|
Size: 1988
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
= Update clock in Slackware with NTP = | ## page was renamed from UpdateClockInSlackwareWithNTP = NTP = NTP is a TCP/IP protocol for synchronizing time over a network. == Slackware == === Update clock === |
Line 16: | Line 22: |
Add ntp server * Edit /etc/ntp.conf * add '''server pt.pool.ntp.org''' {{{#!highlight bash server 127.127.1.0 # local clock fudge 127.127.1.0 stratum 10 server pt.pool.ntp.org driftfile /etc/ntp/drift # Don't serve time or stats to anyone else by default (more secure) restrict default noquery nomodify # Trust ourselves. :-) restrict 127.0.0.1 }}} Check the offset in seconds * ntpdate -q pt.pool.ntp.org # offset in seconds * ntpq -pn == CentOS == * 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 == Ubuntu / Debian == * apt-get install ntp * ntpdate -q pt.pool.ntp.org * service ntp stop * ntpdate pt.pool.ntp.org * service ntp start * ntpq -pn == FreeBSD 9.0 == Run the command: * ntpdate pool.ntp.org Check the UTC date: * date -u Edit the file '''/etc/rc.conf''': * ntpd_enabled="YES" Start and check the NTPD service status: * /etc/rc.d/ntpd start * /etc/rc.d/ntpd 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 |
NTP
NTP is a TCP/IP protocol for synchronizing time over a network.
Slackware
Update clock
Run the command as superuser:
- 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
- ntpdate -q pt.pool.ntp.org # offset in seconds
- ntpq -pn
CentOS
- 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
Ubuntu / Debian
- apt-get install ntp
- ntpdate -q pt.pool.ntp.org
- service ntp stop
- ntpdate pt.pool.ntp.org
- service ntp start
- ntpq -pn
FreeBSD 9.0
Run the command:
- ntpdate pool.ntp.org
Check the UTC date:
- date -u
Edit the file /etc/rc.conf:
- ntpd_enabled="YES"
Start and check the NTPD service status:
- /etc/rc.d/ntpd start
- /etc/rc.d/ntpd 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