Files
ntpa/INSTALL
T

82 lines
2.2 KiB
Plaintext
Raw Normal View History

2016-03-12 17:05:05 +01:00
FreeBSD
Run as root:
2016-03-11 23:22:40 +01:00
# pkg install mono
2016-03-19 22:55:38 +01:00
# pkg install gtk-sharp20 (only for GUI)
# pkg install libgdiplus (only for graphs)
2016-03-12 17:05:05 +01:00
# pkg install mysql-server
2016-03-11 23:22:40 +01:00
2016-03-19 22:55:38 +01:00
2016-03-12 17:05:05 +01:00
Ubuntu
2016-03-11 23:22:40 +01:00
2016-03-12 17:05:05 +01:00
Run:
2016-03-15 21:08:01 +01:00
# sudo apt-get install mono-complete
2016-03-19 22:55:38 +01:00
# sudo apt-get install gtk-sharp2 (only for GUI)
# sudo apt-get install libgdiplus (only for graphs)
2016-03-12 17:05:05 +01:00
# sudo apt-get install mysql-server
2016-03-22 19:27:32 +01:00
# sudo apt-get install ntp (use updated versions)
2016-03-12 17:05:05 +01:00
2016-03-19 22:55:38 +01:00
2016-03-12 17:05:05 +01:00
Windows
Download a copy of ntpq and ntpdc. Make sure .NET is installed and
the required MySQL Server is accessible. Download and install MySQL
2016-03-23 17:52:00 +01:00
if needed. Minor adjustments might be needed to get the code running.
2016-03-12 17:05:05 +01:00
2016-03-19 22:55:38 +01:00
2016-03-19 21:25:28 +01:00
Install
2016-03-13 13:53:45 +01:00
Build the solution with:
2016-03-19 23:08:38 +01:00
# make
2016-03-13 13:53:45 +01:00
2016-03-19 23:08:38 +01:00
Build a pure server version (no GTK) with:
# make server
2016-03-19 22:55:38 +01:00
2016-03-19 23:08:38 +01:00
Copy the output files in the bin folder to /opt/ntpa or any other
suitable location and copy ntpa.stat.conf from example to
/etc/ntpa.conf
2016-03-13 13:53:45 +01:00
2016-03-22 19:17:12 +01:00
On FreeBSD copy content of bin to /usr/local/ntpa/
Copy example/ntpa.stat.conf to /usr/local/etc/ntpa/ntpa.conf
Copy script/ntpa to /usr/local/etc/rc.d/ntpa
Touch /var/log/ntpa.log and adjust pid file location if needed.
2016-03-19 22:55:38 +01:00
2016-03-19 23:08:38 +01:00
Configuration
2016-03-15 21:08:01 +01:00
2016-03-19 23:08:38 +01:00
Set database user name and password in the top of ntpa.conf. Leave the
Create setting to 1 if you want all tables and data created automatically.
2016-03-23 17:52:00 +01:00
Then later you can use phpMyAdmin, MySQL Workbench or similar to adjust
the auto generated values.
2016-03-19 21:25:28 +01:00
2016-03-23 17:52:00 +01:00
Set Hostname to point at a name or an IP address reachable by ntpq. If
you want to generate graphs and pages also copy ntp.conf from the NTP host
to the machine running ntpa and set ConfigFile to point at this file.
2016-03-12 17:05:05 +01:00
2016-03-20 16:45:21 +01:00
Configuration can be validated with the validation tool:
2016-03-19 21:25:28 +01:00
# mono ntpav.exe /etc/ntpa.conf
2016-03-23 17:52:00 +01:00
To start ntpa use:
2016-03-11 23:22:40 +01:00
# mono ntpa.exe
2016-03-23 17:52:00 +01:00
Look in the log file for errors and other clues when debugging.
2016-03-11 23:22:40 +01:00
2016-03-22 19:17:12 +01:00
To stop ntpa use kill. Find the process id in the log file.
# kill 72354
2016-03-12 00:05:28 +01:00
2016-03-19 22:55:38 +01:00
To start ntpa in daemon mode:
2016-03-15 21:08:01 +01:00
# mono ntpa.exe &
2016-03-22 19:27:32 +01:00
On FreeBSD use the rc.d script to start and stop the daemon.
2016-03-22 19:17:12 +01:00
2016-03-12 00:05:28 +01:00
GTK GUI
2016-03-13 00:56:33 +01:00
Run Ntp.Analyzer.Gui.exe and connect to ntpa with the a port specified
2016-03-19 21:25:28 +01:00
in the listener section. The GTK GUI is experimental as does not support
SQL configuration and error handling. Use it at your own risk.
2016-03-12 17:27:03 +01:00
Connect to ntpa and get a list of available commands:
# ntpac 127.0.0.1 9070 help
Ask ntpa how long time it has been running:
# ntpac 127.0.0.1 9070 uptime