Which lightweight Linux distro as NTP server and how to?
Hi,
I have a couple of Linux based computers/devices which need to be time synchronized. The only thing I have at my disposal are a couple of old PC's with about 256 Mb RAM. Is it possible to set up that kind of machine to act as an NTP server? The Linux devices are on a dedicated subnet, and other (win based) PC's are on the main subnet. The machine would have two NIC's, connected to both subnets, using win based one for internet access, to synchronize with one of the online NTP servers or the domain controller. Linux devices would then synchronize with the machine. Is that doable? And which distro should I choose? I only need it to be an NTP server, nothing more, it would just sit there, doing nothing else. |
Take the old PCs and send the to a recycling center. In a couple of weeks, pick up a Raspberry Pi for $35; the power savings will pay for it in a few months (it draws less than 1W). Install Debian with NTP or Chrony.
|
Quote:
Quote:
Quote:
|
Second that motion
Debian minimal with NTP added and configured would be nearly optimal (No gui needed or installed).
TinyCore (actually multicore, same people) might do. Yoou would have to use the command-line tools to download and configure NTP, btu then that IS the best way. This option is faster, easier, and can run from CD or HD with only the home and configuration saved to disk. (as nearly hack-proof as you can get). Puppy might also work, I have never set up a puppy NTP server. What you want to do takes little resource and should work using nearly any distribution. A minimal distribution is a better choice to maintain adequate performance on the older hardware, but I cannot think of a distribution that does not support ntp. |
Quote:
But that is something for us geeks, I would think that Debian is the easier way to go. |
All you need to support an NTP server is a kernel with drivers for your network. Microcore is about the smallest commonly available distro right now, and even it is overkill for supporting only a NTP server.
--- rod. |
Thanx for the answers guys, much helpful.
I chose Damn Small Linux as I had it lying around, and it installs as Debian on hard drive (that's what it says at least). I installed NTP and tried to sync the computer with my domain NTP server. It worked, but the problem was the time zone was set to EST so it was 6 (or 18) hours off. I had to use rm to delete localtime file, and then copy one of the files for Europe, since I'm on CET. so I did sudo ln -sf ../utc/share/zoneinfo/Europe/Madrid /etc/localtime and the time was still 6 hours off, but the time zone was CET. I synced it with my ntp with sudo ntpdate and it was correct. However, that is only in the terminal, the desktop is still 6 hours off. What am I missing? When I turn off the terminal, the clock on the desktop remains off. It's like root user's settings do not apply to dsl user. EDIT: When I go to setup>date and time setup, it shows the correct time, it's only the desktop that shows the wrong time. When I restart the pc and check the date, tehe terminal reports correct date but EST, and the desktop is 12 hours off. Everything is wrong. |
Dunno how or why, but after lot of fiddling, now it's all correct. Moving onto the next phase!
|
Quote:
--- rod. |
Quote:
|
Quote:
Stupid, I know, and I haven't done anything in graphical environment except use the terminal, but still, I feel a bit more comfortable having a desktop. I used an old Duron pc. |
Problem again - I cannot set the statis IP address. That is, I can but it gets overridden on boot.
I tried this http://www.linuxquestions.org/questi...config-206720/ and this http://tech.stlsawall.com/remasterknoppix_dnsmasq (Configur host information part) and this http://forum.almworks.com/lofiversio....php/t261.html but still nothing. Every time pc boots, it always ends up getting the IP from DHCP. How can I fix that? What would this do: auto lo iface lo inet loopback ? |
Quote:
The IP configuration of network interfaces is done in various ways for different distros. I'm not familiar with the method used by DSL. Invariably, it will be done in a collection of scripts and config files somewhere in the /etc directory tree. You may be able to find it by running a command such as the following (as root): Code:
grep -R -i eth0 /etc --- rod. |
Quote:
EDIT: Just added a reaservation on DHCP via MAC address and it works beautifully. Sort of. THe moment I add another NIC, they atop working. |
Okay, so your light distro probably doesn't have a grep that does recursive searches. Instead, you can use find (untested):
Code:
find /etc -exec "grep -i eth0" {} \; -print Adding another NIC possibly changes the default designation of eth0 & eth1, eth2... Some distros handle this seamlessly, but in others you need to adjust your NIC naming to suit the distro. Was really hoping someone familiar with the DSL way could step up here. --- rod. |
Quote:
I fiddled with it and managed to get it working. NICs have proper addresses, time zone is correct and when I issue time sync command, it syncs with NTP properly. Now, the final two questions: - how do I set up the machine to sync every X minutes with NTP? - how do I add time sync to boot |
For help on configuring the NTP daemon, see the respective man page:
Code:
man ntpd --- rod. |
All times are GMT -5. The time now is 02:12 PM. |