LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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



Reply
 
Search this Thread
Old 12-08-2011, 09:01 AM   #1
Ready
LQ Newbie
 
Registered: Dec 2011
Posts: 10

Rep: Reputation: Disabled
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 09:02 AM.
 
Old 12-08-2011, 10:38 AM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 328Reputation: 328Reputation: 328Reputation: 328
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.
 
Old 12-08-2011, 12:21 PM   #3
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,653
Blog Entries: 2

Rep: Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097
Quote:
Originally Posted by Ready View Post
Is it possible to set up that kind of machine to act as an NTP server?
Yes.

Quote:
Is that doable?
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.
 
Old 12-08-2011, 01:00 PM   #4
wpeckham
Member
 
Registered: Apr 2010
Location: USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix
Posts: 832

Rep: Reputation: 181Reputation: 181
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.
 
Old 12-08-2011, 01:13 PM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,653
Blog Entries: 2

Rep: Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097
Quote:
Originally Posted by wpeckham View Post
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.
 
Old 12-08-2011, 04:45 PM   #6
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
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.
 
Old 12-09-2011, 07:46 AM   #7
Ready
LQ Newbie
 
Registered: Dec 2011
Posts: 10

Original Poster
Rep: Reputation: Disabled
Exclamation

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 07:57 AM.
 
Old 12-09-2011, 08:57 AM   #8
Ready
LQ Newbie
 
Registered: Dec 2011
Posts: 10

Original Poster
Rep: Reputation: Disabled
Thumbs up

Dunno how or why, but after lot of fiddling, now it's all correct. Moving onto the next phase!
 
Old 12-09-2011, 11:05 AM   #9
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
Quote:
Originally Posted by Ready View Post
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.
 
Old 12-09-2011, 11:07 AM   #10
corp769
Guru
 
Registered: Apr 2005
Posts: 5,814

Rep: Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001
Quote:
Originally Posted by theNbomr View Post
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.....
 
Old 12-12-2011, 01:36 AM   #11
Ready
LQ Newbie
 
Registered: Dec 2011
Posts: 10

Original Poster
Rep: Reputation: Disabled
Red face

Quote:
Originally Posted by theNbomr View Post
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.
 
Old 12-12-2011, 07:32 AM   #12
Ready
LQ Newbie
 
Registered: Dec 2011
Posts: 10

Original Poster
Rep: Reputation: Disabled
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


?
 
Old 12-12-2011, 01:08 PM   #13
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
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 10:56 AM.
 
Old 12-13-2011, 08:26 AM   #14
Ready
LQ Newbie
 
Registered: Dec 2011
Posts: 10

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by theNbomr View Post
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 08:51 AM.
 
Old 12-13-2011, 11:06 AM   #15
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
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.
  


Reply

Tags
damnsmalllinux, ntp


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Lightweight Bodhi 1.2 distro offers Enlightenment for the Linux masses LXer Syndicated Linux News 0 09-13-2011 01:30 AM
Lightweight Linux Distro & WM (Acer TravelMate 3200) reaper5oh Linux - General 3 07-28-2010 01:21 AM
I wanted to run a lightweight linux distro with OpenOffice on a old unit depam Linux - Software 5 08-03-2006 08:49 PM
Lightweight Server Distro VideoLinux Linux - Distributions 3 05-19-2006 10:44 AM
Looking for a lightweight, easy-to-use Linux distro Gary King Linux - Distributions 4 08-18-2005 03:20 AM


All times are GMT -5. The time now is 10:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration