The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



Thread: Daemons
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 02-20-2003
norsk hedensk norsk hedensk is offline
Registered User
 

Join Date: Jul 2002
Location: new york
Posts: 1,025
if you are using a GUI then you are starting up in runlevel 5. so that means that you will want this proccess to start in run level 5. if your not using a GUI then you want runlevel 3. now your mysql and httpd (apache?) was installed by SuSE right? well if that is so then the scripts to start the programs are already there in /etc/rc.d/ . so depending on your default run level (the run level that the system is booted to) you will want to put a total of TWO simlinks in the rc?.d directory. lets assume that you are using a GUI and that your default run level is 5. so then that means that you will want to cd into /etc/init.d/rc5.d
once you have done that do an 'ls -l' youll see a bunch of simlinks and where they point to (files in /etc/init.d). for most of them there will be 2 simlinks pointing to the same place, one of the simlinks will be called S??servicename. and the same but with a K instead of an S. these mean start and kill. this is incase there is a different command to start and stop these processes. the number is the order that this will be started.



ok enough explanation, i dont know what the script in /etc/init.d/ is called for mysql, it might just be 'mysqld' but i dont know, you will have to find out that for your self. so this is howto set apache to run on boot, cd into /etc/init.d/rc5.d/
run the command:
ln -s /etc/init.d/apache /etc/init.d/rc5.d/S09apache

and then run the command:
ln -s /etc/init.d/apache /etc/init.d/rc5.d/K13apache


andyour done. restart your system to see if apache gets started successfully. now to be honest, im not really sure in what order it is to start certain services. im sure its a simple thing but i dont really know. so what i did was look in my rc3.d directory (3 because no GUI running on my server) and i looked for similar (daemon) services and looked at when they were started. SuSE already setup samba to run on boot aswell as sshd. ( i dont know why apache isnt set to run on boot by default) so the link to start sshd was S09, so i put apache as S09apache, for the kill script, i did the same thing, sshd was K13, so i put apache as K13apache. yes that is the same numberfor both. so keep track of what simlinks you put in there and if anything goes wrong just remove them. hope all that helps.