Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
This will be a very simple question to most of you out there, but to me, i dont use redhat very much and when i do everything seems to be in a different place than most of the other distro's.
So the question is, how do i make apache load when the computer starts up?
there is a file in /etc/init.d/ called httpd, and if i do /etc/init.d/httpd start apache will load, but i dont know how to associate it with a runlevel to make it load at boot.
If someone could help me with this I would appreciate it.
Yeah i figured that i could do the rc.local thing. This is what i use to do when i used it, but i thought that is was about time to learn the proper way.
I noticed that there was simlinks in the /etc/rc.d/rc.0 and so on folders to /etc/init.d/httpd and mysql (another thing i want to start up) and stuff like that, but they dont seem to work.
The only difference that i did notice with the apache and mysql over the others is that their simlinks started with a K## where as the others started with a S## (where ## is a number).
I have spent about 1 hour searching the net for an answer to this, but i can not seem to find anything that tells me how to do it for red hat (that is doing it without using the rc.local file). I know there is a way. Just a matter of finding it.
Thanks for your suggestion, if i cant find the way, then i will just end up doing it with the rc.local file.
And yes, this is the apache and mysql that comes from the redhat install.
Typing the last message i had an idea on what might make it work, and i tested it and I was correct.
I mentioned in the /etc/rc.d/rc0-7.d dir's there was a K##httpd file and what ever, well, if you change the K to an S then it will work. I did not do it to the file in every run level, i just copied what sshd had. which was runlevel 3,4,5 and 6 i think, i cant remember.
So there you go.
If anyone else has this problem i hope they can work it out from this message
I may be mistaken, but i believe runlevel 6 is the -kill processes. Might have difficulties shutting down if you are trying to start apache rather then kill it.
you are correct, runlevel 6 is the shutdown level, i was just typing the last post from memory and i could not remember if i had changed it in runlevel 6 or not, but i just checked and i had not so thanks.
I just copied what there was for sshd, cause that started at the times and stuff i wanted httpd and mysql to start so it was all easy.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.