LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-13-2004, 10:29 AM   #1
kernelvn
Member
 
Registered: Aug 2004
Posts: 91

Rep: Reputation: 15
runlevel , how to configure ?


I would like to know how to configure a runlevel for a deamon ( for example the rc.postgres is the script of postgreSQL and I want it start at boot time ) . How should I do ?
 
Old 09-13-2004, 10:50 AM   #2
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
That depends what distro you're using. Different distro's have different bootscripts.
 
Old 09-13-2004, 11:11 AM   #3
kernelvn
Member
 
Registered: Aug 2004
Posts: 91

Original Poster
Rep: Reputation: 15
okie , I work on Fedora and Slackware . Could you give me something more ?
 
Old 09-13-2004, 12:17 PM   #4
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
Sure, add the command you want to run to the shell script /etc/rc.d/rc.local
 
Old 09-13-2004, 08:24 PM   #5
kernelvn
Member
 
Registered: Aug 2004
Posts: 91

Original Poster
Rep: Reputation: 15
Quote:
runlevel
I would like to know about that . How to change runlevel for a deamon , not only as you show me :

Quote:
add the command you want to run to the shell script /etc/rc.d/rc.local
I think that is an old way and not so good because I can not restart it when there are more than one deamon in the rc.local . I think rc.local only for a program need to start up with machine , not for a deamon .

thank you anyway !

Again , anyone can help me ?
 
Old 09-14-2004, 03:47 PM   #6
blood_omen
Member
 
Registered: Apr 2004
Location: Canada
Distribution: OpenBSD 3.6, Slackware 10.1
Posts: 134

Rep: Reputation: 15
In Fedora you do have a nice little GUI application that interestingly enough is called services, If I remember correctly, from there you can start stop, and edit runlevels. Although it will only edit runlevel 3,4,5, I recall. Another tool for Fedora is checkconfig (I might be wrong with the name of the command); it does exactly the same as the aforementioned tool, but it also edit runlevels 1,2 and 6 and it is a command line tool.

In Slackware there's not such thing as processes staring at differetn runlevels at boot-up (that, I don't know for certain), but if you want to start a service just /etc/rc.d/nameofservices start|stop|restart, and if you want it to start the service at boot up, just make the file executable chmod +x /etc/rc.d/nameofservice and it will start next time you boot your machine

Here goes an example for Slack using rc.postgres that you mentioned.

a) To start the process
/etc/rc.d/rc.postgres start

b)To start the process at boot time
chmod +x /etc/rc.d/rc.postgres or
chmod 755 /etc/rc.d/rc.postgres


c) If you want to stop the process
/etc/rc.d/rc.postgres start

d) if you don't want the process to start at boot time
chmod 644 /etc/rc.d/rc.postgres

I hope this help you, have a nice day.

Last edited by blood_omen; 09-14-2004 at 03:56 PM.
 
Old 09-14-2004, 08:54 PM   #7
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
Not really a security question. Moving this thread to the Linux - General Forum.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What's the difference between runlevel 2 and runlevel 5 in Debian? davidas Linux - Newbie 2 01-05-2012 01:10 PM
Can't go down to runlevel 3 Chuck23 Fedora 2 02-09-2005 09:39 PM
runlevel 4 and rc.M blian Slackware 5 05-11-2004 01:27 PM
What does Runlevel mean, and why am I in 3? thalerz Linux - General 6 11-21-2003 12:35 PM
X does not start in Runlevel 4, but i Runlevel 3 Rabon Linux - General 3 11-18-2003 06:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:36 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