LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-25-2007, 03:09 PM   #1
00 noob
LQ Newbie
 
Registered: Jun 2007
Posts: 3

Rep: Reputation: 0
getting ntp to run upon boot


I just setup ntp4 on my ubuntu 7.04 machine and have it running properly only I can't figure out what all I need to do to get it to consistently run on boot.

I don't want something to screw up the run levels by my stupidity in improperly setting this up.

You might want to step by step me through this. I've never messed with run levels and all this fun stuff.

Thanks,
Mike
00noob
 
Old 06-25-2007, 03:35 PM   #2
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
Are the init scripts set to start in /etc/rc2.d ?

Quote:
S23ntp
S23ntp-server
you can use sysv-rc-conf to edit the run levels if necessary.

aptitude update
aptitude install sysv-rc-conf
sysv-rc-conf


Check the boxes for the appropriate services run-levels
 
Old 06-25-2007, 04:29 PM   #3
00 noob
LQ Newbie
 
Registered: Jun 2007
Posts: 3

Original Poster
Rep: Reputation: 0
ntp not listed in sysv-rc.conf

i installed the configurator and ran it but ntp isn't listed with the other programs. is there something i have to do to get it to detect it?

I have ntp installed and running, so i know it's on the machine.
 
Old 06-25-2007, 08:59 PM   #4
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
How did you install ntp ? did you use Synaptic ? or Aptitude ? or did you install it from Source ( a tarball ) you downloaded from somewhere ?

aptitude install ntp should install ntp from the Ubuntu repository, add the script and startup link in rc2.d
 
Old 06-25-2007, 09:57 PM   #5
00 noob
LQ Newbie
 
Registered: Jun 2007
Posts: 3

Original Poster
Rep: Reputation: 0
source install

i installed ntp from source. compiled last night.

I have the service running and everything seems to be ok. it's still syncing up with the servers in my conf file.

I just need to know how to make a script so it will run ntp upon ubuntu loading.
not thru the gui or any other ways.

i need to know where to drop the script..should i put it in /etc/init.d
or the rc2.d-rc5.d directories.

i just need to know what the difference is between init.d and rc2.d-rc5.d or if they're both interconnected. i can't find any documentation. maybe i'm just looking in the wrong place
 
Old 06-26-2007, 07:08 AM   #6
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Rather than check the ntp servers at boot (maybe I have to reboot several times a day, if I am playing with linux), I solved this problem like this:

http://www.linuxquestions.org/questi...34#post2727634

If you really want to sync to the timeserver only at boot, then just put the line /usr/sbin/chktime (You'll have to read the above post to get the chktime script) at the end of your rc.local file (usually found at /etc/rc.local ), and the time will be set at boot, but only once a day.

Oh, and don't forget to make that chktime script executable ( chmod +x /usr/sbin/chktime ), or it won't work!

Hope this helps.
 
Old 06-26-2007, 07:36 AM   #7
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
How-to Write Sysv Style Init scripts - http://www.debian.org/doc/debian-pol...ys.html#s9.3.2
 
  


Reply


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
boot pause for ntp synch with dsl problem tybaldchina Ubuntu 2 10-12-2005 09:37 AM
9.1... ntp.conf overwritten on boot german Slackware 2 02-16-2005 11:01 AM
NTP cannot work with timeserver, NTP-d can jerryvapps Linux - Networking 0 08-04-2004 02:04 PM
NTP cannot use server, NTP -d can jerryvapps Linux - Newbie 0 07-28-2004 02:22 PM
How do I start ntp daemon at boot? jkcunningham Linux - Software 5 07-19-2002 08:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:51 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
Open Source Consulting | Domain Registration