Install NTP

From MiOS
(Difference between revisions)
Jump to: navigation, search
m
Line 3: Line 3:
 
'''HOWTO  install NTP on your Vera.'''
 
'''HOWTO  install NTP on your Vera.'''
  
==Prerequisits==
+
==Prerequisites==
 
* Vera 2 hardware
 
* Vera 2 hardware
 
* Root acces to your OpenWRT
 
* Root acces to your OpenWRT
  
==Intro==
+
==Introduction==
 
Heres a short manual on how to install NTP to your Vera 2. Out of the box your new Vera 2 does not use NTP (Network Time Protocol) for its timer updates, but uses the less commonly used Rdate. However, NTP support and personalisation can be added after market. Here is how:
 
Heres a short manual on how to install NTP to your Vera 2. Out of the box your new Vera 2 does not use NTP (Network Time Protocol) for its timer updates, but uses the less commonly used Rdate. However, NTP support and personalisation can be added after market. Here is how:
  
 
==Instructions==
 
==Instructions==
1. Gain ssh acces to your vera2 (root) and use the password that is provided on the bottom of your vera2. More info on how to is here:[http://wiki.micasaverde.com/index.php/Logon_Vera_SSH]<br />
+
01.Gain ssh access to your vera2 (root) and use the password that is provided on the bottom of your vera2. More info on how to can be found here:[http://wiki.micasaverde.com/index.php/Logon_Vera_SSH]<br />
2. Then run the following commands:<br />
+
02. Then run the following commands:<br />
  
''opkg update''
+
''opkg update''
  
''opkg install ntpd''
+
''opkg install ntpd''
  
''/etc/init.d/ntpd enable''
+
''/etc/init.d/ntpd enable''
  
''/etc/init.d/ntpd start''
+
''/etc/init.d/ntpd start''
  
3. To edit the ntp.conf file without using and editor like VI use the echo command like this;<br />
+
03. To edit the ntp.conf file without using and editor like VI use the echo command like this;<br />
''echo "server "your servers ip or dns name" prefer" >> /etc/ntp.conf''
+
''echo "server "your servers ip or dns name" prefer" >> /etc/ntp.conf''
  
4. (important to remove ONLY the quotes before and after your and name) To view the current entries in your ntp.conf type:<br />
+
04. (important to remove ONLY the quotes before and after your and name) To view the current entries in your ntp.conf type:<br />
''cat /etc/ntp.conf''
+
''cat /etc/ntp.conf''
  
5. To remove obsolete IP's or server names from the ntp.conf files type:<br />
+
05. To remove obsolete IP's or server names from the ntp.conf files type:<br />
''cat /etc/ntp.conf | grep -v "lines to remove" > /etc/ntp.conf.new''
+
''cat /etc/ntp.conf | grep -v "lines to remove" > /etc/ntp.conf.new''
  
6. Check the newly created file using this command:<br />
+
06. Check the newly created file using this command:<br />
''cat /etc/ntp.conf.new''
+
''cat /etc/ntp.conf.new''
  
7. Overwrite the existing file if all checks out using:<br />
+
07. Overwrite the existing file if all checks out using:<br />
''mv /etc/ntp.conf.new /etc/ntp.conf''
+
''mv /etc/ntp.conf.new /etc/ntp.conf''
  
8. Double check the newly created ntp.conf file by typing:<br />
+
08. Double check the newly created ntp.conf file by typing:<br />
''cat /etc/ntp.conf''
+
''cat /etc/ntp.conf''
  
9. Restart the NTP service<br />
+
09. Restart the NTP service<br />
''/etc/init.d/ntpd restart''
+
''/etc/init.d/ntpd restart''
  
 
10. OR reboot/powercycle your vera
 
10. OR reboot/powercycle your vera

Revision as of 18:52, 20 May 2011

HOWTO install NTP on your Vera.

Contents

Prerequisites

  • Vera 2 hardware
  • Root acces to your OpenWRT

Introduction

Heres a short manual on how to install NTP to your Vera 2. Out of the box your new Vera 2 does not use NTP (Network Time Protocol) for its timer updates, but uses the less commonly used Rdate. However, NTP support and personalisation can be added after market. Here is how:

Instructions

01.Gain ssh access to your vera2 (root) and use the password that is provided on the bottom of your vera2. More info on how to can be found here:[1]
02. Then run the following commands:

opkg update
opkg install ntpd
/etc/init.d/ntpd enable
/etc/init.d/ntpd start

03. To edit the ntp.conf file without using and editor like VI use the echo command like this;

echo "server "your servers ip or dns name" prefer" >> /etc/ntp.conf

04. (important to remove ONLY the quotes before and after your and name) To view the current entries in your ntp.conf type:

cat /etc/ntp.conf

05. To remove obsolete IP's or server names from the ntp.conf files type:

cat /etc/ntp.conf | grep -v "lines to remove" > /etc/ntp.conf.new

06. Check the newly created file using this command:

cat /etc/ntp.conf.new

07. Overwrite the existing file if all checks out using:

mv /etc/ntp.conf.new /etc/ntp.conf

08. Double check the newly created ntp.conf file by typing:

cat /etc/ntp.conf

09. Restart the NTP service

/etc/init.d/ntpd restart

10. OR reboot/powercycle your vera

References

please find more info here: http://forum.micasaverde.com/index.php?topic=5591.0
For logging on to your Vera using SSH read this [2]

Personal tools