Linux - Newbie This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
|
12-08-2011, 08:01 AM
|
#1
|
|
LQ Newbie
Registered: Dec 2011
Posts: 7
Rep: 
|
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.
Last edited by Ready; 12-08-2011 at 08:02 AM.
|
|
|
|
12-08-2011, 09:38 AM
|
#2
|
|
Senior Member
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,592
|
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.
|
|
|
|
12-08-2011, 11:21 AM
|
#3
|
|
Moderator
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Slackware, Debian
Posts: 12,524
|
Quote:
Originally Posted by Ready
Is it possible to set up that kind of machine to act as an NTP server?
|
Yes.
Yes.
Quote:
|
And which distro should I choose?
|
For that purpose a minimal install (+ NTP of course)of any distro will be sufficient. I would go for Debian, easy to set up and maintain.
|
|
|
|
12-08-2011, 12:00 PM
|
#4
|
|
Member
Registered: Apr 2010
Location: USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix
Posts: 732
Rep: 
|
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.
|
|
|
|
12-08-2011, 12:13 PM
|
#5
|
|
Moderator
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Slackware, Debian
Posts: 12,524
|
Quote:
Originally Posted by wpeckham
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.
|
|
|
|
12-08-2011, 03:45 PM
|
#6
|
|
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,321
|
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.
|
|
|
|
12-09-2011, 06:46 AM
|
#7
|
|
LQ Newbie
Registered: Dec 2011
Posts: 7
Original Poster
Rep: 
|
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.
Last edited by Ready; 12-09-2011 at 06:57 AM.
|
|
|
|
12-09-2011, 07:57 AM
|
#8
|
|
LQ Newbie
Registered: Dec 2011
Posts: 7
Original Poster
Rep: 
|
Dunno how or why, but after lot of fiddling, now it's all correct. Moving onto the next phase!
|
|
|
|
12-09-2011, 10:05 AM
|
#9
|
|
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,321
|
Quote:
Originally Posted by Ready
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.
|
Huh? Why do you need a desktop to run an NTP server?
--- rod.
|
|
|
|
12-09-2011, 10:07 AM
|
#10
|
|
Guru
Registered: Apr 2005
Location: /dev/null
Distribution: technixOS
Posts: 5,723
|
Quote:
Originally Posted by theNbomr
Huh? Why do you need a desktop to run an NTP server?
--- rod.
|
+1 to that. If anything, you could use an older headless pentium 1 to run an NTP server.....
|
|
|
|
12-12-2011, 12:36 AM
|
#11
|
|
LQ Newbie
Registered: Dec 2011
Posts: 7
Original Poster
Rep: 
|
Quote:
Originally Posted by theNbomr
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.
I used an old Duron pc.
|
|
|
|
12-12-2011, 12:08 PM
|
#13
|
|
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,321
|
Quote:
|
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.
--- rod.
Last edited by theNbomr; 12-13-2011 at 09:56 AM.
|
|
|
|
12-13-2011, 07:26 AM
|
#14
|
|
LQ Newbie
Registered: Dec 2011
Posts: 7
Original Poster
Rep: 
|
Quote:
Originally Posted by theNbomr
Code:
grep -R -i eth0 /etc
|
returns invalid option --R
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.
Last edited by Ready; 12-13-2011 at 07:51 AM.
|
|
|
|
12-13-2011, 10:06 AM
|
#15
|
|
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,321
|
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.
--- rod.
|
|
|
1 members found this post helpful.
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 10:46 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|