1
0
mirror of https://bitbucket.org/anguist/ntpa synced 2025-10-05 10:30:56 +00:00
Files
ntpa/INSTALL
2016-04-12 21:54:26 +02:00

79 lines
2.1 KiB
Plaintext

FreeBSD
Run as root:
# pkg install mono
# pkg install gtk-sharp20 (only for GUI)
# pkg install libgdiplus (only for graphs)
# pkg install mysql-server
Ubuntu
Run:
# sudo apt-get install mono-complete
# sudo apt-get install gtk-sharp2 (only for GUI)
# sudo apt-get install libgdiplus (only for graphs)
# sudo apt-get install mysql-server
# sudo apt-get install ntp (use updated versions)
Windows
Download a copy of ntpq and ntpdc. Make sure .NET is installed and
the required MySQL Server is accessible. Download and install MySQL
if needed. Minor adjustments might be needed to get the code running.
Install
Build the solution with:
# make
Build a pure server version (no GTK) with:
# make server
Copy content of bin folder to /opt/ntpa and copy ntpa.stat.conf from
example to /etc/ntpa.conf.
On FreeBSD copy content of bin to /usr/local/ntpa/
Copy ntpa.stat.conf from example to /usr/local/etc/ntpa/ntpa.conf
Copy script/ntpa.rc to /usr/local/etc/rc.d/ntpa
Touch /var/log/ntpa.log and adjust pid file location if needed.
Configuration
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.
Later you can use phpMyAdmin, MySQL Workbench or similar to adjust the
auto generated values. Set Hostname to point at a name or an IP address
reachable by ntpq.
Configuration can be validated with the validation tool:
# mono ntpav.exe --validate /etc/ntpa.conf
To start ntpa use:
# mono ntpa.exe --config /etc/ntpa.conf
Look in the log file for errors and other clues when debugging.
To stop ntpa use kill. Find the process id in the log file.
# kill 72354
To start ntpa in daemon mode:
# mono ntpa.exe --config /etc/ntpa.conf &
On FreeBSD use the rc.d script to start and stop the daemon.
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
GTK GUI
Run Ntp.Analyzer.Gui.exe and connect to ntpa with the port specified in
the listener section. The GTK GUI is experimental as does not support
SQL configuration and error handling. Use it at your own risk.