Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
I want apache to start up on it's own when I log on because I'm getting tired of having to type the command myself whenever I want to start and ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User
    Join Date
    Jun 2003
    Location
    Huntington Beach, CA
    Posts
    390

    Adding Apache to my start up scripts


    I want apache to start up on it's own when I log on because I'm getting tired of having to type the command myself whenever I want to start and stop it. I know nothing what so ever about start up scripts so any help would be appreciated. I'm using Mandrake 9.1 if that matters...

  2. #2
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Having apache started when you log in? Isn't it better to start it on system boot? At least I think so, and in that case, if I know Mandrake correctly, just run these commands:
    Code:
    ln -s ../init.d/httpd /etc/rc.d/rc3.d/S90httpd
    ln -s ../init.d/httpd /etc/rc.d/rc5.d/S90httpd
    rm -f /etc/rc.d/rc{3,5}.d/K??httpd

  3. #3
    Linux User
    Join Date
    Jun 2003
    Location
    Huntington Beach, CA
    Posts
    390
    httpd already starts on boot, maybe I should have been more specific. I start my apache server by typing /usr/local/apache/bin/apachectl start, that's the only way I know how...

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    What do you mean? If apache already starts at boot, then what's the problem? Why do you want to start it again when you log in?

  6. #5
    Linux User
    Join Date
    Jun 2003
    Location
    Huntington Beach, CA
    Posts
    390
    It doesn't start at boot though. If I just start up and try to go to my site it wont connect, I have to type the /usr/local/apache/bin/apachectl start in order to turn it on. Is there something I did wrong when configuring?

  7. #6
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    You stated in your previous post that apache did start at on boot. Does it or does it not?

  8. #7
    Linux User
    Join Date
    Jun 2003
    Location
    Huntington Beach, CA
    Posts
    390
    I don't even know anymore. All I know is httpd starts at boot which I know has to do with apache and in order to make http://24.24.241.188/ connect I have to type the /usr/local/apache/bin/apachectl start and all I want is to not have to type that every time...

  9. #8
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    If you have to run apachectl start to be able to connect to it, then it seems as if it doesn't start on boot. Try running the commands I gave you (although I'm not sure how Mandrake's init scripts work, so it's not certain to work), reboot your system, and see if you can connect then.

    Could someone with more knowledge about Mdk please help me out here?

  10. #9
    Linux User
    Join Date
    Jun 2003
    Location
    Huntington Beach, CA
    Posts
    390
    I originally tried your commands first but I accidently put /ect instead of /etc (I do it all the time). Anyway I did it right and rebooted and no it wouldn't connect, I still had to start it manually. Thanks for the help anyway...

    P.S. how do you know all this stuff, You always seem to have an answer to a question here. Are you a robot or something?

  11. #10
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Well, if noone answers this correctly for Mandrake, here's an emergency solution that I'm fairly sure should work for Mandrake:
    Code:
    echo '/usr/local/apache/bin/apachectl start' >>/etc/rc.d/rc.local
    And well, I know all these things because I don't have a life. =) I don't care about it, though, since I enjoy computers.

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •