LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   starting Apache automatically (https://www.linuxquestions.org/questions/linux-software-2/starting-apache-automatically-379987/)

nodger 11-04-2005 02:58 PM

starting Apache automatically
 
Ive just got a new centOS server, after installing apache, I just want to know whats the
best (most correct) way to start apache incase the server reboots for whatever reason.

for now I placed the "apachectl --start" line in /etc/rc.local

Is this right? I know in Slackware its not done like this

Thanks,
Noel

nodger 11-04-2005 03:39 PM

After some searching, I found that this is better

Code:

chkconfig --level 345 httpd on
hope this helps someone

fouldsy 11-04-2005 03:54 PM

chkconfig is a bit cleaner than adding to rc.local, but would still have been valid. Different systems have different methods of setting bootscripts are different runlevels which is why it might have been different under Slackware. You might also want to look at stopping Apache upon reboot or shutdown.


All times are GMT -5. The time now is 03:50 PM.