LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 01-26-2005, 02:34 PM   #1
explorer
Member
 
Registered: Feb 2003
Posts: 229

Rep: Reputation: 34
Question Autostarting services on boot


I would like for httpd, mysql and samba to start automatically on boot. As a temporary measure, I have added startup lines for each one to the /etc/rc.d/rc.local file which does seem to work, but I know there is a better way to do this. Anyone want to give me an example or two of where and how to do this the right way ? Thanks !
 
Old 01-26-2005, 04:46 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
i've long forgotten how to do it "nicely" in a gui.. but the real way is to just create a symlink from /etc/init.d/rc.d/mysql (for example) to /etc/init.d/rc3.d/S70mysql (for example again) which will load mysql in position 70 on runlevel 3. note that the exact location of rc.d and similar directories changes from distro to distro, might just be /etc/rc.d for example.
 
Old 01-28-2005, 10:06 PM   #3
mjmwired
Member
 
Registered: Apr 2004
Distribution: CentOS6, CentOS5, F16, F15, Ubuntu, OpenSuse
Posts: 620

Rep: Reputation: 39
Remove the lines from rc.local. The nice (correct) way is to use either 'serviceconf' or 'chkconfig'.

From the shell:
# chkconfig --level 35 smb on
# chkconfig --level 35 httpd on
# chkconfig --level 35 mysql on

(An example for samba I wrote)
 
Old 01-30-2005, 03:10 AM   #4
hmc
LQ Newbie
 
Registered: Aug 2004
Location: Denmark
Distribution: Centos, Fedora
Posts: 23

Rep: Reputation: 15
Yes, use chkconfig

Hi,

In support of mjmwired: use chkconfig. Simple and easy. No messing with links in /etc/rc.d

If you need a service that does not come with built in chkconfig support, it is easier to manually add the support (you know, see how its done in the other /etc/init.d/* scripts) than messing around with the links!!!
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Starting different services at boot mjjzf Slackware 2 05-21-2005 01:46 PM
Services run at boot-up vincebs Ubuntu 3 05-09-2005 10:00 AM
Services at boot Echo Kilo Linux - Software 8 03-17-2005 12:47 PM
prevent services from autostarting after install? kostian Debian 4 01-03-2005 05:15 PM
Starting services at boot bionikxtc Solaris / OpenSolaris 1 03-12-2004 09:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

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