LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   SUSE / openSUSE (https://www.linuxquestions.org/questions/suse-opensuse-60/)
-   -   Start apache (https://www.linuxquestions.org/questions/suse-opensuse-60/start-apache-4175445147/)

bscho 01-11-2013 10:00 AM

Start apache
 
Were do you put the start up command to start apache when
I boot up?

At present I have to boot from a terminal when I
start up my laptop.

netnix99 01-11-2013 02:28 PM

bscho,

It's just a few steps:

1. make a symbolic link from /usr/local/apache/bin/apachectl to /etc/rc.d/init./httpd
2. make a symbolic link from /etc/rc.d/init.d/httpd to /etc/rc.d/rc3.d/S30httpd
3. make a symbolic link from /etc/rc.d/init.d/httpd to /etc/rc.d/rc5.d/S30httpd
4. make a symbolic link from /etc/rc.d/init.d/httpd to /etc/rc.d/rc3.d/K04httpd
5. make a symbolic link from /etc/rc.d/init.d/httpd to /etc/rc.d/rc5.d/K04httpd

If you need it, the command is
Code:

ln -s /usr/local/apache/bin/apachectl /etc/rc.d/init./httpd
The first line creates a link to apachectl, the next two start it on boot, the next two ensure it shuts down properly.

**This is assuming you have compiled Apache from source

HTH

m1qe 01-12-2013 05:25 AM

You can run the following command as root:
Code:

chkconfig apache2 on
Apache will then start automatic in runlevel 3 and 5.

Good luck!

bscho 01-12-2013 01:12 PM

start apache
 
Quote:

Originally Posted by m1qe (Post 4868313)
You can run the following command as root:
Code:

chkconfig apache2 on
Apache will then start automatic in runlevel 3 and 5.

Good luck!

Thanks I will try that.

Do you know the local page that you can put these commands on? There is a file rclocal you can put such commands on.

netnix99 01-12-2013 06:36 PM

I think the file you are referring to is actually /etc/rc.local

You could start apache from there, just remember to also include the argument 'start' to kick it off.

add the line /usr/local/apache2/bin/apachectl start

to /etc/rc.local

bscho 01-13-2013 12:06 PM

start apache
 
Quote:

Originally Posted by netnix99 (Post 4868638)
I think the file you are referring to is actually /etc/rc.local

You could start apache from there, just remember to also include the argument 'start' to kick it off.

add the line /usr/local/apache2/bin/apachectl start

to /etc/rc.local

Yes that it is. Thank you for your help.


All times are GMT -5. The time now is 07:16 PM.