Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 08-26-2003, 12:40 PM   #1
LQ Newbie
Registered: Aug 2003
Posts: 3

Rep: Reputation: 0
Question Adding Service RedHat 9

How do I add setup linux to automatically start running a program when the OS boots. It is a server app that I want running all the time in the background?


Old 08-26-2003, 12:44 PM   #2
Registered: Apr 2003
Location: Ontario, Canada
Distribution: Arch Linux
Posts: 533

Rep: Reputation: 30

pick which one you want, then save it.
Old 08-26-2003, 12:58 PM   #3
LQ Newbie
Registered: Aug 2003
Posts: 3

Original Poster
Rep: Reputation: 0
How do I add a service to this list?
Old 08-26-2003, 01:15 PM   #4
Registered: Aug 2003
Distribution: Dead Rat
Posts: 191

Rep: Reputation: 56
The list is generated by scanning the contents of the directory /etc/rc.d/init.d. There is a file for each service. The files contain scripts (typically a bash script) that support the commands start and stop (minimum) and often also restart, reload and status. Take a look at some of the files in this directory to see what I mean... look at /etc/rc.d/init.d/named, for example (that particular one will only be available if you have the DNS nameserver software loaded).

This is a powerful, flexible system that can be manipulated directly from the command line or easily represented in GUI dialogs.

If you run your system in "pure" graphic mode you are in runlevel 5. If you run your system in the faster mode (text logins, then type "startx" to get into a GUI) you are in runlevel 3. There are other runlevels that serve other purposes, and a bit of documentation can be found in the comments of the file /etc/inittab. Don't bugger up *that* file, incidentally, or your system will probably fail to boot.

In Red Hat, the tool chkconfig updates and queries runlevel information for system services. This tool wants to see certain information in the comments at the top of each script in /etc/rc.d/init.d; if you look at some of the scripts already there you should see what I mean; alternatively check the doco for the chkconfig tool (do a man chkconfig from a terminal prompt) which explains what these comments mean and what you will have to do to get your new service known by chkconfig and friends.
Old 08-26-2003, 01:27 PM   #5
Senior Member
Registered: Jun 2003
Distribution: Debian/other
Posts: 2,104

Rep: Reputation: 45
Create a symlink from one of the services in


and put the symlink in


(if your running in graphical mode - each of the rcx.d directories contain the symlinks for that run level - so if its a different run level use the relevant directory)

make sure you rename it to


capital S

were xx

is the order number of when you want the service to start
- some services need to start before or after others - be careful you put it in the right start order - be careful though.

Last edited by Skyline; 08-26-2003 at 02:03 PM.


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
Adding mysqld as a service in GUI Redhat 3 blue80_in Linux - Software 2 11-29-2004 09:32 PM
Adding new service to a runlevel. atlesn Linux - Software 5 06-06-2004 04:56 PM
Adding new xinetd service Aldric Linux - Networking 1 06-03-2004 11:40 AM
adding a service neverender Mandriva 4 01-14-2004 06:25 AM
adding a program as a service neverender Linux - Software 2 01-14-2004 05:29 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:48 PM.

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