Which lightweight Linux distro as NTP server and how to?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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).
You got me on that. I once used Slitaz to create a minimal live system, booting from network, that has done nothing except inventorying the hardware, scp'ed the results to a server and shut down. Stripped that down to a total size of 8MB, IIRC. Slitaz comes with the tool for doing something like that pre-installed, IIRC its name was tazlito.
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.
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.
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.
Huh? Why do you need a desktop to run an NTP server?
--- rod.
Well, I know just about nothing about Linux, so having a desktop environment helps me feel a bit safer LOL
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.
having a desktop environment helps me feel a bit safer
Okay, sort of like sleeping with the light on to keep the beasties of the dark at bay. Completely rational.
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
This will probably turn up a short list of files that are involved in configuring the network, and if it isn't clear how to modify them, you should be able to ask a more specific question about it here.
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
But, I guess you've found it if you were able to configure the NIC. You should be able to bind each NIC to a configuration with its MAC.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.